This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gmon.c compile failure building cross compiler linux->solaris2
- To: egcs-bugs at cygnus dot com
- Subject: gmon.c compile failure building cross compiler linux->solaris2
- From: "John C. Ruttenberg" <rutt at tensilica dot com>
- Date: Fri, 27 Mar 1998 14:09:31 -0500
- Reply-to: rutt at tensilica dot com
Here are the steps I followed to build my cross compiler:
mkdir ~/cross
mkdir ~/cross/sparc-sun-solaris2
mkdir src
cd src
tar xfz ~/tmp/egcs-1.0.2.tar.gz
tar xfz ~/tmp/binutils-2.8.1.tar.gz
tar xfz ~/tmp/newlib-1.8.0.tar.gz
cd newlib
cp -r newlib/libc/include/ ~/cross/sparc-sun-solaris2/ ## Required??
cd binutils-2.8.1
configure --target=sparc-sun-solaris2 --host=i686-linux \
--prefix=/home/rutt/cross/sparc-elf \
--with-headers=/home/rutt/cross/sparc-elf/include \
--with-newlib --with-gnu-as
make all install
cd ../egcs-1.0.2
mkdir sparc-sun-solaris2
cd sparc-sun-solaris2
../configure --target=sparc-sun-solaris2 --host=i686-linux \
--prefix=/home/rutt/cross/sparc-sun-solaris2 \
--with-headers=/home/rutt/cross/sparc-sun-solaris2/include \
--with-newlib -with-gnu-ld
make CFLAGS=-g cross install
####
#### This gets an error trying to build gmon.o that looks like "PATH_MAX"
#### undeclared. See below for the full text of the error message.
cd gcc
touch gmon.o
cd ..
make CFLAGS=-g cross install
#### This time it completes without an error
cd ../../newlib-1.8.0
configure --target=sparc-sun-solaris2 --host=i686-linux \
--prefix=/home/rutt/cross/sparc-elf \
--with-headers=/home/rutt/cross/sparc-elf/include \
--with-newlib --with-gnu-as
make all install
Here is the text of the error message:
../../gcc/config/sparc/gmon-sol2.c: In function `_mcleanup':
../../gcc/config/sparc/gmon-sol2.c:187: `PATH_MAX' undeclared (first use this function)
../../gcc/config/sparc/gmon-sol2.c:187: (Each undeclared identifier is reported only once
../../gcc/config/sparc/gmon-sol2.c:187: for each function it appears in.)
make[1]: *** [gmon.o] Error 1
make[1]: Leaving directory `/home/rutt/src/egcs-1.0.2/sparc-sun-solaris2/gcc'
make: *** [cross] Error 2