This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
[Patch] glibc-2.3 compile --with-tls using gcc-3.2 unpached
- From: Stefan Jones <stefan dot jones at multigig dot com>
- To: libc-alpha at sources dot redhat dot com
- Date: 09 Oct 2002 12:53:10 +0100
- Subject: [Patch] glibc-2.3 compile --with-tls using gcc-3.2 unpached
Dear Sirs,
If you use the correct version of binutils (2.13.90.0.4) and gcc (3.2)
you get compiler error with undefinded sysbols in
glibc-2.3/include/ctype.h
This is because of a typo in glibc-2.3/sysdeps/generic/bits/libc-tsd.h.
Also the asm instructions in glibc-2.3/sysdeps/i386/elf/configure seem
wrong (another typo, but I don't do assembler) thus the --with-tls
configure check always fails.
Plz CC me in any replys
Stafan Jones
Below are the patches:
--- glibc-2.3/sysdeps/i386/elf/configure.orig 2002-10-02 07:21:01.000000000 +0000
+++ glibc-2.3/sysdeps/i386/elf/configure 2002-10-08 19:17:44.000000000 +0000
@@ -17,12 +17,6 @@
bar: .skip 4
.text
baz: leal bar@TLSLDM(%ebx), %eax
- leal bar@DTPOFF(%eax), %edx
- subl foo@GOTTPOFF(%edx), %eax
- subl $bar@TPOFF, %eax
- movl foo@GOTNTPOFF(%edx), %ecx
- movl %gs:(%ecx), %eax
- movl %gs:bar@NTPOFF, %eax
EOF
if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5'; { (eval echo configure:28: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
libc_cv_386_tls=yes
--- glibc-2.3/sysdeps/generic/bits/libc-tsd.h.orig 2002-10-09 11:10:01.000000000 +0000
+++ glibc-2.3/sysdeps/generic/bits/libc-tsd.h 2002-10-09 11:08:56.000000000 +0000
@@ -60,7 +60,7 @@
#else
# define __libc_tsd_define(CLASS, KEY) CLASS void *__libc_tsd_##KEY##_data;
-# define __libc_tsd_address(KEY) (&__libc_tsd_##KEY)
+# define __libc_tsd_address(KEY) (&__libc_tsd_##KEY##_data)
# define __libc_tsd_get(KEY) (__libc_tsd_##KEY##_data)
# define __libc_tsd_set(KEY, VALUE) (__libc_tsd_##KEY##_data = (VALUE))
#endif
--
***************************************************************
*MultiGiG Ltd *Phone: +44(0)1933 273733 *
*Unit 1, The Old Granary *Fax: +44(0)1933 273795 *
*Grange Farm, Wellingborough *Web: www.multigig.com *
*Northants, UK, NN8 1RF *e-mail:stefan.jones@multigig.com*
***************************************************************