libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 0/2] Support quotted arguments in user-supplied flags


From: Nikolai Merinov
Subject: [PATCH 0/2] Support quotted arguments in user-supplied flags
Date: Fri, 15 Mar 2019 03:46:05 +0500

Currently in the `_LT_COMPILER_OPTION' macro exists same issue as I tried
to fix for autoconf in the following thread: 
https://lists.gnu.org/archive/html/autoconf-patches/2019-03/msg00003.html

As result of this issue the following call:

> ./configure CPPFLAGS='-DSTR=\"TESTME\"' CC=clang

always ends with "checking if clang PIC flag -fPIC -DPIC works... no".
As result it is impossible to compile shared libraries with "clang" and flags
with quotes. This bug reproduced only with clang because it produce slightly
different warning with "-fPIC" and without this option:

    $ clang '-DTEST=\"str\"' main.c |& head -2
    In file included from <built-in>:349:
    <command line>:1:15: warning: missing terminating '"' character 
[-Winvalid-pp-token]
    $ clang '-DTEST=\"str\"' -fPIC main.c |& head -2
    In file included from <built-in>:351:
    <command line>:1:15: warning: missing terminating '"' character 
[-Winvalid-pp-token]

Suggested patch changes code to evaluate `ac_compile' twice: in second time
user-supplied arguments itself will be unquotted. This is a same behavior
as with CFLAGS passed to "make" command. 

Please note, suggested new test will work only with autoconf with my patch
from https://lists.gnu.org/archive/html/autoconf-patches/2019-03/msg00003.html
With older autoconf versions my test will fail on ./configure call and
test will be skipped.

During work on this issue I observed that _LT_DEMO_SETUP produced broken
code for a Makefile.am file. I failed to find how we can safely use $@
inside of m4_define function call and decided to workaround issue with
removing $@ at all.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]