glibc/sysdeps/i386/elf/configure.in
Roland McGrath fe27057d17 * elf/tls-macros.h (TLS_LD, TLS_GD): Use call insn, not callq.
* sysdeps/unix/x86_64/sysdep.S [USE_TLS && HAVE___THREAD] [! PIC]:
	Use direct-%fs form of TLS access for errno.

	* sysdeps/unix/sysv/linux/i386/i686/sysdep.h: File removed, since
	the i386 version has all the same asm now.

	* sysdeps/i386/elf/configure.in: Add @GOTNTPOFF and @NTPOFF uses to
	the TLS support check.
	* sysdeps/i386/elf/configure: Regenerated.

	* sysdeps/unix/sysv/linux/i386/sysdep.h [USE_TLS && HAVE___THREAD]
	(SYSCALL_ERROR_HANDLER): Use direct-%gs form of TLS access for errno.

	* sysdeps/unix/i386/sysdep.S (syscall_error)
	[USE_TLS && HAVE___THREAD]: Use TLS access for errno.
2002-09-30 10:26:59 +00:00

40 lines
1 KiB
Plaintext

sinclude(./aclocal.m4)dnl Autoconf lossage
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
# Local configure fragment for sysdeps/i386/elf.
if test "$usetls" != no; then
# Check for support of thread-local storage handling in assembler and
# linker.
AC_CACHE_CHECK(for i386 TLS support, libc_cv_386_tls, [dnl
cat > conftest.s <<\EOF
.section ".tdata", "awT", @progbits
.globl foo
foo: .long 1
.section ".tbss", "awT", @nobits
.globl bar
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
dnl
if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AC_FD_CC); then
libc_cv_386_tls=yes
else
libc_cv_386_tls=no
fi
rm -f conftest*])
if test $libc_cv_386_tls = yes; then
AC_DEFINE(HAVE_TLS_SUPPORT)
fi
fi
dnl It is always possible to access static and hidden symbols in an
dnl position independent way.
AC_DEFINE(PI_STATIC_AND_HIDDEN)