1 # This file is generated from configure.ac by Autoconf. DO NOT EDIT!
2 # Local configure fragment for sysdeps/x86.
4 # Check if linker supports x86 ISA level.
5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linker x86 ISA level support" >&5
6 printf %s "checking for linker x86 ISA level support... " >&6; }
7 if test ${libc_cv_include_x86_isa_level+y}
9 printf %s "(cached) " >&6
11 cat > conftest1.S <<EOF
17 .section ".note.gnu.property", "a"
19 .long 1f - 0f /* name length. */
20 .long 4f - 1f /* data length. */
21 /* NT_GNU_PROPERTY_TYPE_0 */
22 .long 5 /* note type. */
24 .asciz "GNU" /* vendor name. */
27 /* GNU_PROPERTY_X86_ISA_1_NEEDED */
28 .long 0xc0008002 /* pr_type. */
29 .long 3f - 2f /* pr_datasz. */
36 cat > conftest2.S <<EOF
42 .section ".note.gnu.property", "a"
44 .long 1f - 0f /* name length. */
45 .long 4f - 1f /* data length. */
46 /* NT_GNU_PROPERTY_TYPE_0 */
47 .long 5 /* note type. */
49 .asciz "GNU" /* vendor name. */
52 /* GNU_PROPERTY_X86_ISA_1_NEEDED */
53 .long 0xc0008002 /* pr_type. */
54 .long 3f - 2f /* pr_datasz. */
61 libc_cv_include_x86_isa_level=no
62 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -nostartfiles -nostdlib -r -o conftest conftest1.S conftest2.S'
63 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
66 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
67 test $ac_status = 0; }; }; then
68 count=`LC_ALL=C $READELF -n conftest | grep NT_GNU_PROPERTY_TYPE_0 | wc -l`
69 if test "$count" = 1; then
70 libc_cv_include_x86_isa_level=yes
75 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_include_x86_isa_level" >&5
76 printf "%s\n" "$libc_cv_include_x86_isa_level" >&6; }
77 if test $libc_cv_include_x86_isa_level = yes; then
78 printf "%s\n" "#define INCLUDE_X86_ISA_LEVEL 1" >>confdefs.h
80 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LAHF/SAHF instruction support" >&5
81 printf %s "checking for LAHF/SAHF instruction support... " >&6; }
82 if test ${libc_cv_have_x86_lahf_sahf+y}
84 printf %s "(cached) " >&6
86 libc_cv_have_x86_lahf_sahf=no
87 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null'
88 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
91 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
92 test $ac_status = 0; }; } | grep -qE '(-msahf\b|-march=x86-64-v)'; then
93 libc_cv_have_x86_lahf_sahf=yes
96 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_have_x86_lahf_sahf" >&5
97 printf "%s\n" "$libc_cv_have_x86_lahf_sahf" >&6; }
98 if test $libc_cv_have_x86_lahf_sahf = yes; then
99 printf "%s\n" "#define HAVE_X86_LAHF_SAHF 1" >>confdefs.h
102 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for MOVBE instruction support" >&5
103 printf %s "checking for MOVBE instruction support... " >&6; }
104 if test ${libc_cv_have_x86_movbe+y}
106 printf %s "(cached) " >&6
108 libc_cv_have_x86_movbe=no
109 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fverbose-asm -S -o - -x c /dev/null'
110 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
113 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
114 test $ac_status = 0; }; } | grep -qE '(-mmovbe\b|-march=x86-64-v([3-9]|[1-9][0-9]))'; then
115 libc_cv_have_x86_movbe=yes
118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_have_x86_movbe" >&5
119 printf "%s\n" "$libc_cv_have_x86_movbe" >&6; }
120 if test $libc_cv_have_x86_movbe = yes; then
121 printf "%s\n" "#define HAVE_X86_MOVBE 1" >>confdefs.h
125 config_vars="$config_vars
126 enable-x86-isa-level = $libc_cv_include_x86_isa_level"
128 printf "%s\n" "#define SUPPORT_STATIC_PIE 1" >>confdefs.h