diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2009-12-23 20:22:46 -0800 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-12-23 20:22:46 -0800 |
commit | 6f89d2f30f97211431d965993f570ed680747584 (patch) | |
tree | e39266c46f767a466ed6099f13e9fa79456f2563 /configure.in | |
parent | 63de5ef70af0eef3bc6af21463eac8e8efa74afb (diff) | |
download | glibc-6f89d2f30f97211431d965993f570ed680747584.tar glibc-6f89d2f30f97211431d965993f570ed680747584.tar.gz glibc-6f89d2f30f97211431d965993f570ed680747584.tar.bz2 glibc-6f89d2f30f97211431d965993f570ed680747584.zip |
Enable multiarch whenever possible.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 182c683e50..8e506026b8 100644 --- a/configure.in +++ b/configure.in @@ -272,12 +272,10 @@ 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=default]) +if test x"$multi_arch" != xno; then multi_arch_d=/multiarch fi -AC_SUBST(multi_arch) AC_ARG_ENABLE([experimental-malloc], AC_HELP_STRING([--enable-experimental-malloc], @@ -722,6 +720,35 @@ for b in $base ''; do done done +# If the assembler supports gnu_indirect_function symbol type and the +# architecture supports multi-arch, we enable multi-arch by default. +if test "$multi_arch" = default; 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*]) + multi_arch=no + if test "$libc_cv_asm_gnu_indirect_function" = yes; then + case $sysnames_add_ons$sysnames in + *"$multi_arch_d"*) + multi_arch=yes + ;; + esac + fi +fi +if test x"$multi_arch" = xyes; then + AC_DEFINE(USE_MULTIARCH) +fi +AC_SUBST(multi_arch) + if test -z "$os_used" && test "$os" != none; then AC_MSG_ERROR(Operating system $os is not supported.) fi |