crosstool and nptl

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,
I compiled a toolchain using the cross-tool (0.37) 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'.
Can someone please tell me how should I compile for NPTL?


my armeb-xscale.dat :
KERNELCONFIG=`pwd`/arm.config
TARGET=armeb-xscale-linux-gnu
TARGET_CFLAGS="-O"
GCC_EXTRA_CONFIG="--with-cpu=xscale  --enable-cxx-flags=-mcpu=xscale"
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-linuxthreads-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.


thanks,
Eran


Re: crosstool and nptl
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/crosstool-0.38/build/armeb-xscale-linux-gnu/gcc-3.4.4-glibc-2.3.3/build-glibc/assert/assert.o]
Error 1
make[2]: Leaving directory
`/home/eransha/installs/crosstool-0.38/build/armeb-xscale-linux-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/crosstool-0.38/build/armeb-xscale-linux-gnu/gcc-3.4.4-glibc-2.3.3/glibc-2.3.3'
make: *** [all] Error 2


Site Timeline