Error compiling solaris cross compiler.

Phillip Thurmond
Tue Nov 13 06:39:00 GMT 2001

I'm trying to cross-compile gcc 2.95.3 to the target sparc-solaris.  
Unfortunately it only gets so far and then spits out the following error.

make[2]: Leaving directory `/home/jabba/tmp/gcc-2.95.3/gcc/intl'
/home/jabba/tmp/gcc-2.95.3/gcc/xgcc -B/home/jabba/tmp/gcc-2.95.3/gcc/ 
-B/usr/local/sparc-sun-solaris/bin/ -I/usr/local/sparc-sun-solaris/include 
-DCROSS_COMPILE -DIN_GCC -DHAIFA    -g -O2 -I./include  -I. -I. -I./config 
-I./../include  \
        -c ./config/sparc/gmon-sol2.c -o gmon.o
./config/sparc/gmon-sol2.c: In function `_mcleanup':
./config/sparc/gmon-sol2.c:185: `PATH_MAX' undeclared (first use in this 
./config/sparc/gmon-sol2.c:185: (Each undeclared identifier is reported only 
./config/sparc/gmon-sol2.c:185: for each function it appears in.)
make[1]: *** [gmon.o] Error 1
make[1]: Leaving directory `/home/jabba/tmp/gcc-2.95.3/gcc'
make: *** [all-gcc] Error 2

I have binutils cross-compiled for solaris and installed in 
/usr/local/sparc-sun-solaris and I also copied over all the include files 
including directories from /usr/include on my solaris box into 
/usr/local/sparc-sun-solaris/include on my linux box.  I checked and found 
out that PATH_MAX is defined in limits.h as 1024, so I added the line
#define PATH_MAX 1024
into gmon-sol2.c.  This will let me get further into the compile, but then I 
get errors about struct exception being defined more than once.  Does anyone 
know what modifications need to be made to 2.95.3 to allow it to be 
cross-compiled for solaris, or can anyone tell me if I'm doing something 
wrong?  Thanks

					--Phillip Thurmond

Do You Yahoo!?
Get your free address at

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list