This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

ARM NPTL


Hi, 
I compiled a toolchain using the cross-tool (0.37/8) and noticed that the 
libc was created for linuxthreads. I tried using 
GLIBC_ADDON_OPTIONS=nptl, but it ended up with an error: 
*** On GNU/Linux systems it is normal to compile GNU libc with the 
*** `linuxthreads' add-on.  Without that, the library will be 
*** incompatible with normal GNU/Linux systems. 
*** If you really mean to not use this add-on, run configure again 
*** using the extra parameter `--disable-sanity-checks'. 
 


my armeb-xscale.dat : 
KERNELCONFIG=`pwd`/arm.config 
TARGET=armeb-xscale-linux-gnu 
TARGET_CFLAGS="-O" 
GCC_EXTRA_CONFIG="--with-cpu=x­scale  --enable-cxx-flags=-mcpu=xscal­e" 
BINUTILS_DIR=binutils-2.15 
GCC_DIR=gcc-3.4.4 
GLIBC_DIR=glibc-2.3.3 
GLIBC_ADDON_OPTIONS=nptl 
LINUX_DIR=linux-2.6.12 
GLIBCTHREADS_FILENAME=glibc-li­nuxthreads-2.3.3 


and the relevant sh file is: 
#!/bin/sh 
set -ex 
TARBALLS_DIR=$HOME/downloads 
RESULT_TOP=/opt/crosstool 
export TARBALLS_DIR RESULT_TOP 
GCC_LANGUAGES="c,c++" 
export GCC_LANGUAGES 


# Really, you should do the mkdir before running this, 
# and chown /opt/crosstool to yourself so you don't need to run as 
root. 
mkdir -p $RESULT_TOP 


# Build the toolchain.  Takes a couple hours and a couple gigabytes. 


# gcc-3.3 doesn't support this, need gcc-3.4 
#eval `cat arm-xscale.dat gcc-3.4.0-glibc-2.3.2.dat` sh all.sh --notest 
#eval `cat arm-xscale.dat gcc-3.4.1-glibc-2.3.3.dat` sh all.sh --notest 
#eval `cat arm-xscale.dat gcc-3.4.1-glibc-20040827.dat` sh all.sh 
--notest 
 eval `cat armeb-xscale.dat gcc-3.4.2-glibc-20040827.dat` sh all.sh 
--notest 


echo Done. 

*************
I tried again now adding the GLIBC_EXTRA_CONFIG="--with-tls 
--with-__thread --disable-sanity-checks" but got the following: 


                 from assert.c:42: 
../include/pthread.h:1:26: pthread.h: No such file or directory 
assert.c: In function `__assert_fail': 
assert.c:53: error: `pthread_setcancelstate' undeclared (first use in 
this function) 
assert.c:53: error: (Each undeclared identifier is reported only once 
assert.c:53: error: for each function it appears in.) 
assert.c:53: warning: implicit declaration of function 
`pthread_setcancelstate' 
assert.c:53: error: `PTHREAD_CANCEL_DISABLE' undeclared (first use in 
this function) 
make[2]: *** 
[/home/eransha/installs/crosst­ool-0.38/build/armeb-xscale-li­nux-gnu/gcc-3.4.4-glibc-2.3.3/­build-glibc/assert/assert.o]
Error 1 
make[2]: Leaving directory 
`/home/eransha/installs/crosst­ool-0.38/build/armeb-xscale-li­nux-gnu/gcc-3.4.4-glibc-2.3.3/­glibc-2.3.3/assert'
make[1]: *** [assert/subdir_lib] Error 2 
make[1]: Leaving directory 
`/home/eransha/installs/crosst­ool-0.38/build/armeb-xscale-li­nux-gnu/gcc-3.4.4-glibc-2.3.3/­glibc-2.3.3'
make: *** [all] Error 2 

I found out that the problem here was that the search path for the
including pthread.h included by another header that was included by
assert.c, is not true.
But I find it hard to beleive that this is the problem. My guess is
that I'm doing something wrong.

Can someone please tell me how should I compile for NPTL?

thanks, 
Eran

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


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