When I run "make check" on a three-stage bootstrapped tree, I get errors from libiberty's testsuite: cc -DHAVE_CONFIG_H -g -I.. -I../../../egcc-SVN20061008/libiberty/testsuite/../../include -DHAVE_CONFIG_H -I.. -o test-pexecute ../../../egcc-SVN20061008/libiberty/testsuite/test-pexecute.c ../libiberty.a Undefined first referenced symbol in file __umoddi3 ../libiberty.a(mkstemps.o) __udivdi3 ../libiberty.a(mkstemps.o) ld: fatal: Symbol referencing errors. No output written to test-pexecute make[3]: *** [test-pexecute] Error 1 The problem appears to be that the libiberty library was three-staged using the new top-level bootstrap mechanism and therefore was compiled more recently by stage3 gcc, but the testcase driver is compiled and linked against this library with the stage1 compiler (cc). Therefore symbols from libgcc (if any are needed) won't be resolved. We need to use the same compiler for the tests as was used to compile the library we're testing. That changes depending on whether we use --disable-bootstrap or not. This will become much more serious if we include other libraries in the GCC tree such as GMP/MPFR where testsuite results are more important.
What platform are you compiling on?
--disable-bootstrap is not really supported and really has not been tested any more besides cross builds.
(In reply to comment #1) > What platform are you compiling on? sorry, it's on sparc-sun-solaris2.10, using vendor's cc for stage1. You probably won't see this problem if stage1 cc is any version of gcc, whether vendor supplied or user-built, because it'll have it's own copy of compatible libgcc bits.
(In reply to comment #2) > --disable-bootstrap is not really supported and really has not been tested any > more besides cross builds. Andrew please reread my initial report, I specifically talked about "three-stage bootstrap" and differences between stage1 and stage3 compiler. This is *not* a --disable-bootstrap related bug. Perhaps you're referring to my other submission today?
I'll take a look.
(In reply to comment #5) > I'll take a look. Any ideas?
Subject: Re: "make check" fails to compile library testcases >> I'll take a look. > > Any ideas? Sure, I'm just a little busy.
(In reply to comment #7) > Subject: Re: "make check" fails to compile library testcases > >> I'll take a look. > > > > Any ideas? > Sure, I'm just a little busy. It's been a year... :-) I still see this problem, reconfirming bug.
Reconfirming... I can see on a linux-gnu box that it's compiling the libiberty testsuite with stage1 gcc. That masks the error of missing libgcc bits used in stage3 libiberty, but still it should be using the stage3 xgcc to compile the testcases. Ditto for mpfr/gmp if you build them in-tree. gcc -DHAVE_CONFIG_H -g -O2 -I.. -I../../../egcc-SVN20090116/libiberty/testsuite/../../include -DHAVE_CONFIG_H -I.. -o test-pexecute ../../../egcc-SVN20090116/libiberty/testsuite/test-pexecute.c ../libiberty.a
Still happens on 4.5 trunk.
*** Bug 42308 has been marked as a duplicate of this bug. ***
Still present on trunk (5.0, end of stage 1).