i386: Fail if configured with --enable-cet
[glibc.git] / sysdeps / x86 / configure
blob1f4c2d67fd2693ed5a1125a3c2eff385bbf93776
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}
8 then :
9   printf %s "(cached) " >&6
10 else $as_nop
11   cat > conftest1.S <<EOF
12 #ifdef __LP64__
13 # define P2ALIGN 3
14 #else
15 # define P2ALIGN 2
16 #endif
17         .section ".note.gnu.property", "a"
18         .p2align P2ALIGN
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.  */
26         .p2align P2ALIGN
27         /* GNU_PROPERTY_X86_ISA_1_NEEDED */
28         .long 0xc0008002        /* pr_type.  */
29         .long 3f - 2f           /* pr_datasz.  */
31         .long 0x1
33         .p2align P2ALIGN
35 EOF
36 cat > conftest2.S <<EOF
37 #ifdef __LP64__
38 # define P2ALIGN 3
39 #else
40 # define P2ALIGN 2
41 #endif
42         .section ".note.gnu.property", "a"
43         .p2align P2ALIGN
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.  */
51         .p2align P2ALIGN
52         /* GNU_PROPERTY_X86_ISA_1_NEEDED */
53         .long 0xc0008002        /* pr_type.  */
54         .long 3f - 2f           /* pr_datasz.  */
56         .long 0x2
58         .p2align P2ALIGN
60 EOF
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
64   (eval $ac_try) 2>&5
65   ac_status=$?
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
71   fi
73 rm -f conftest*
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}
83 then :
84   printf %s "(cached) " >&6
85 else $as_nop
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
89   (eval $ac_try) 2>&5
90   ac_status=$?
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
94     fi
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
101   fi
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}
105 then :
106   printf %s "(cached) " >&6
107 else $as_nop
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
111   (eval $ac_try) 2>&5
112   ac_status=$?
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
116     fi
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
123   fi
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