DSL Ideas and Suggestions :: libc NPTL/TLS & Wine



Error when building:
Code Sample
nptl/sysdeps/i386/tls.h:58:3: #error "TLS support is required."

Since kernel 2.4 does not support TLS, NPTL also will not work.

...so it only works when running a 2.6 kernel...
I managed to compile it, but got this:
Code Sample
$ /opt/build/lib/libc.so.6
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.5 (Debian 1:3.3.5-13).
Compiled on a Linux 2.6.0-test7 system on 2007-10-10.
Available extensions:
       GNU libio by Per Bothner
       crypt add-on version 2.1 by Michael Glad and others
       linuxthreads-0.10 by Xavier Leroy
       BIND-8.2.3-T5B
       libthread_db work sponsored by Alpha Processor Inc
       NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Report bugs using the `glibcbug' script to <bugs@gnu.org>.

This is the configuration I used:
Code Sample
From a separate build directory:
../glibc-2.3.6/configure --prefix=/glibc-nptl --disable-profile --enable-omitfp --enable-add-ons --enable-kernel=2.4.0 --disable-force-install --without-tls
Explanation:
Code Sample
'--prefix=/glibc-nptl' - To avoid installing into '/lib', which will overwrite your system glibc
'--disable-profile' - Disabled profiling since we are optimizing for size ('-Os')
'--enable-omitfp' - Actually not needed since I already have '-fomit-frame-pointer' in $CFLAGS ('-Os -march=i486 -fomit-frame-pointer -pipe')
'--enable-add-ons' - ** This will enable the NPTL addon; linuxthreads is disabled in favour of NPTL. **
'--enable-kernel=2.4.0' - Support for kernel version 2.4.0 and later
'--disable-force-install' - Disables forced installation
'--without-tls' - Build without TLS support
'--enable-addons' conflicts with '--without-tls' because NPTL cannot build without TLS.
I used glibc 2.3.6 because I had the following problem with 2.3.2 during 'configure', and I don't know how to solve it:
Code Sample
running configure fragment for nptl/sysdeps/pthread
configure: error: CFI directive support in assembler is required
I was using a 'debootstrap' chroot of Debian Sarge with binutils 2.15-6. I wiped it and replaced it with a 'debootstrap' of Debian Etch. Etch has binutils 2.17; but I get the same error.

OK, mine was:
Code Sample
../glibc-2.3.2/configure --prefix=/opt/build --enable-shared --enable-add-ons --enable-kernel=2.4.26

...using debian sarge debs to make a compile environment with dsl. Note that the glibc sources were patched with glibc-2.3.2-sscanf-1.patch first. Did you add TLS to the base glibc binary from somewhere - i.e. in the same way as adding from glibc-linuxthreads-2.3.2.tar.bz2?

Next Page...
original here.