bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libtool does not supports -static-libgcc flag


From: pancake
Subject: libtool does not supports -static-libgcc flag
Date: Wed, 31 Mar 2010 17:46:19 +0200
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

There's a patch from cygwin people solving the issue here:

 http://www.mail-archive.com/address@hidden/msg99768.html

I would love to see that patch in mainstream.

The explanation of the problem is:

In OpenSolaris (for example) gcc generates code with -shared-libgcc by
default which results in a binary that depends on libgcc_s.so.1 which comes
with gcc. If you plan to redistribute a shared library that depends on it
you force all end users to install gcc as a dependency which is not
necessary.

The problem is that -{static|shared}-libgcc flag is a compiler flag that needs
to be passed to the compiler at linking time (not the linker) which is quite
inconsistent.. but ok, that's a gcc issue.

The surprise comes when you try to compile the shared library with libtool
instead of a single gcc line, it just eats the option and it is silently not passed
to the final gcc line.

Thanks

--pancake




reply via email to

[Prev in Thread] Current Thread [Next in Thread]