This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC patch: Add libquadmath - and use it in gfortran (round two)


* Tobias Burnus wrote on Tue, Nov 09, 2010 at 08:09:26AM CET:
> The only issue which remains is the --as-needed issue on Darwin.
> Somehow the configure check whether "ld" supports --as-needed does
> not seem to work. (Cf. acinclude.m4.) Any idea why?

Well, AC_CHECK_LIB([m], [func], ...) will check (and cache!) whether it
works to link against -lm when func is an unresolved symbol.  It does
not make sense to also add -lm in the OTHER-LIBRARIES argument of
AC_CHECK_LIB here, linking libm against libm is not needed.

AC_LINK_IFELSE with LIBS overridden will work better.  I'm not quite
sure ATM whether there are linkers that will only warn but not fail when
you pass -Wl,-unknown-flag to the compiler driver, I guess we'll find
out.  Of course the test then still doesn't ensure that -Wl,--as-needed
actually does what it should.

Another related issue is that libtool will have problems with this (this
is only relevant for users of GCC not GCC itself) as it doesn't keep the
ordering of the -Wl, flags.  Guess we need to fix that next then ...

Cheers,
Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]