[Top][All Lists]

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

Re: Autoconf protype breaks GCC builtin inlining

From: Nick Bowler
Subject: Re: Autoconf protype breaks GCC builtin inlining
Date: Thu, 25 Jan 2018 18:30:32 -0500

On 1/25/18, Ferenc Wágner <address@hidden> wrote:
> Jeffrey Walton <address@hidden> writes:
>>     [AC_MSG_RESULT([yes]); AC_SUBST([tr_RESULT], [1])],
>>     [AC_MSG_RESULT([no]); AC_SUBST([tr_RESULT], [0])]
>> )
> Thanks for the example!  Why is AC_COMPILE_IFELSE enough?

It isn't.  You will definitely should use AC_LINK_IFELSE to test if the
linker accepts the option.  By itself that won't tell you if the option
actually did anything useful but that likely won't matter for this test.

> Don't you have to invoke the linker itself to see if it accepts the
> option passed through?  And is the "-Wl," part applicable to most/all
> compilers?

There may exist toolchains where this won't work.  They probably don't
support as-needed anyway.  I wouldn't worry about it at all, since normally
this feature is strictly optional and the consequence of a false negative
on the test is essentially zero (the as-needed flag won't be set, the build
will work fine anyway, and your users are happy).  This is in line with the
Autoconf philosophy.


reply via email to

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