problems building cross-compiler for sparc-sun-solaris on x86

Per Fransson per.fransson.768@student.lu.se
Sun Apr 7 23:58:00 GMT 2002


Hi,

I'm trying to build a cross compiler for sparc-sun-solaris2.8 on an x86 
running linux.

I've managed to build binutils for sparc and put it into foo/myGCC/

(I've also put symbolic links to the files in /foo/myGCC/  in the same 
directory without the 'sparc-sun-solaris'-prefix,
i e there is a link ' foo/myGCC/bin/as -> 
foo/myGCC/bin/sparc-sun-solaris2.8-as' and the same for addr2line, ar, 
 c++filt, gasp, ld, nm, objcopy, objdump, ranlib, readelf and size. I've 
no idea if this helps anything, but it shouldn't hurt, right?)


I've tried building gcc-3.0.4 like this:
% cd foo
% tar xvfz gcc-3.0.4.tar.gz
% mkdir build-gcc
% cd build-gcc
% ../gcc-3.0.4/configure --prefix=foo/myGCC/ 
--target=sparc-sun-solaris2.8 -v
...
...
...
[no problems]
% make all install
...
...
...
...

foo/build-gcc/gcc/xgcc -Bfoo/build-gcc/gcc/ -Bfoo/myGCC//sparc-sun-solaris2.8/bin/ -Bfoo/myGCC//sparc-sun-solaris2.8/lib/ -isystem foo/myGCC//sparc-sun-solaris2.8/include  -c -o crt1.o -x assembler-with-cpp ../../gcc-3.0.4/gcc/config/sparc/sol2-c1.asm
foo/build-gcc/gcc/xgcc -Bfoo/build-gcc/gcc/ -Bfoo/myGCC//sparc-sun-solaris2.8/bin/ -Bfoo/myGCC//sparc-sun-solaris2.8/lib/ -isystem foo/myGCC//sparc-sun-solaris2.8/include  -c -o crti.o -x assembler-with-cpp ../../gcc-3.0.4/gcc/config/sparc/sol2-ci.asm
foo/build-gcc/gcc/xgcc -Bfoo/build-gcc/gcc/ -Bfoo/myGCC//sparc-sun-solaris2.8/bin/ -Bfoo/myGCC//sparc-sun-solaris2.8/lib/ -isystem foo/myGCC//sparc-sun-solaris2.8/include  -c -o crtn.o -x assembler-with-cpp ../../gcc-3.0.4/gcc/config/sparc/sol2-cn.asm
foo/build-gcc/gcc/xgcc -Bfoo/build-gcc/gcc/ -Bfoo/myGCC//sparc-sun-solaris2.8/bin/ -Bfoo/myGCC//sparc-sun-solaris2.8/lib/ -isystem foo/myGCC//sparc-sun-solaris2.8/include  -c -DGCRT1 -o gcrt1.o -x assembler-with-cpp ../../gcc-3.0.4/gcc/config/sparc/sol2-c1.asm
foo/build-gcc/gcc/xgcc -Bfoo/build-gcc/gcc/ -Bfoo/myGCC//sparc-sun-solaris2.8/bin/ -Bfoo/myGCC//sparc-sun-solaris2.8/lib/ -isystem foo/myGCC//sparc-sun-solaris2.8/include -DCROSS_COMPILE -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -I. -I. -I../../gcc-3.0.4/gcc -I../../gcc-3.0.4/gcc/. -I../../gcc-3.0.4/gcc/config -I../../gcc-3.0.4/gcc/../include  \
	-c ../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c -o gmon.o
In file included from ../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:36:
../../gcc-3.0.4/gcc/system.h:50:19: stdio.h: No such file or directory
In file included from ../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:36:
../../gcc-3.0.4/gcc/system.h:92:23: sys/types.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:94:19: errno.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:101:21: string.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:102:22: strings.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:114:21: stdlib.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:123:21: unistd.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:127:24: sys/param.h: No such file or directory
In file included from ../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:36:
../../gcc-3.0.4/gcc/system.h:179:23: sys/time.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:180:19: time.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:192:20: fcntl.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:230:22: sys/wait.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:301:20: malloc.h: No such file or directory
../../gcc-3.0.4/gcc/system.h:385:23: sys/stat.h: No such file or directory
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c: In function `monstartup':
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:112: warning: implicit declaration of function `sbrk'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:112: warning: assignment makes pointer from integer without a cast
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:114: warning: implicit declaration of function `write'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:136: warning: assignment makes pointer from integer without a cast
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c: In function `_mcleanup':
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:181: `PATH_MAX' undeclared (first use in this function)
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:181: (Each undeclared identifier is reported only once
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:181: for each function it appears in.)
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:186: warning: implicit declaration of function `getenv'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:186: warning: assignment makes pointer from integer without a cast
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:192: warning: implicit declaration of function `strrchr'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:198: warning: implicit declaration of function `sprintf'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:198: warning: implicit declaration of function `getpid'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:204: warning: implicit declaration of function `creat'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:206: warning: implicit declaration of function `perror'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:231: warning: implicit declaration of function `close'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:181: warning: unused variable `buf'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c: In function `internal_mcount':
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:299: warning: implicit declaration of function `atexit'
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c: In function `moncontrol':
../../gcc-3.0.4/gcc/config/sparc/gmon-sol2.c:413: warning: implicit declaration of function `profil'
make[1]: *** [gmon.o] Error 1
make[1]: Leaving directory `foo/build-gcc/gcc'
make: *** [all-gcc] Error 2

%

Any ideas?

Thanks in advance.

/Per




More information about the Gcc-help mailing list