From 9d639b991868f8d139385d4dc4bed6dd6a65c8a6 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 19 Mar 2012 20:55:26 +0100 Subject: Move x86_64/elf files to x86_64 --- sysdeps/x86_64/configure.in | 33 +++++++++++ sysdeps/x86_64/elf/configure.in | 33 ----------- sysdeps/x86_64/elf/start.S | 128 ---------------------------------------- sysdeps/x86_64/start.S | 128 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 161 insertions(+), 161 deletions(-) create mode 100644 sysdeps/x86_64/configure.in delete mode 100644 sysdeps/x86_64/elf/configure.in delete mode 100644 sysdeps/x86_64/elf/start.S create mode 100644 sysdeps/x86_64/start.S (limited to 'sysdeps/x86_64') diff --git a/sysdeps/x86_64/configure.in b/sysdeps/x86_64/configure.in new file mode 100644 index 0000000000..c53328b4c9 --- /dev/null +++ b/sysdeps/x86_64/configure.in @@ -0,0 +1,33 @@ +GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. +# Local configure fragment for sysdeps/x86_64/elf. + +# 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 +cat > conftest.s <<\EOF + .section ".tdata", "awT", @progbits + .globl foo +foo: .quad 1 + .section ".tbss", "awT", @nobits + .globl bar +bar: .skip 8 + .text +baz: leaq bar@TLSLD(%rip), %rdi + leaq bar@DTPOFF(%rax), %rcx + addq foo@GOTTPOFF(%rip), %rax + movq $bar@TPOFF, %rdx +EOF +dnl +if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then + libc_cv_x86_64_tls=yes +else + libc_cv_x86_64_tls=no +fi +rm -f conftest*]) +if test $libc_cv_x86_64_tls = no; then + AC_MSG_ERROR([the assembler must support TLS]) +fi + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) +# work around problem with autoconf and empty lines at the end of files diff --git a/sysdeps/x86_64/elf/configure.in b/sysdeps/x86_64/elf/configure.in deleted file mode 100644 index c53328b4c9..0000000000 --- a/sysdeps/x86_64/elf/configure.in +++ /dev/null @@ -1,33 +0,0 @@ -GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. -# Local configure fragment for sysdeps/x86_64/elf. - -# 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 -cat > conftest.s <<\EOF - .section ".tdata", "awT", @progbits - .globl foo -foo: .quad 1 - .section ".tbss", "awT", @nobits - .globl bar -bar: .skip 8 - .text -baz: leaq bar@TLSLD(%rip), %rdi - leaq bar@DTPOFF(%rax), %rcx - addq foo@GOTTPOFF(%rip), %rax - movq $bar@TPOFF, %rdx -EOF -dnl -if AC_TRY_COMMAND(${CC-cc} -c $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD); then - libc_cv_x86_64_tls=yes -else - libc_cv_x86_64_tls=no -fi -rm -f conftest*]) -if test $libc_cv_x86_64_tls = no; then - AC_MSG_ERROR([the assembler must support TLS]) -fi - -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) -# work around problem with autoconf and empty lines at the end of files diff --git a/sysdeps/x86_64/elf/start.S b/sysdeps/x86_64/elf/start.S deleted file mode 100644 index 5e01d21179..0000000000 --- a/sysdeps/x86_64/elf/start.S +++ /dev/null @@ -1,128 +0,0 @@ -/* Startup code compliant to the ELF x86-64 ABI. - Copyright (C) 2001-2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Andreas Jaeger , 2001. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - In addition to the permissions in the GNU Lesser General Public - License, the Free Software Foundation gives you unlimited - permission to link the compiled version of this file with other - programs, and to distribute those programs without any restriction - coming from the use of this file. (The GNU Lesser General Public - License restrictions do apply in other respects; for example, they - cover modification of the file, and distribution when not linked - into another program.) - - Note that people who make modified versions of this file are not - obligated to grant this special exception for their modified - versions; it is their choice whether to do so. The GNU Lesser - General Public License gives permission to release a modified - version without this exception; this exception also makes it - possible to release a modified version which carries forward this - exception. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -/* This is the canonical entry point, usually the first thing in the text - segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry - point runs, most registers' values are unspecified, except for: - - %rdx Contains a function pointer to be registered with `atexit'. - This is how the dynamic linker arranges to have DT_FINI - functions called for shared libraries that have been loaded - before this code runs. - - %rsp The stack contains the arguments and environment: - 0(%rsp) argc - 8(%rsp) argv[0] - ... - (8*argc)(%rsp) NULL - (8*(argc+1))(%rsp) envp[0] - ... - NULL -*/ - -#include -#include "bp-sym.h" - - .text - .globl _start - .type _start,@function -_start: - cfi_startproc - /* Clearing frame pointer is insufficient, use CFI. */ - cfi_undefined (rip) - /* Clear the frame pointer. The ABI suggests this be done, to mark - the outermost frame obviously. */ - xorl %ebp, %ebp - - /* Extract the arguments as encoded on the stack and set up - the arguments for __libc_start_main (int (*main) (int, char **, char **), - int argc, char *argv, - void (*init) (void), void (*fini) (void), - void (*rtld_fini) (void), void *stack_end). - The arguments are passed via registers and on the stack: - main: %rdi - argc: %rsi - argv: %rdx - init: %rcx - fini: %r8 - rtld_fini: %r9 - stack_end: stack. */ - - movq %rdx, %r9 /* Address of the shared library termination - function. */ - popq %rsi /* Pop the argument count. */ - movq %rsp, %rdx /* argv starts just at the current stack top. */ - /* Align the stack to a 16 byte boundary to follow the ABI. */ - andq $~15, %rsp - - pushq %rax /* Push garbage because we push 8 more bytes. */ - - /* Provide the highest stack address to the user code (for stacks - which grow downwards). */ - pushq %rsp - -#ifdef SHARED - /* Pass address of our own entry points to .fini and .init. */ - movq __libc_csu_fini@GOTPCREL(%rip), %r8 - movq __libc_csu_init@GOTPCREL(%rip), %rcx - - movq BP_SYM (main)@GOTPCREL(%rip), %rdi - - /* Call the user's main function, and exit with its value. - But let the libc call main. */ - call BP_SYM (__libc_start_main)@PLT -#else - /* Pass address of our own entry points to .fini and .init. */ - movq $__libc_csu_fini, %r8 - movq $__libc_csu_init, %rcx - - movq $BP_SYM (main), %rdi - - /* Call the user's main function, and exit with its value. - But let the libc call main. */ - call BP_SYM (__libc_start_main) -#endif - - hlt /* Crash if somehow `exit' does return. */ - cfi_endproc - -/* Define a symbol for the first piece of initialized data. */ - .data - .globl __data_start -__data_start: - .long 0 - .weak data_start - data_start = __data_start diff --git a/sysdeps/x86_64/start.S b/sysdeps/x86_64/start.S new file mode 100644 index 0000000000..5e01d21179 --- /dev/null +++ b/sysdeps/x86_64/start.S @@ -0,0 +1,128 @@ +/* Startup code compliant to the ELF x86-64 ABI. + Copyright (C) 2001-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Andreas Jaeger , 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + In addition to the permissions in the GNU Lesser General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file with other + programs, and to distribute those programs without any restriction + coming from the use of this file. (The GNU Lesser General Public + License restrictions do apply in other respects; for example, they + cover modification of the file, and distribution when not linked + into another program.) + + Note that people who make modified versions of this file are not + obligated to grant this special exception for their modified + versions; it is their choice whether to do so. The GNU Lesser + General Public License gives permission to release a modified + version without this exception; this exception also makes it + possible to release a modified version which carries forward this + exception. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* This is the canonical entry point, usually the first thing in the text + segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry + point runs, most registers' values are unspecified, except for: + + %rdx Contains a function pointer to be registered with `atexit'. + This is how the dynamic linker arranges to have DT_FINI + functions called for shared libraries that have been loaded + before this code runs. + + %rsp The stack contains the arguments and environment: + 0(%rsp) argc + 8(%rsp) argv[0] + ... + (8*argc)(%rsp) NULL + (8*(argc+1))(%rsp) envp[0] + ... + NULL +*/ + +#include +#include "bp-sym.h" + + .text + .globl _start + .type _start,@function +_start: + cfi_startproc + /* Clearing frame pointer is insufficient, use CFI. */ + cfi_undefined (rip) + /* Clear the frame pointer. The ABI suggests this be done, to mark + the outermost frame obviously. */ + xorl %ebp, %ebp + + /* Extract the arguments as encoded on the stack and set up + the arguments for __libc_start_main (int (*main) (int, char **, char **), + int argc, char *argv, + void (*init) (void), void (*fini) (void), + void (*rtld_fini) (void), void *stack_end). + The arguments are passed via registers and on the stack: + main: %rdi + argc: %rsi + argv: %rdx + init: %rcx + fini: %r8 + rtld_fini: %r9 + stack_end: stack. */ + + movq %rdx, %r9 /* Address of the shared library termination + function. */ + popq %rsi /* Pop the argument count. */ + movq %rsp, %rdx /* argv starts just at the current stack top. */ + /* Align the stack to a 16 byte boundary to follow the ABI. */ + andq $~15, %rsp + + pushq %rax /* Push garbage because we push 8 more bytes. */ + + /* Provide the highest stack address to the user code (for stacks + which grow downwards). */ + pushq %rsp + +#ifdef SHARED + /* Pass address of our own entry points to .fini and .init. */ + movq __libc_csu_fini@GOTPCREL(%rip), %r8 + movq __libc_csu_init@GOTPCREL(%rip), %rcx + + movq BP_SYM (main)@GOTPCREL(%rip), %rdi + + /* Call the user's main function, and exit with its value. + But let the libc call main. */ + call BP_SYM (__libc_start_main)@PLT +#else + /* Pass address of our own entry points to .fini and .init. */ + movq $__libc_csu_fini, %r8 + movq $__libc_csu_init, %rcx + + movq $BP_SYM (main), %rdi + + /* Call the user's main function, and exit with its value. + But let the libc call main. */ + call BP_SYM (__libc_start_main) +#endif + + hlt /* Crash if somehow `exit' does return. */ + cfi_endproc + +/* Define a symbol for the first piece of initialized data. */ + .data + .globl __data_start +__data_start: + .long 0 + .weak data_start + data_start = __data_start -- cgit 1.4.1 From 089464316444bd5923ade2e239dc653b5b071bfc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 19 Mar 2012 20:58:05 +0100 Subject: Merge contents from sysdeps/i386/configure.in (without i686 check) --- sysdeps/x86_64/configure.in | 93 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 91 insertions(+), 2 deletions(-) (limited to 'sysdeps/x86_64') diff --git a/sysdeps/x86_64/configure.in b/sysdeps/x86_64/configure.in index c53328b4c9..5874c9ac21 100644 --- a/sysdeps/x86_64/configure.in +++ b/sysdeps/x86_64/configure.in @@ -1,5 +1,94 @@ 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 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 <&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 +if AC_TRY_COMMAND([${CC-cc} -msse4 -xc /dev/null -S -o /dev/null]); then + libc_cv_cc_sse4=yes +else + libc_cv_cc_sse4=no +fi]) +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 +if AC_TRY_COMMAND([${CC-cc} -mavx -xc /dev/null -S -o /dev/null]); then + libc_cv_cc_avx=yes +else + libc_cv_cc_avx=no +fi]) +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 +if AC_TRY_COMMAND([${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null]); then + libc_cv_cc_sse2avx=yes +else + libc_cv_cc_sse2avx=no +fi]) +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 +if AC_TRY_COMMAND([${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null]); then + libc_cv_cc_fma4=yes +else + libc_cv_cc_fma4=no +fi]) +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 +if AC_TRY_COMMAND([${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null]); then + libc_cv_cc_novzeroupper=yes +else + libc_cv_cc_novzeroupper=no +fi]) # 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 @@ -30,4 +119,4 @@ fi dnl It is always possible to access static and hidden symbols in an dnl position independent way. AC_DEFINE(PI_STATIC_AND_HIDDEN) -# work around problem with autoconf and empty lines at the end of files +# work around problem with autoconf and empty lines at the end of files \ No newline at end of file -- cgit 1.4.1 From 1221efbda91179b78dfb469ab03be063daaf8cd0 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 19 Mar 2012 20:58:43 +0100 Subject: Remove now obsolete elf/configure file. --- sysdeps/x86_64/elf/configure | 125 ------------------------------------------- 1 file changed, 125 deletions(-) delete mode 100644 sysdeps/x86_64/elf/configure (limited to 'sysdeps/x86_64') diff --git a/sysdeps/x86_64/elf/configure b/sysdeps/x86_64/elf/configure deleted file mode 100644 index 7f2b313bc4..0000000000 --- a/sysdeps/x86_64/elf/configure +++ /dev/null @@ -1,125 +0,0 @@ - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -# This file is generated from configure.in by Autoconf. DO NOT EDIT! - # Local configure fragment for sysdeps/x86_64/elf. - -# Check for support of thread-local storage handling in assembler and linker. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-64 TLS support" >&5 -$as_echo_n "checking for x86-64 TLS support... " >&6; } -if ${libc_cv_x86_64_tls+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.s <<\EOF - .section ".tdata", "awT", @progbits - .globl foo -foo: .quad 1 - .section ".tbss", "awT", @nobits - .globl bar -bar: .skip 8 - .text -baz: leaq bar@TLSLD(%rip), %rdi - leaq bar@DTPOFF(%rax), %rcx - addq foo@GOTTPOFF(%rip), %rax - movq $bar@TPOFF, %rdx -EOF -if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - libc_cv_x86_64_tls=yes -else - libc_cv_x86_64_tls=no -fi -rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_64_tls" >&5 -$as_echo "$libc_cv_x86_64_tls" >&6; } -if test $libc_cv_x86_64_tls = no; then - as_fn_error $? "the assembler must support TLS" "$LINENO" 5 -fi - -$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h - -# work around problem with autoconf and empty lines at the end of files -- cgit 1.4.1 From 8f599ddb6750b13c1283a877c0719748af181206 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 19 Mar 2012 21:06:14 +0100 Subject: Fix last line. --- sysdeps/x86_64/configure | 367 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 365 insertions(+), 2 deletions(-) (limited to 'sysdeps/x86_64') diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure index bd699bbccb..8b1a4de1d4 100644 --- a/sysdeps/x86_64/configure +++ b/sysdeps/x86_64/configure @@ -1,3 +1,366 @@ -# The i386 fragment also works for x86_64. -. $srcdir/sysdeps/i386/configure +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile +# This file is generated from configure.in by Autoconf. DO NOT EDIT! + # Local configure fragment for sysdeps/x86_64. + + +ac_fn_c_check_header_compile "$LINENO" "cpuid.h" "ac_cv_header_cpuid_h" "/* No default includes. */ +" +if test "x$ac_cv_header_cpuid_h" = xyes; then : + +else + as_fn_error $? "gcc must provide the header" "$LINENO" 5 +fi + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -g produces usable source locations for assembler-with-cpp" >&5 +$as_echo_n "checking if -g produces usable source locations for assembler-with-cpp... " >&6; } +if ${libc_cv_cpp_asm_debuginfo+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.S <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } && { + ac_pattern='conftest\.S' + { ac_try='readelf --debug-dump=line conftest.o | + grep $ac_pattern 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + }; then + libc_cv_cpp_asm_debuginfo=yes +else + libc_cv_cpp_asm_debuginfo=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cpp_asm_debuginfo" >&5 +$as_echo "$libc_cv_cpp_asm_debuginfo" >&6; } +if test $libc_cv_cpp_asm_debuginfo = yes; then + $as_echo "#define HAVE_CPP_ASM_DEBUGINFO 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSE4 support" >&5 +$as_echo_n "checking for SSE4 support... " >&6; } +if ${libc_cv_cc_sse4+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} -msse4 -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_cc_sse4=yes +else + libc_cv_cc_sse4=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse4" >&5 +$as_echo "$libc_cv_cc_sse4" >&6; } +if test $libc_cv_cc_sse4 = yes; then + $as_echo "#define HAVE_SSE4_SUPPORT 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX support" >&5 +$as_echo_n "checking for AVX support... " >&6; } +if ${libc_cv_cc_avx+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} -mavx -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_cc_avx=yes +else + libc_cv_cc_avx=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_avx" >&5 +$as_echo "$libc_cv_cc_avx" >&6; } +if test $libc_cv_cc_avx = yes; then + $as_echo "#define HAVE_AVX_SUPPORT 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AVX encoding of SSE instructions" >&5 +$as_echo_n "checking for AVX encoding of SSE instructions... " >&6; } +if ${libc_cv_cc_sse2avx+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} -msse2avx -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_cc_sse2avx=yes +else + libc_cv_cc_sse2avx=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_sse2avx" >&5 +$as_echo "$libc_cv_cc_sse2avx" >&6; } +if test $libc_cv_cc_sse2avx = yes; then + $as_echo "#define HAVE_SSE2AVX_SUPPORT 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5 +$as_echo_n "checking for FMA4 support... " >&6; } +if ${libc_cv_cc_fma4+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_cc_fma4=yes +else + libc_cv_cc_fma4=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5 +$as_echo "$libc_cv_cc_fma4" >&6; } +if test $libc_cv_cc_fma4 = yes; then + $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5 +$as_echo_n "checking for -mno-vzeroupper support... " >&6; } +if ${libc_cv_cc_novzeroupper+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_cc_novzeroupper=yes +else + libc_cv_cc_novzeroupper=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_novzeroupper" >&5 +$as_echo "$libc_cv_cc_novzeroupper" >&6; } + +# Check for support of thread-local storage handling in assembler and linker. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x86-64 TLS support" >&5 +$as_echo_n "checking for x86-64 TLS support... " >&6; } +if ${libc_cv_x86_64_tls+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.s <<\EOF + .section ".tdata", "awT", @progbits + .globl foo +foo: .quad 1 + .section ".tbss", "awT", @nobits + .globl bar +bar: .skip 8 + .text +baz: leaq bar@TLSLD(%rip), %rdi + leaq bar@DTPOFF(%rax), %rcx + addq foo@GOTTPOFF(%rip), %rax + movq $bar@TPOFF, %rdx +EOF +if { ac_try='${CC-cc} -c $CFLAGS conftest.s 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_x86_64_tls=yes +else + libc_cv_x86_64_tls=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_64_tls" >&5 +$as_echo "$libc_cv_x86_64_tls" >&6; } +if test $libc_cv_x86_64_tls = no; then + as_fn_error $? "the assembler must support TLS" "$LINENO" 5 +fi + +$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h + +# work around problem with autoconf and empty lines at the end of files -- cgit 1.4.1 From 6870c2ed1f2d4ff53e7c36b252f9f2c6b6112552 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Mon, 19 Mar 2012 21:09:50 +0100 Subject: Fix last line in configure.in. --- sysdeps/x86_64/configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/x86_64') diff --git a/sysdeps/x86_64/configure.in b/sysdeps/x86_64/configure.in index 5874c9ac21..f913c7c980 100644 --- a/sysdeps/x86_64/configure.in +++ b/sysdeps/x86_64/configure.in @@ -119,4 +119,4 @@ fi dnl It is always possible to access static and hidden symbols in an dnl position independent way. AC_DEFINE(PI_STATIC_AND_HIDDEN) -# work around problem with autoconf and empty lines at the end of files \ No newline at end of file +# work around problem with autoconf and empty lines at the end of files -- cgit 1.4.1