aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-03-13 23:53:18 +0000
committerUlrich Drepper <drepper@redhat.com>2009-03-13 23:53:18 +0000
commit425ce2edb9d11cc1ff650fac16dfbc450241896a (patch)
treeb3bd9971ea82766a895ab549ff194d97bcc9d51e /configure.in
parente7f110cdbd6e9c5a48b378ba7b30a3ad1dc04314 (diff)
downloadglibc-425ce2edb9d11cc1ff650fac16dfbc450241896a.zip
glibc-425ce2edb9d11cc1ff650fac16dfbc450241896a.tar.gz
glibc-425ce2edb9d11cc1ff650fac16dfbc450241896a.tar.bz2
* config.h.in (USE_MULTIARCH): Define.
* configure.in: Handle --enable-multi-arch. * elf/dl-runtime.c (_dl_fixup): Handle STT_GNU_IFUNC. (_dl_fixup_profile): Likewise. * elf/do-lookup.c (dl_lookup_x): Likewise. * sysdeps/x86_64/dl-machine.h: Handle STT_GNU_IFUNC. * elf/elf.h (STT_GNU_IFUNC): Define. * include/libc-symbols.h (libc_ifunc): Define. * sysdeps/x86_64/cacheinfo.c: If USE_MULTIARCH is defined, use the framework in init-arch.h to get CPUID values. * sysdeps/x86_64/multiarch/Makefile: New file. * sysdeps/x86_64/multiarch/init-arch.c: New file. * sysdeps/x86_64/multiarch/init-arch.h: New file. * sysdeps/x86_64/multiarch/sched_cpucount.c: New file. * config.make.in (experimental-malloc): Define. * configure.in: Handle --enable-experimental-malloc. * malloc/Makefile: Handle experimental-malloc flag. * malloc/malloc.c: Implement PER_THREAD and ATOMIC_FASTBINS features. * malloc/arena.c: Likewise. * malloc/hooks.c: Likewise. * malloc/malloc.h: Define M_ARENA_TEST and M_ARENA_MAX.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in43
1 files changed, 42 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index d7b22f3..4015722 100644
--- a/configure.in
+++ b/configure.in
@@ -254,6 +254,24 @@ AC_ARG_ENABLE([all-warnings],
[])
AC_SUBST(all_warnings)
+AC_ARG_ENABLE([multi-arch],
+ AC_HELP_STRING([--enable-multi-arch],
+ [enable single DSO with optimizations for multiple architectures]),
+ [multi_arch=$enableval],
+ [multi_arch=no])
+if test x"$multi_arch" = xyes; then
+ AC_DEFINE(USE_MULTIARCH)
+ multi_arch_d=/multiarch
+fi
+AC_SUBST(multi_arch)
+
+AC_ARG_ENABLE([experimental-malloc],
+ AC_HELP_STRING([--enable-experimental-malloc],
+ [enable experimental malloc features]),
+ [experimental_malloc=$enableval],
+ [])
+AC_SUBST(experimental_malloc)
+
AC_CANONICAL_HOST
# The way shlib-versions is used to generate soversions.mk uses a
@@ -608,7 +626,7 @@ for b in $base ''; do
test "$v" = / && continue
for o in /$ostry ''; do
test "$o" = / && continue
- for m in $mach ''; do
+ for m in $multi_arch_d $mach ''; do
for d in $add_ons_pfx ''; do
for a in $add_ons_sfx ''; do
if test -n "$m0$m0sub$b$v$o$m$msub"; then
@@ -1157,6 +1175,29 @@ if test "x$libc_cv_asm_type_prefix" != xno; then
AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
fi
+# For the multi-arch option we need support in the assembler.
+if test "$multi_arch" = yes; then
+ if test "x$libc_cv_asm_type_prefix" != xno; then
+AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
+ libc_cv_asm_gnu_indirect_function, [dnl
+cat > conftest.s <<EOF
+.type foo,%gnu_indirect_function
+EOF
+if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+ libc_cv_asm_gnu_indirect_function=yes
+else
+ libc_cv_asm_gnu_indirect_function=no
+fi
+rm -f conftest*])
+ else
+ libc_cv_asm_gnu_indirect_function=no
+ fi
+ if test x"$libc_cv_asm_gnu_indirect_function" != xyes; then
+ AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
+ fi
+fi
+
AC_CACHE_CHECK(for .symver assembler directive, libc_cv_asm_symver_directive,
[cat > conftest.s <<EOF
${libc_cv_dot_text}