public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Gcc calls Id with unrecognized option '--as-needed'
@ 2004-08-05 17:32 Otto Wyss
  2004-08-06 18:39 ` Thomas Lotterer
  0 siblings, 1 reply; 2+ messages in thread
From: Otto Wyss @ 2004-08-05 17:32 UTC (permalink / raw)
  To: gcc-help

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).

============================================
configure:9121: checking whether the C compiler (gcc  ) works
configure:9137: gcc -o conftest    conftest.c  1>&5
/usr/bin/ld: unrecognized option '--as-needed'
/usr/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
configure: failed program was:

#line 9132 "configure"
#include "confdefs.h"

main(){return(0);}
============================================

Does anyone know why gcc calls ld with this option and how I could
correct it?

I use Debian/sarge with

gcc -dumpversion
3.3.4
ld -V
GNU ld version 2.14.90.0.7 20031029 Debian GNU/Linux

O. Wyss

-- 
See a huge pile of work at "http://wyodesktop.sourceforge.net/"

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Gcc calls Id with unrecognized option '--as-needed'
  2004-08-05 17:32 Gcc calls Id with unrecognized option '--as-needed' Otto Wyss
@ 2004-08-06 18:39 ` Thomas Lotterer
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lotterer @ 2004-08-06 18:39 UTC (permalink / raw)
  To: Otto Wyss; +Cc: gcc-help

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-06  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-05 17:32 Gcc calls Id with unrecognized option '--as-needed' Otto Wyss
2004-08-06 18:39 ` Thomas Lotterer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).