The libpwl test in toplevel configure is bogus: it tries to link with gcc, but libpwl is a C++ library and needs symbols from libstdc++, as can be seen in this excerpt from config.log of a failing bootstrap: configure:5755: gcc -o conftest -g -O2 -L/vol/gcc/lib conftest.c -lpwl >&5 Undefined first referenced symbol in file std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_st ring(std::basic_string<char, std::char_traits<char>, std::allocator<char> > cons t&) /vol/gcc/lib/libpwl.a(Watchdog.o) operator new(unsigned int) /vol/gcc/lib/libpwl.a(Watchdog.o)
I don't think this is a bug unless --with-host-libstdcxx= option is being ignored. See the documentation from http://gcc.gnu.org/install/configure.html : --with-host-libstdcxx=linker-args If you are linking with a static copy of PPL, you can use this option to specify how the linker should find the standard C++ library used internally by PPL. Typical values of linker-args might be `-lstdc++' or `-Wl,-Bstatic,-lstdc++,-Bdynamic -lm'. If you are linking with a shared copy of PPL, you probably do not need this option; shared library dependencies will cause the linker to search for the standard C++ library automatically.
> --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-03-14 20:43:47 UTC --- > I don't think this is a bug unless --with-host-libstdcxx= option is being > ignored. I've configured with --with-ppl=/vol/gcc --with-cloog=/vol/gcc --enable-cloog-backend=ppl \ --with-host-libstdcxx='-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm' \ --with-boot-ldflags=-L/vol/gcc-4.5/lib Not exactly as in install.texi, but except for the -lpwl issue, it worked fine. Apart from this bug, I consider the need for such a --with-host-libstdcxx an abomination: this should work out of the box, since it is obvious that with ppl/cloog, libstdc++ is needed, and preferably the static one to avoid runpath issues. An excellent example of how to do this right is the Go case: --enable-languages=go automatically links with the static libstdc++, no contortions required. Rainer
Author: ro Date: Mon Mar 21 12:26:30 2011 New Revision: 171225 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=171225 Log: PR bootstrap/48120: * configure.ac (pwllib): Use LIBS instead of LDFLAGS. Add -lstdc++ -lm to LIBS. * configure: Regenerate. Modified: trunk/ChangeLog trunk/configure trunk/configure.ac
Mine. Fixed for 4.7.0, may backport to 4.6.
Author: jye2 Date: Mon Sep 19 05:39:05 2011 New Revision: 178951 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178951 Log: 2011-09-19 Joey Ye <joey.ye@arm.com> Backport r171225 from mainline 2011-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> PR bootstrap/48120: * configure.ac (pwllib): Use LIBS instead of LDFLAGS. Add -lstdc++ -lm to LIBS. * configure: Regenerate. Added: branches/ARM/embedded-4_6-branch/ChangeLog.arm Modified: branches/ARM/embedded-4_6-branch/configure branches/ARM/embedded-4_6-branch/configure.ac