This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH 02/13] Merge contents from sysdeps/i386/configure.in into x86_64 version
- From: Andreas Jaeger <aj at suse dot de>
- To: libc-alpha at sourceware dot org
- Cc: Andreas Jaeger <aj at suse dot de>
- Date: Fri, 23 Mar 2012 17:37:22 +0100
- Subject: [PATCH 02/13] Merge contents from sysdeps/i386/configure.in into x86_64 version
- References: <remove-elf-20120323><1332520653-2774-1-git-send-email-aj@suse.de>
* sysdeps/x86_64/configure.in: Merge contents from
sysdeps/i386/configure.in (without i686 check).
---
sysdeps/x86_64/configure.in | 81 ++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 80 insertions(+), 1 deletions(-)
diff --git a/sysdeps/x86_64/configure.in b/sysdeps/x86_64/configure.in
index c53328b..c1f6141 100644
--- a/sysdeps/x86_64/configure.in
+++ b/sysdeps/x86_64/configure.in
@@ -1,5 +1,84 @@
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
-# Local configure fragment for sysdeps/x86_64/elf.
+# Local configure fragment for sysdeps/x86_64.
+
+AC_CHECK_HEADER([cpuid.h], ,
+ [AC_MSG_ERROR([gcc must provide the <cpuid.h> header])],
+ [/* No default includes. */])
+
+AC_CACHE_CHECK(if -g produces usable source locations for assembler-with-cpp,
+ libc_cv_cpp_asm_debuginfo, [dnl
+cat > conftest.S <<EOF
+#include "confdefs.h"
+
+/* comment on
+ two lines */
+ ${libc_cv_dot_text}
+ ${libc_cv_asm_global_directive} foo
+foo:
+ /* Unfortunately this test only works for a real instruction,
+ not for any of the machine-independent pseudo-ops.
+ So we just have to assume everybody has a "nop". */
+ nop
+ /* comment */
+ nop
+ /* comment */
+ nop
+EOF
+if AC_TRY_COMMAND([${CC-cc} $CPPFLAGS $ASFLAGS -g -c conftest.S 1>&AS_MESSAGE_LOG_FD]) && {
+ ac_pattern='conftest\.S'
+ AC_TRY_COMMAND([readelf --debug-dump=line conftest.o |
+ grep $ac_pattern 1>&AS_MESSAGE_LOG_FD])
+ }; then
+ libc_cv_cpp_asm_debuginfo=yes
+else
+ libc_cv_cpp_asm_debuginfo=no
+fi
+rm -f conftest*])AC_SUBST(libc_cv_cpp_asm_debuginfo)
+if test $libc_cv_cpp_asm_debuginfo = yes; then
+ AC_DEFINE(HAVE_CPP_ASM_DEBUGINFO)
+fi
+
+dnl Check if -msse4 works.
+AC_CACHE_CHECK(for SSE4 support, libc_cv_cc_sse4, [dnl
+LIBC_TRY_CC_OPTION([-msse4], [libc_cv_cc_sse4=yes], [libc_cv_cc_sse4=no])
+])
+if test $libc_cv_cc_sse4 = yes; then
+ AC_DEFINE(HAVE_SSE4_SUPPORT)
+fi
+
+dnl Check if -mavx works.
+AC_CACHE_CHECK(for AVX support, libc_cv_cc_avx, [dnl
+LIBC_TRY_CC_OPTION([-mavx], [libc_cv_cc_avx=yes], [libc_cv_cc_avx=no])
+])
+if test $libc_cv_cc_avx = yes; then
+ AC_DEFINE(HAVE_AVX_SUPPORT)
+fi
+
+dnl Check if -msse2avx works.
+AC_CACHE_CHECK(for AVX encoding of SSE instructions, libc_cv_cc_sse2avx, [dnl
+LIBC_TRY_CC_OPTION([-msse2avx],
+ [libc_cv_cc_sse2avx=yes],
+ [libc_cv_cc_sse2avx=no])
+])
+if test $libc_cv_cc_sse2avx = yes; then
+ AC_DEFINE(HAVE_SSE2AVX_SUPPORT)
+fi
+
+dnl Check if -mfma4 works.
+AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
+LIBC_TRY_CC_OPTION([-mfma4], [libc_cv_cc_fma4=yes], [libc_cv_cc_fma4=no])
+])
+if test $libc_cv_cc_fma4 = yes; then
+ AC_DEFINE(HAVE_FMA4_SUPPORT)
+fi
+
+dnl Check if -mno-vzeroupper works.
+AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl
+LIBC_TRY_CC_OPTION([-mno-vzeroupper],
+ [libc_cv_cc_novzeroupper=yes],
+ [libc_cv_cc_novzeroupper=no])
+])
+
# Check for support of thread-local storage handling in assembler and linker.
AC_CACHE_CHECK(for x86-64 TLS support, libc_cv_x86_64_tls, [dnl
--
1.7.7