This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 3.1 Bootstrap failure on Solaris 2.8
On Wed, Mar 28, 2001 at 11:05:44PM -0300, Alexandre Oliva wrote:
> On Mar 28, 2001, Jeffrey Oldham <oldham@codesourcery.com> wrote:
>
> > I just did a "make bootstrap" and a "make all" for the most recent gcc
> > (approximately 2001-03-28 23:00 GMT). The resulting error message,
> > below, is exactly the same.
>
> Which shell have you got as /bin/sh? I can't duplicate this on Red
> Hat Linux 7/x86.
>
> Could you please modify the CXX_FOR_TARGET so that it also echoes
> something to /dev/stderr, so that you can tell why it's choosing g++
> instead of xgcc? Something like:
>
> ... `case $$dir in libstdc++-v3) echo xgcc ;; \
> *) echo g++ ; echo $$dir >&2 ;; esac` ...
I did this, and I also made the libstdc++ configure echo $CXX to
stderr as the very first thing it does.
The echos in CXX_FOR_TARGET do not fire at all, and libstdc++v3
configure sees the wrong value of CXX.
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
make[3]: Leaving directory `/home/zack/src/b/gcc_vanilla/gcc'
make[2]: Leaving directory `/home/zack/src/b/gcc_vanilla/gcc'
# Two 'libstdc++-v3's should have appeared here.
Configuring in i686-pc-linux-gnu/libstdc++-v3
/home/zack/src/b/gcc_vanilla/gcc/g++
-B/home/zack/src/b/gcc_vanilla/gcc/ -nostdinc++
-L/home/zack/src/b/gcc_vanilla/i686-pc-linux-gnu/libstdc++-v3/src
-L/home/zack/src/b/gcc_vanilla/i686-pc-linux-gnu/libstdc++-v3/src/.libs
-B/work/inst/i686 -pc-linux-gnu/bin/
-B/work/inst/i686-pc-linux-gnu/lib/
-isystem /work/inst/i686-pc-linux-gnu/include
creating cache ../config.cache
Bootstrap then fails with
/home/zack/src/b/gcc_vanilla/gcc/g++
-B/home/zack/src/b/gcc_vanilla/gcc/ -nostdinc++
-L/home/zack/src/b/gcc_vanilla/i686-pc-linux-gnu/libstdc++-v3/src
-L/home/zack/src/b/gcc_vanilla/i686-pc-linux-gnu/libstdc++-v3/src/.libs
-B/work/inst/i686-pc-linux-gnu/bin/
-B/work/inst/i686-pc-linux-gnu/lib/ -isystem
/work/inst/i686-pc-linux-gnu/include -shared -nostdlib /usr/lib/crti.o
/home/zack/src/b/gcc_vanilla/gcc/crtbeginS.o .libs/limitsMEMBERS.o
.libs/stdexcept.o .libs/functexcept.o .libs/bitset.o .libs/globals.o
.libs/basic_file.o .libs/ios.o .libs/complex_io.o .libs/strstream.o
.libs/c++locale.o .libs/locale.o .libs/localename.o .libs/codecvt.o
.libs/locale-inst.o .libs/stl-inst.o .libs/misc-inst.o
.libs/valarray-inst.o .libs/string-inst.o .libs/wstring-inst.o
-Wl,--whole-archive ../libmath/.libs/libmath.a
../libsupc++/.libs/libsupc++convenience.a -Wl,--no-whole-archive
-L/home/zack/src/b/gcc_vanilla/i686-pc-linux-gnu/libstdc++-v3/src
-L/home/zack/src/b/gcc_vanilla/i686-pc-linux-gnu/libstdc++-v3/src/.libs
-lm ../libmath/.libs/libmath.a -lm
../libsupc++/.libs/libsupc++convenience.a
-L/home/zack/src/b/gcc_vanilla/gcc -lm -lm -lstdc++ -lm -lc -lgcc_s
/home/zack/src/b/gcc_vanilla/gcc/crtendS.o /usr/lib/crtn.o -Wl,-soname
-Wl,libstdc++.so.3 -o .libs/libstdc++.so.3.0.0
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
make[4]: *** [libstdc++.la] Error 1
Some distance above, I see
make[1]: Leaving directory `/home/zack/src/b/gcc_vanilla/gcc'
Building runtime libraries
make[1]: Entering directory `/home/zack/src/b/gcc_vanilla'
make[2]: Entering directory `/home/zack/src/b/gcc_vanilla/libiberty'
Those two blank lines are in the log. I bet they're from the echos I
inserted. They correspond to
bootstrap ... : all-bootstrap
...
@r=`pwd`; export r; \
s=`cd $(srcdir); pwd` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries"; \
$(MAKE) $(BASE_FLAGS_TO_PASS) all
Looks like the code embedded in CXX_FOR_TARGET gets evaluated here, in
completely the wrong context. This would explain both the current
problem, and the previous problem I was having with libstdc++.INC not
getting read. And it would explain why, after bootstrap fails, 'make
all' from the top works.
Unfortunately I have no idea whatsoever how to fix it.
zw