how to build glibc without any thread support?
Robert P. J. Day
rpjday@mindspring.com
Wed Oct 5 20:45:00 GMT 2005
(apologies to the couple folks i emailed offline, since they'll see
this a second time.)
i've fought with this for the last couple of hours so i'm looking
for advice. eventually, i want to build my toolchain with NPTL
support but, as a warmup, i'm trying to build with no thread support
whatever. first question -- is that even possible?
if it is, here's the salient bit of shell script to build glibc:
GLIBC_SRC_DIR=${BUILD_DIR}/glibc-${GLIBC_VERSION}
rm -rf ${BUILD_DIR}/build-glibc
mkdir -p ${BUILD_DIR}/build-glibc
echo ${GLIBC_CONFIGPARMS} > configparms
BUILD_CC=gcc \
CFLAGS="${TARGET_CFLAGS} ${EXTRA_TARGET_CFLAGS}" \
CC="${TARGET}-gcc ${GLIBC_EXTRA_CC_ARGS}" \
AR=${TARGET}-ar \
RANLIB=${TARGET}-ranlib \
${GLIBC_SRC_DIR}/configure \
--build=${HOST} \
--host=${TARGET} \
${GLIBC_EXTRA_CONFIG} \
--prefix=/usr \
--enable-shared \
--disable-profile \
--disable-debug \
--disable-sanity-checks \
--without-cvs \
--without-tls \
--without-__thread \
--with-headers=${HEADERS_DIR}
make \
LD=${TARGET}-ld \
RANLIB=${TARGET}-ranlib \
lib
...
running the above generates the following:
...
make[2]: Entering directory
`/home/rpjday/results/jornada/build-tools/glibc-2.3.5/assert'
sh3-unknown-linux-gnu-gcc assert.c -c -std=gnu99 -O -Wall -Winline
-Wstrict-prototypes -Wwrite-strings -m3 -ml
-DFATAL_PREPARE_INCLUDE='<fatal-prepare.h>' -I../include -I.
-I/home/rpjday/ct/assert -I.. -I../libio -I/home/rpjday/ct
-I../sysdeps/sh/elf -I../sysdeps/unix/sysv/linux/sh/sh3
-I../sysdeps/unix/sysv/linux/sh -I../sysdeps/unix/sysv/linux
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/sh
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/sh/sh3
-I../sysdeps/sh -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem
/home/rpjday/results/jornada/build-tools/gcc-core-prefix/lib/gcc/sh3-unknown-linux-gnu/4.0.2/include
-isystem
/home/rpjday/results/jornada/tools/sh3-unknown-linux-gnu/sys-root/usr/include
-include ../include/libc-symbols.h -o
/home/rpjday/ct/assert/assert.o -MD -MP -MF
/home/rpjday/ct/assert/assert.o.dt -MT /home/rpjday/ct/assert/assert.o
In file included from ../sysdeps/unix/sysv/linux/fatal-prepare.h:19,
from assert.c:42:
../include/pthread.h:1:26: error: 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/rpjday/ct/assert/assert.o] Error 1
make[2]: Leaving directory
`/home/rpjday/results/jornada/build-tools/glibc-2.3.5/assert'
make[1]: *** [assert/subdir_lib] Error 2
make[1]: Leaving directory
`/home/rpjday/results/jornada/build-tools/glibc-2.3.5'
make: *** [lib] Error 2
without getting into horrendous detail, should i be surprised to see
an error message about not finding pthread.h when i'm trying really
hard to avoid threads entirely? is there something obvious i should
be checking? thanks for any suggestions.
rday
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list