------- Comment #7 from ebotcazou at gcc dot gnu dot org  2006-08-06 06:43 
-------
> Configured gcc with CFLAGS=-xarch=v9 (among other flags) to produce 64-bit
> code from the system compiler, instead of the default of 32-bit.
> 
> ----(begin build log excerpt)----
> cc -c   -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC    
> -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild
> -I/tg/freeport/src/gcc/gcc--4.1.1/gcc
> -I/tg/freeport/src/gcc/gcc--4.1.1/gcc/build
> -I/tg/freeport/src/gcc/gcc--4.1.1/gcc/../include
> -I/tg/freeport/src/gcc/gcc--4.1.1/gcc/../libcpp/include  -D__EXTENSIONS__
> -D_REENTRANT -Dsparc    -o build/errors.o
> /tg/freeport/src/gcc/gcc--4.1.1/gcc/errors.c
> cc   -g -DENABLE_CHECKING -DENABLE_ASSERT_CHECKING -DIN_GCC     
> -DHAVE_CONFIG_H
> -DGENERATOR_FILE  -o build/genmodes \
>  build/genmodes.o build/errors.o
> ../build-sparc-sun-solaris2.8/libiberty/libiberty.a
> ild: (bad file) Input file ../build-sparc-sun-solaris2.8/libiberty/libiberty.a
> contains 64-bit relocatable, but producing a 32-bit file.
> gmake[2]: *** [build/genmodes] Error 1
> gmake[2]: Leaving directory `/export/home/cport/tmp/gcc--4.1.1.build/gcc'
> gmake[1]: *** [stage1_build] Error 2
> gmake[1]: Leaving directory `/export/home/cport/tmp/gcc--4.1.1.build/gcc'
> gmake: *** [bootstrap-lean] Error 2

You cannot expect that to work.  You're trying to bootstrap a 32-bit compiler
(sparc-sun-solaris2.8) with a 64-bit compiler (cc -xarch=v9).  Unsupported.

You need either to bootstrap the 64-bit compiler (sparc64-sun-solaris2.8)

  CC="cc -xarch=v9" $srcdir/configure sparc64-sun-solaris2.8; gmake bootstrap

or build a cross-compiler from sparc64-sun-solaris2.8 to sparc-sun-solaris2.8

  CC="cc -xarch=v9" $srcdir/configure --host=sparc64-sun-solaris2.8
--target=sparc-sun-solaris2.8 ; gmake

Andrew, please redirect these kinds of PRs to me.  Thanks in advance.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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

Reply via email to