adding NPTL support to the toolchain build process
Mike Frysinger
vapier@gentoo.org
Wed Nov 9 14:38:00 GMT 2005
On Wed, Nov 09, 2005 at 09:02:02AM -0500, Robert P. J. Day wrote:
> that is, where to add --enable-threads, --with-__thread and so on?
> i'm sure i'm just missing a critical option somewhere. thanks.
find attached a simple .c file to test your gcc ... just run
<your gcc> -c test-__thread.c
if your gcc is new enough for the target, it should work regardless, but if it
isnt, you'll get an error like:
test-__thread.c:1: error: thread-local storage not supported for this target
the --disable-threads option in gcc shouldnt matter ... for example, consider
gcc-3.4.4 for arm and sparc targets ... the arm toolchain is a 'full'
toolchain as in it supports threads/C/C++/etc... while the sparc toolchain is
a stage1 as in it does not support threads, just C since it lacks a libc still
$ arm-softfloat-linux-uclibc-gcc -c test-__thread.c
test-__thread.c:1: error: thread-local storage not supported for this target
$ arm-softfloat-linux-uclibc-gcc -v
Configured with:
/var/tmp/cross/arm-softfloat-linux-uclibc/portage/gcc-3.4.4-r1/work/gcc-3.4.4/configure
--prefix=/usr --bindir=/usr/arm-softfloat-linux-uclibc/gcc-bin/3.4.4
--includedir=/usr/lib/gcc/arm-softfloat-linux-uclibc/3.4.4/include
--datadir=/usr/share/gcc-data/arm-softfloat-linux-uclibc/3.4.4
--mandir=/usr/share/gcc-data/arm-softfloat-linux-uclibc/3.4.4/man
--infodir=/usr/share/gcc-data/arm-softfloat-linux-uclibc/3.4.4/info
--with-gxx-include-dir=/usr/lib/gcc/arm-softfloat-linux-uclibc/3.4.4/include/g++-v3
--host=x86_64-pc-linux-gnu --target=arm-softfloat-linux-uclibc
--build=x86_64-pc-linux-gnu --disable-altivec --with-float=soft --enable-nls
--without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c,c++
--with-sysroot=/usr/arm-softfloat-linux-uclibc --disable-__cxa_atexit
--enable-target-optspace --enable-clocale=uclibc
Thread model: posix
gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
$ sparc-gentoo-linux-uclibc-gcc -c test-__thread.c
$ sparc-gentoo-linux-uclibc-gcc -v
Reading specs from /usr/lib/gcc/sparc-gentoo-linux-uclibc/3.4.4/specs
Configured with:
/var/tmp/cross/sparc-gentoo-linux-uclibc/portage/gcc-3.4.4-r1/work/gcc-3.4.4/configure
--prefix=/usr --bindir=/usr/sparc-gentoo-linux-uclibc/gcc-bin/3.4.4
--includedir=/usr/lib/gcc/sparc-gentoo-linux-uclibc/3.4.4/include
--datadir=/usr/share/gcc-data/sparc-gentoo-linux-uclibc/3.4.4
--mandir=/usr/share/gcc-data/sparc-gentoo-linux-uclibc/3.4.4/man
--infodir=/usr/share/gcc-data/sparc-gentoo-linux-uclibc/3.4.4/info
--with-gxx-include-dir=/usr/lib/gcc/sparc-gentoo-linux-uclibc/3.4.4/include/g++-v3
--host=x86_64-pc-linux-gnu --target=sparc-gentoo-linux-uclibc
--build=x86_64-pc-linux-gnu --disable-altivec --enable-nls
--without-included-gettext --with-system-zlib --disable-checking
--disable-werror --disable-libunwind-exceptions --disable-multilib
--disable-libgcj --enable-languages=c --disable-shared --disable-threads
--without-headers --disable-__cxa_atexit --enable-target-optspace
--enable-clocale=uclibc
Thread model: single
gcc version 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)
-mike
-------------- next part --------------
extern __thread int i;
int main() {
return 0;
}
-------------- next part --------------
------
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