On 2018-04-09 04:40, Florian Weimer wrote:
> On 04/09/2018 11:21 AM, Yaakov Selkowitz wrote:
>> On 2018-04-09 03:59, Florian Weimer wrote:
>>> Is there a recommend way to get libtool to pass through all flags
>>> specified in CFLAGS and LDFLAGS unchanged, and have the GCC compiler
>>> driver sort out which flags to pass to the compiler/assembler/linker?
>>
>> $ libtool --mode=compile --help
>> [snip]
>> This mode accepts the following additional options:
>> [snip]
>>    -Wc,FLAG          pass FLAG directly to the compiler
>>
>> $ libtool --mode=link --help
>> [snip]
>> The following components of LINK-COMMAND are treated specially:
>> [snip]
>>    -Wc,FLAG
>>    -Xcompiler FLAG   pass linker-specific FLAG directly to the compiler
>>    -Wl,FLAG
>>    -Xlinker FLAG     pass linker-specific FLAG directly to the linker
> 
> That doesn't solve the problem because there is a difference between
> passing a flag to the *linker* and passing it to the *compiler driver*
> while linking.
> 
>> But, often when this happens, it is the fault of a poorly written
>> configure.ac or Makefile.am.  Where exactly are you seeing an issue?
> 
> Everywhere?  libtool does not pass -specs= arguments in LDFLAGS to the
> linker invocation.

Then patch libtool.  I have in the past for similar issues, e.g.:

https://github.com/cygwinports/libtool/blob/master/2.4.5-pass-ldflags.patch

You will then have to assure that autoreconf is run within packages to
pick up the change.

-- 
Yaakov Selkowitz
Software Engineer - Platform Enablement Group
Red Hat, Inc.
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org

Reply via email to