correct way to access gcc's own static libs?

James E Wilson wilson@specifixinc.com
Thu Jan 20 02:20:00 GMT 2005


Jack Howarth wrote:
>     Is there a best approach to forcing gcc to check its own
> arch specific gcc-lib directory for its static own static libs
> during link time?

It isn't clear what question you are asking.  Gcc will always look in 
its own directory for its own libraries.  So using -static should be enough.

If you are building multiple gcc's with the same prefix, well, then, 
don't do that.  Different gcc's should all have a different prefix.

If you are trying to mix shared and static libraries, and just want 
static gcc libs but shared other libs, then the best way to do this is 
to configure gcc with --disable-shared.  This probably means you have to 
build gcc twice, one normal one and one static only one, but it makes it 
trivial to choose a static libgcc and libstdc++ when you want that.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



More information about the Gcc mailing list