This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems building Windows hosted powerpc/arm/mips-elf toolchain using Linux as build machine


I'm trying to build a powerpc/arm/mips-elf toolchain hosted on Windows using
Linux as the build machine but I'm running into the following error:

---
cd /tmp/gccbuild/build/gcc/mips-elf/soft-float/libgcc
mips-elf-gcc -v -nostdinc -isystem
/tmp/gccbuild/build/gcc/./gcc/include
-B/tmp/gccbuild/build/gcc/mips-elf/soft-float/newlib/ -isystem
/tmp/gccbuild/build/gcc/mips-elf/soft-float/newlib/targ-include
-isystem /tmp/gccbuild/src/gcc/newlib/libc/include
-B/tmp/gccbuild/build/gcc/mips-elf/soft-float/libgloss/mips
-L/tmp/gccbuild/build/gcc/mips-elf/soft-float/libgloss/libnosys
-L/tmp/gccbuild/src/gcc/libgloss/mips  -msoft-float -O2 -g -g -O2 -O2
-O2 -g -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -G 0 -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc  -I. -I. -I../../.././gcc
-I/tmp/gccbuild/src/gcc/libgcc -I/tmp/gccbuild/src/gcc/libgcc/.
-I/tmp/gccbuild/src/gcc/libgcc/../gcc
-I/tmp/gccbuild/src/gcc/libgcc/../include  -DHAVE_CC_TLS -o
_fixunssfsi.o -MT _fixunssfsi.o -MD -MP -MF _fixunssfsi.dep
-DL_fixunssfsi -c /tmp/gccbuild/src/gcc/libgcc/../gcc/libgcc2.c  \
		-DLIBGCC2_UNITS_PER_WORD=4


=>

Using built-in specs.
Target: mips-elf
Configured with: /tmp/gccbuild/src/gcc/configure --disable-libssp
--target=mips-elf --enable-languages=c,c++ --with-gnu-as --with-gnu-ld
--with-newlib --disable-shared --enable-newlib -v --enable-multilib
--disable-threads --enable-sjlj-exceptions
--enable-libstdcxx-allocator=malloc
--prefix=/tmp/gccbuild/build/install --disable-libssp
Thread model: single
gcc version 4.3.2 (GCC)
COLLECT_GCC_OPTIONS='-v' '-nostdinc' '-isystem'
'/tmp/gccbuild/build/gcc/./gcc/include'
'-B/tmp/gccbuild/build/gcc/mips-elf/soft-float/newlib/' '-isystem'
'/tmp/gccbuild/build/gcc/mips-elf/soft-float/newlib/targ-include'
'-isystem' '/tmp/gccbuild/src/gcc/newlib/libc/include'
'-B/tmp/gccbuild/build/gcc/mips-elf/soft-float/libgloss/mips'
'-L/tmp/gccbuild/build/gcc/mips-elf/soft-float/libgloss/libnosys'
'-L/tmp/gccbuild/src/gcc/libgloss/mips' '-msoft-float' '-O2' '-g' '-g'
'-O2' '-O2' '-O2' '-g' '-g' '-O2' '-DIN_GCC'
'-DCROSS_DIRECTORY_STRUCTURE' '-W' '-Wall' '-Wwrite-strings'
'-Wstrict-prototypes' '-Wmissing-prototypes' '-Wold-style-definition'
'-isystem' './include' '-G' '0' '-g' '-DIN_LIBGCC2'
'-D__GCC_FLOAT_NOT_NEEDED' '-Dinhibit_libc' '-I.' '-I.'
'-I../../.././gcc' '-I/tmp/gccbuild/src/gcc/libgcc'
'-I/tmp/gccbuild/src/gcc/libgcc/.'
'-I/tmp/gccbuild/src/gcc/libgcc/../gcc'
'-I/tmp/gccbuild/src/gcc/libgcc/../include' '-DHAVE_CC_TLS' '-o'
'_fixunssfsi.o' '-MT' '_fixunssfsi.o' '-MD' '-MP' '-MF'
'_fixunssfsi.dep' '-DL_fixunssfsi' '-c' '-DLIBGCC2_UNITS_PER_WORD=4'
 /tmp/install/bin/../libexec/gcc/mips-elf/4.3.2/cc1 -quiet -nostdinc
-v -I. -I. -I../../.././gcc -I/tmp/gccbuild/src/gcc/libgcc
-I/tmp/gccbuild/src/gcc/libgcc/. -I/tmp/gccbuild/src/gcc/libgcc/../gcc
-I/tmp/gccbuild/src/gcc/libgcc/../include -imultilib soft-float
-iprefix /tmp/install/bin/../lib/gcc/mips-elf/4.3.2/ -MD _fixunssfsi.d
-MF _fixunssfsi.dep -MP -MT _fixunssfsi.o -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED
-Dinhibit_libc -DHAVE_CC_TLS -DL_fixunssfsi -DLIBGCC2_UNITS_PER_WORD=4
-isystem /tmp/gccbuild/build/gcc/./gcc/include -isystem
/tmp/gccbuild/build/gcc/mips-elf/soft-float/newlib/targ-include
-isystem /tmp/gccbuild/src/gcc/newlib/libc/include -isystem ./include
/tmp/gccbuild/src/gcc/libgcc/../gcc/libgcc2.c -G 0 -quiet -dumpbase
libgcc2.c -msoft-float -auxbase-strip _fixunssfsi.o -g -g -g -g -g -O2
-O2 -O2 -O2 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -version -o
/tmp/cc2kmbQI.s
ignoring nonexistent directory
"/tmp/gccbuild/build/gcc/mips-elf/soft-float/newlib/targ-include"
ignoring nonexistent directory "./include"
ignoring duplicate directory "."
ignoring duplicate directory "/tmp/gccbuild/src/gcc/libgcc/."
#include "..." search starts here:
#include <...> search starts here:
 .
 ../../.././gcc
 /tmp/gccbuild/src/gcc/libgcc
 /tmp/gccbuild/src/gcc/libgcc/../gcc
 /tmp/gccbuild/src/gcc/libgcc/../include
 /tmp/gccbuild/build/gcc/./gcc/include
 /tmp/gccbuild/src/gcc/newlib/libc/include
End of search list.
GNU C (GCC) version 4.3.2 (mips-elf)
	compiled by GNU C version 4.2.3 (Debian 4.2.3-1), GMP version 4.2.2,
MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129566
Compiler executable checksum: 858a289636a17312eea8a5d89766b9d2
In file included from /tmp/gccbuild/src/gcc/libgcc/../gcc/libgcc2.c:1697:
/tmp/gccbuild/src/gcc/newlib/libc/include/limits.h:130:26: error: no
include path in which to search for limits.h

----

From /tmp/gccbuild/src/gcc/newlib/libc/include/limits.h:130:


#if defined __GNUC__ && !defined _GCC_LIMITS_H_
/* `_GCC_LIMITS_H_' is what GCC's file defines.  */
# include_next <limits.h>
#endif /* __GNUC__ && !_GCC_LIMITS_H_ */




What I did:

- built toolchain hosted on Linux, generating mips-elf target code. Added it
to the path.
- ran script below
- gcc 4.3.2, gmp 4.3.2, mpfr 2.3.1, newlib CVS HEAD(>16.0), binutils 2.18
- I messed around with trying to add the right include files without too much
luck. The problem is that I don't really know what's wrong...
- tried GCC CVS HEAD
- tried some other targets without luck, same result. (arm-elf, powerpc-eabi).
- Once I have this working for Windows, I'll be able to build Cygwin hosted
toolchains in the same fashion.

The most recent google hits I've found:

- http://sourceware.org/ml/libc-alpha/2007-03/msg00017.html


# Build toolchain for $1 target

set -e
rm -rf $GCCBUILD/gcc
#rm -rf $GCCBUILD/binutils
rm -rf $GCCBUILD/gdb
rm -rf $GCCBUILD/install

export PATH=$GCCBUILD/install/bin:$PATH

export TARGET=$1

export HOST_OPTION="--host=i586-mingw32msvc --build=i686-pc-linux-gnu"




#mkdir $GCCBUILD/binutils
#cd $GCCBUILD/binutils
#$GCCSRC/binutils/configure $HOST_OPTION --enable-multilib
--enable-interwork --target=$TARGET  --prefix=$GCCBUILD/install
#make
#make install
#cd ..


mkdir $GCCBUILD/gcc
cd $GCCBUILD/gcc
$GCCSRC/gcc/configure  $HOST_OPTION --disable-libssp --target=$TARGET
--enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib
--disable-shared --enable-newlib -v  --enable-multilib
--disable-threads --enable-sjlj-exceptions
--enable-libstdcxx-allocator=malloc  --prefix=$GCCBUILD/install
--enable-interwork --with-gmp=$GCCBUILD/gmp --with-mpfr=$GCCBUILD/mpfr
make
make install
cd ..

mkdir $GCCBUILD/gdb
cd $GCCBUILD/gdb
$GCCSRC/gdb/configure $HOST_OPTION  --target=$TARGET  --prefix=$GCCBUILD/install
make
make install
cd ..

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 XScale Cortex
JTAG debugger and flash programmer


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