[Bug middle-end/54630] [4.8 Regression] GCC 4.8 --enable-languages=c build fails: Undefined symbols: ___cxa_guard_acquire and ___cxa_guard_release

baker at usgs dot gov gcc-bugzilla@gcc.gnu.org
Fri Sep 21 19:17:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54630

--- Comment #5 from Larry Baker <baker at usgs dot gov> 2012-09-21 19:16:50 UTC ---
>From what I can tell from the GCC Link Options web page
(http://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#index-static_002dlibgcc-1032),
-static-libstdc++ is only a g++ driver option:

-static-libstdc++
When the g++ program is used to link a C++ program, it normally automatically
links against libstdc++. If libstdc++ is available as a shared library, and the
-static option is not used, then this links against the shared version of
libstdc++. That is normally fine. However, it is sometimes useful to freeze the
version of libstdc++ used by the program without going all the way to a fully
static link. The -static-libstdc++ option directs the g++ driver to link
libstdc++ statically, without necessarily linking other libraries statically. 

There appears to be no way to pass -static-libstdc++ to the g++ driver for
linking.  --with-host-libstdcxx=-static-libstdc++ will cause gcc/Makefile to
use gcc for the LINKER, instead of just passing the -static-libstdc++ option to
the g++ driver.



More information about the Gcc-bugs mailing list