This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

can not crosscompile gcc-2.95.2 with glibc-2.1.3 headers


   Hi

    Thanks for the work around with newlib, I has able to make a cross
compiler for mips, using redhat 6.2 for x86, based on newlib.

The work around for the unistd.h and stdlib.h not found is
   ( Thanks to Joćo for supplying the fix )

 cd <gcc-src-dir>/gcc-2.95.2
 ln -s <newlib-src-dir>/newlib-1.8.2/newlib newlib
 ln -s <newlib-src-dir>/newlib-1.8.2/libgloss libgloss

However I tried to create a crossGCC based on the includes for
glibc-2.1.3, and the linux 2.4.0 kernel includes.  Ouch.



Building the cross binutils is ok.
In directory  build-utl

 ../binutils-2.10/configure --target=mips-linux --prefix=/export/cross2/mips -v

-----------------------------------------------------------------------------------
Then  setup for gcc-2.95.2

     moved crypt and linuxthreads  into glibc-2.1.3/

     in /export/cross2/mips/mips-linux/include
     moved the linux 2.4.0 kernel headers in place
     moved asm-mips inplace
     link  asm-mips -- asm

     PATH=/export/cross2/mips/bin:$PATH export PATH

In directory build-gcc
   ../gcc-2.95.2/configure --target=mips-linux
--prefix=/export/cross2/mips --with-headers=../glibc-2.1.3/include -v


make all LANGUAGES="c"


Build Failed reason

In file included from ../../gcc-2.95.2/gcc/libgcc2.c:41:
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/stdlib.h:7: stdlib/stdlib.h: No such file or directory
In file included from ../../gcc-2.95.2/gcc/libgcc2.c:42:
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/unistd.h:2: posix/unistd.h: No such file or directory
make[1]: *** [libgcc2.a] Error 1
make[1]: Leaving directory `/home/douglas/ouch/build-gcc/gcc'
make: *** [all-gcc] Error 2
------------------------------------------------------------------------------------------

make clean

changed the makefile to match posting of the internet group In
gcc/Makefile changed
# Additional target-dependent options for compiling libgcc2.a.
TARGET_LIBGCC2_CFLAGS =
to
# Additional target-dependent options for compiling libgcc2.a.
TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc

make all LANGUAGES="c"

this fails at


floatdidf
_floatdisf
_fixunsdfsi
In file included from
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/features.h:250,
                 from
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/limits.h:26,
                 from
/home/douglas/ouch/build-gcc/gcc/include/limits.h:117,
                 from include/limits.h:117,
                 from include/syslimits.h:7,
                 from include/limits.h:11,
                 from ../../gcc-2.95.2/gcc/libgcc2.c:1105:
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/sys/cdefs.h:1: misc/sys/cdefs.h: No such file or directory
In file included from
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/limits.h:26,
                 from
/home/douglas/ouch/build-gcc/gcc/include/limits.h:117,
                 from include/limits.h:117,
                 from include/syslimits.h:7,
                 from include/limits.h:11,
                 from ../../gcc-2.95.2/gcc/libgcc2.c:1105:
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/features.h:278: gnu/stubs.h: No such file or directory
In file included from
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/limits.h:30,
                 from
/home/douglas/ouch/build-gcc/gcc/include/limits.h:117,
                 from include/limits.h:117,
                 from include/syslimits.h:7,
                 from include/limits.h:11,
                 from ../../gcc-2.95.2/gcc/libgcc2.c:1105:
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/bits/posix1_lim.h:1: posix/bits/posix1_lim.h: No such file or directory
In file included from
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/limits.h:34,
                 from
/home/douglas/ouch/build-gcc/gcc/include/limits.h:117,
                 from include/limits.h:117,
                 from include/syslimits.h:7,
                 from include/limits.h:11,
                 from ../../gcc-2.95.2/gcc/libgcc2.c:1105:
/export/cross2/mips/lib/gcc-lib/mips-linux/2.95.2/../../../../mips-linux/sys-include/bits/posix2_lim.h:1: posix/bits/posix2_lim.h: No such file or directory
make[1]: *** [libgcc2.a] Error 1



  Does any one know the work adound for this, or di I take a wrong step
somewhere ?


    Thanks

    Douglas



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]