Hi again!! I've tried this as toolchain, I think that this can prevent my makefile of being correctly executed: #! /bin/sh # Variables export gcc_version=4.0.0 export binutils_version=2.16.1 export srcdir=$(pwd) export target=arm-linux export prefix=/opt/eldk/usr/ export PATH="$prefix/bin":"$PATH" # Unpack tar jxf binutils-${binutils_version}.tar.bz2 tar jxf gcc-core-${gcc_version}.tar.bz2 tar jxf gcc-${gcc_version}.tar.bz2 tar zxf newlib-1.14.0.tar.gz # tar jxf insight-6.5.tar.bz2 cp -f arm-linux gcc-${gcc_version}/gcc/config/arm # Build mkdir -p $prefix # binutils cd $prefix mkdir build-binutils cd build-binutils ${srcdir}/binutils-${binutils_version}/configure \ --target=$target --prefix=$prefix \ --enable-interwork --enable-multilib --with-float=soft make all install # gcc core cd $prefix mkdir build-gcc cd build-gcc ${srcdir}/gcc-${gcc_version}/configure --target=$target --prefix=$prefix \ --enable-interwork --enable-multilib --with-float=soft \ --enable-languages="c" --with-newlib \ --with-headers=${srcdir}/newlib-1.14.0/newlib/libc/include make all-gcc install-gcc # newlib # newlib wants arm-linux-cc but there is only arm-linux-gcc, so we make a link cd $prefix/bin ln -s arm-linux-gcc arm-linux-cc cd $prefix mkdir build-newlib cd build-newlib ${srcdir}/newlib-1.14.0/configure --target=$target --prefix=$prefix \ --enable-multilib --enable-interwork --with-float=soft make all install # gcc rest cd $prefix/build-gcc make all install # insight (gdb) # cd $prefix # mkdir build-insight # cd build-insight # ${srcdir}/insight-6.5/configure --target=$target --prefix=$prefix \ # --with-gnu-as --with-gnu-ld \ # --enable-interwork --enable-multilib --with-float=soft # make all install # gdb # # cd $prefix # mkdir build-gdb # cd build-gdb # ${srcdir}/gdb-6.5/configure --target=$target --prefix=$prefix \ # --with-gnu-as --with-gnu-ld \ # --enable-multilib --enable-interwork --with-float=soft # make all install But I got these errors when I execute the script: from /opt/eldk/usr/gcc-4.0.0/gcc/gthr.h:114, from /opt/eldk/usr/gcc-4.0.0/gcc/unwind-dw2.c:42: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:46: error: parse error before ‘__gthread_key_t’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:46: warning: type defaults to ‘int’ in declaration of ‘__gthread_key_t’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:46: warning: data definition has no type or storage class /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:47: error: parse error before ‘__gthread_once_t’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:47: warning: type defaults to ‘int’ in declaration of ‘__gthread_once_t’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:47: warning: data definition has no type or storage class /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:48: error: parse error before ‘__gthread_mutex_t’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:48: warning: type defaults to ‘int’ in declaration of ‘__gthread_mutex_t’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:48: warning: data definition has no type or storage class /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:49: error: parse error before ‘__gthread_recursive_mutex_t’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:49: warning: type defaults to ‘int’ in declaration of ‘__gthread_recursive_mutex_t’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:49: warning: data definition has no type or storage class /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_active_p’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:110: error: ‘pthread_cancel’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:110: error: (Each undeclared identifier is reported only once /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:110: error: for each function it appears in.) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:474: error: parse error before ‘*’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:474: error: parse error before ‘)’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:483: error: parse error before ‘*’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:483: error: parse error before ‘)’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:489: error: parse error before ‘key’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:490: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_key_delete’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:490: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:491: warning: implicit declaration of function ‘pthread_key_delete’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:491: error: ‘key’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:495: error: parse error before ‘key’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:496: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_getspecific’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:496: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:497: warning: implicit declaration of function ‘pthread_getspecific’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:497: error: ‘key’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:497: warning: return makes pointer from integer without a cast /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:501: error: parse error before ‘key’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:502: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_setspecific’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:502: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:503: warning: implicit declaration of function ‘pthread_setspecific’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:503: error: ‘key’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:503: error: ‘ptr’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:507: error: parse error before ‘*’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:508: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_mutex_lock’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:508: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:510: warning: implicit declaration of function ‘pthread_mutex_lock’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:510: error: ‘mutex’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:516: error: parse error before ‘*’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:517: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_mutex_trylock’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:517: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:519: warning: implicit declaration of function ‘pthread_mutex_trylock’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:519: error: ‘mutex’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:525: error: parse error before ‘*’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:526: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_mutex_unlock’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:526: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:528: warning: implicit declaration of function ‘pthread_mutex_unlock’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:528: error: ‘mutex’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:535: error: parse error before ‘*’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:536: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_recursive_mutex_init_function’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:536: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:539: error: ‘pthread_mutexattr_t’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:539: error: parse error before ‘attr’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:542: warning: implicit declaration of function ‘pthread_mutexattr_init’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:542: error: ‘attr’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:544: warning: implicit declaration of function ‘pthread_mutexattr_settype’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:544: error: ‘PTHREAD_MUTEX_RECURSIVE’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:546: warning: implicit declaration of function ‘pthread_mutex_init’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:546: error: ‘mutex’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:548: warning: implicit declaration of function ‘pthread_mutexattr_destroy’ /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:555: error: parse error before ‘*’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:556: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_recursive_mutex_lock’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:556: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:557: error: ‘mutex’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:561: error: parse error before ‘*’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:562: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_recursive_mutex_trylock’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:562: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:563: error: ‘mutex’ undeclared (first use in this function) /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: At top level: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:567: error: parse error before ‘*’ token /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:568: warning: function declaration isn’t a prototype /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h: In function ‘__gthread_recursive_mutex_unlock’: /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:568: warning: old-style function definition /opt/eldk/usr/gcc-4.0.0/gcc/gthr-posix.h:569: error: ‘mutex’ undeclared (first use in this function) make[2]: *** [libgcc/./unwind-dw2.o] Erreur 1 make[2]: quittant le répertoire « /opt/eldk/usr/build-gcc/gcc » make[1]: *** [libgcc.a] Erreur 2 make[1]: quittant le répertoire « /opt/eldk/usr/build-gcc/gcc » make: *** [all-gcc] Erreur 2 Can you help me please???
Since you are going to build a toolchain yourself why are for a linux target? AFAIK lejos for the nxt should be build with a arm-elf (non-linux) toolchain TARGET_PREFIX :=arm-elf CC := $(COMP_PATH)/bin/$(TARGET_PREFIX)-gcc
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.