This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc calls Id with unrecognized option '--as-needed'
- From: Thomas Lotterer <thl at dev dot de dot cw dot com>
- To: Otto Wyss <otto dot wyss at orpatec dot ch>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Fri, 6 Aug 2004 11:13:38 +0200
- Subject: Re: Gcc calls Id with unrecognized option '--as-needed'
- Organization: Cable & Wireless
- References: <41124E02.A55F0550@orpatec.ch>
- Reply-to: thl at dev dot de dot cw dot com
On Thu, Aug 05, 2004, Otto Wyss wrote:
> The configure of the wxWidgets package tests for gcc with a simple
> test app but during this test ld stops with error unrecognized option
> '--as-needed' (see log) [...]
>
> Does anyone know why gcc calls ld with this option and how I could
> correct it?
>
http://cvs.openpkg.org/chngview?cn=16830 reads:
Accept (and ignore) --as-needed/--no-as-needed options from GNU binutils
2.15 in our GNU binutils 2.14 to resolve a chicken and egg problem under
platforms (like Fedora Core 2) which already run GNU binutils 2.15: the
vendor cc(1) knows that it has ld(1) from GNU binutils 2.15 and hence
always uses the --as-needed option when calling ld(1). Unfortunately,
between having built "binutils" and "gcc" packages, this will break
OpenPKG because the vendor cc(1) would run the OpenPKG ld(1) with an
option it (still) does not understand. The only workaround is to let our
ld(1) accept and ignore this option. Once our cc(1) from "gcc" package
is installed, the problem is gone, because our "gcc" package correctly
detects that our ld(1) still does ot understand --as-needed.
--
Thomas.Lotterer@cw.com, Cable & Wireless