------- Comment #10 from ebotcazou at gcc dot gnu dot org 2005-12-10 13:42 ------- > >>The configure line doesn't match the title of the report: the compiler has > >>been configured as a native 64-bit compiler. > > The first one I mispelled (it should be sparcv9-sun-solaris2.8 instead > of sparc64-sun-solaris2.8) - sorry!
You missed the point. Look at the configure lines at the very bottom of the first report, they are not in keeping with the title. You configured your 3rd compiler as a native sparcv9-sun-solaris2.8 compiler, while it should have been configured as specified in the title. And since you built it with a 32-bit compiler, it cannot reasonably work. > My aim: build up a GNU binutils and gcc pair, running on SPARC 64 bit > and creating (by default, i. e. without specifying any compiler swicth) > SPARC 64 binaries. Also the compiler compiling binutils and > boostrapping the compiler should be gcc. The last point is irrelevant, as the very purpose of bootstrapping is precisely to let GCC compile itself. The compiler you start from doesn't matter. Simply take the followig steps: - build GNU Binutils as sparcv9-sun-solaris2.8 with "cc -xarch=v9" - bootstrap GCC as sparcv9-sun-solaris2.8 with "cc -xarch=v9" - rebuild GNU Binutils with GCC You are less likely to make mistakes because you don't fiddle with 32-bit stuff. > (3) gcc [32 -> 64] compiled with (1) and using (2) > Configured with: > /appl/tmo/be8/tmp/gcc-4.2-20051203/configure > --prefix=/appl/tmo/be8/pkg/pre2 --enable-shared --enable-threads > --enable-languages=c,c++ --disable-libgcj --with-gnu-as > --with-as=/appl/tmo/be8/pkg/pre2/bin/sparcv9-sun-solaris2.8-as --with-gnu-ld > --with-ld=/appl/tmo/be8/pkg/pre2/bin/sparcv9-sun-solaris2.8-ld > --disable-multilib sparcv9-sun-solaris2.8 That's wrong. It should be configured like the Binutils in step 2. > This works quiet good. You're lucky then. :-) Step 3 is definitely wrong. > So the test results (sparc64-*-*) are done with SOLARIS ld, as, ar, ..., > running 64 bit and producing 32 bit executables using the 32 bit backend? No, sparc64-*-* is a 64-bit compiler generating 64-bit binaries. It generates 32-bit binaries only when passed with -m32. > There is no testsuite run for the 64 bit backend? See above. > I know that the SPARC compiler is a multilib compiler - but I > explicitly disabled this: I really only need 64 bit executables. > (I'm not a SPARC expert, I just read the installation instructions > http://gcc.gnu.org/install/specific.html#sparcv9-x-solaris2 > and thought that SPARC V9 and SPARC 64 are the same.) Yes they are, but we prefer sparc64-*-* over sparcv9-*-* (and the option -mcpu=v9 doesn't cause 64-bit code to be generated). > Is this, because nobody else had done this before? :-) Yeah, not everyone is crazy enough to use 5 steps to get a 64-bit toolchain while 2 are sufficient. :-) > In my opinion, my way to get a 64 bit-only compiler is leagal - maybe > more complicated as just bootstrap with SUNs cc - but it should work. Except step 3. > If it does not work, there is a bug somewhere in the chain. (Hope > you agree with this?) Yes, I agree that, if you fix step 3, that should theoritically work. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25200