[uClibc]gcc-uClibc botches -nodefaultlibs / -nostdlib

Miles Bader miles at gnu.org
Tue Oct 22 13:11:04 UTC 2002


On Tue, Oct 22, 2002 at 06:42:26AM -0600, Erik Andersen wrote:
> >   (2) -nodefaultlibs should be translated into -nostdlib instead of just
> >        being passed through, because the wrapper explicitly specifies
> >        which crt0.o &c to use.
> 
> If we do this, doesn't that mean we are overriding things,
> even if someone wishes to use not use crt0 (i.e. they have
> their own)?

I don't know the semantics that gcc uses for these options (I can look
tomorrow if you want), but based on the code in gcc-uClibc, it looks like the
intention is that you use `-nostdlib' in the case where you want _nothing_
passed to the linker, and `-nodefaultlibs' when you just want to omit the
system _libraries_.

This behavior works well for me, because I want to use a non-default
floating-point library, which requires that I (1) get rid of the first
occurance of -lgcc, and (2) make sure my floating-point lib gets linked after
-lc and before the last occurance of -lgcc.  However, the details of what
crtX,Y,Z.o I need are something I don't want to care about -- it's another
level of detail above and beyond the default libraries, which are relatively
standardized in comparison.

-Miles
-- 
P.S.  All information contained in the above letter is false,
      for reasons of military security.



More information about the uClibc mailing list