This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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] |
Hello. I have been trying to build a cross tool chain for my hobby OS with i686-elf as the target. I am using Ubuntu-7.10 gutsy, IA32 architecture.
I've successfully built binutils-2.18 and gcc-4.2.4 with the following commands.
cd $BUILD/$BINUTILS && rm -rf * $SRC/$BINUTILS/configure --target=$TARGET --prefix=$CROSSTOOLS --disable-nls make all install
#build a minimal cross-compiler first
cd $BUILD/$GCC && rm -rf *
$SRC/$GCC/configure --target=$TARGET --prefix=$CROSSTOOLS --with-gnu-as --with-gnu-ld --disable-nls --without-headers --enable-languages=c
make all-gcc make install-gcc
I don't know how to continue with newlib. I browsed newlib-1.16.0/newlib/libc/sys, I couldn't find any folder related with i[3-7]86 or x86. This means I have no place to put my crt0.S and syscalls.c. Without clues, I decided to ignore this first and built newlib bravely...
cd $BUILD/$NEWLIB && rm -rf * $SRC/$NEWLIB/configure --target=$TARGET --prefix=$CROSSTOOLS make all make install
To my surprise, it passed. I went on with the full cross-compiler building.
#build a full cross-compiler with the support of newlib
cd $BUILD/$GCC && rm -rf *
$SRC/$GCC/configure --target=$TARGET --prefix=$CROSSTOOLS --with-gnu-as --with-gnu-ld --with-headers="$CROSSTOOLS/$TARGET/include" --disable-nls --enable-languages=c
make all-gcc make install-gcc
I failed at this step with the errors below: /home/test/myos/build/gcc-4.2.4/./gcc/include/time.h:12: error: conflicting types for 'clock_t'
/home/test/myos/bin/cross/i686-elf/include/sys/types.h:104: error: previous declaration of 'clock_t' was here
What should I do to make this cross tool chain work?
Best regards, Hu Jia Yi
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |