manual: add dup3
[glibc.git] / sysdeps / x86_64 / configure
blob07bdd40a37247c7bd978e39ee6d6fcf62a67e7f6
1 # This file is generated from configure.ac by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/x86_64.
4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking -mprefer-vector-width=128" >&5
5 printf %s "checking -mprefer-vector-width=128... " >&6; }
6 if test ${libc_cv_cc_mprefer_vector_width+y}
7 then :
8   printf %s "(cached) " >&6
9 else $as_nop
10   if { ac_try='${CC-cc} -mprefer-vector-width=128 -xc /dev/null -S -o /dev/null'
11   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
12   (eval $ac_try) 2>&5
13   ac_status=$?
14   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15   test $ac_status = 0; }; }
16 then :
17   libc_cv_cc_mprefer_vector_width=yes
18 else $as_nop
19   libc_cv_cc_mprefer_vector_width=no
23 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_mprefer_vector_width" >&5
24 printf "%s\n" "$libc_cv_cc_mprefer_vector_width" >&6; }
25 config_vars="$config_vars
26 config-cflags-mprefer-vector-width = $libc_cv_cc_mprefer_vector_width"
28 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linker that supports -z mark-plt" >&5
29 printf %s "checking for linker that supports -z mark-plt... " >&6; }
30 libc_linker_feature=no
31 cat > conftest.c <<EOF
32 int _start (void) { return 42; }
33 EOF
34 if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
35                   -Wl,-z,mark-plt -nostdlib -nostartfiles
36                   -fPIC -shared -o conftest.so conftest.c
37                   1>&5'
38   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
39   (eval $ac_try) 2>&5
40   ac_status=$?
41   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
42   test $ac_status = 0; }; }
43 then
44   if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,mark-plt -nostdlib \
45       -nostartfiles -fPIC -shared -o conftest.so conftest.c 2>&1 \
46       | grep "warning: -z mark-plt ignored" > /dev/null 2>&1; then
47     true
48   else
49     libc_linker_feature=yes
50   fi
52 rm -f conftest*
53 if test $libc_linker_feature = yes; then
54   libc_cv_z_mark_plt=yes
55 else
56   libc_cv_z_mark_plt=no
58 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5
59 printf "%s\n" "$libc_linker_feature" >&6; }
60 config_vars="$config_vars
61 have-z-mark-plt = $libc_cv_z_mark_plt"
63 if test x"$build_mathvec" = xnotset; then
64   build_mathvec=yes
67 if test $enable_cet != no; then
68   # Check if CET can be enabled.
69   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether CET can be enabled" >&5
70 printf %s "checking whether CET can be enabled... " >&6; }
71 if test ${libc_cv_x86_cet_available+y}
72 then :
73   printf %s "(cached) " >&6
74 else $as_nop
75   cat > conftest.c <<EOF
76 #if !defined __CET__ || __CET__ != 3
77 # error CET isn't available.
78 #endif
79 EOF
80                  if { ac_try='${CC-cc} -c $CFLAGS -fcf-protection -include cet.h conftest.c 1>&5'
81   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
82   (eval $ac_try) 2>&5
83   ac_status=$?
84   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
85   test $ac_status = 0; }; }; then
86                    libc_cv_x86_cet_available=yes
87                  else
88                    libc_cv_x86_cet_available=no
89                  fi
90                  rm -rf conftest*
92 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_cet_available" >&5
93 printf "%s\n" "$libc_cv_x86_cet_available" >&6; }
94   if test $libc_cv_x86_cet_available != yes; then
95     as_fn_error $? "$CC doesn't support CET" "$LINENO" 5
96   fi
98 if test $enable_cet != no; then
99   # Check if assembler supports CET.
100   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether assembler supports CET" >&5
101 printf %s "checking whether assembler supports CET... " >&6; }
102 if test ${libc_cv_x86_cet_as+y}
103 then :
104   printf %s "(cached) " >&6
105 else $as_nop
106   cat > conftest.s <<EOF
107         incsspd %ecx
109                  if { ac_try='${CC-cc} -c $CFLAGS conftest.s -o conftest.o 1>&5'
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; }; }; then
115                    libc_cv_x86_cet_as=yes
116                  else
117                    libc_cv_x86_cet_as=no
118                  fi
119                  rm -rf conftest*
121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_cet_as" >&5
122 printf "%s\n" "$libc_cv_x86_cet_as" >&6; }
123   if test $libc_cv_x86_cet_as = no; then
124     as_fn_error $? "$AS doesn't support CET" "$LINENO" 5
125   fi
127 if test $enable_cet = yes; then
128   printf "%s\n" "#define DEFAULT_DL_X86_CET_CONTROL cet_elf_property" >>confdefs.h
130 elif test $enable_cet = permissive; then
131   printf "%s\n" "#define DEFAULT_DL_X86_CET_CONTROL cet_permissive" >>confdefs.h
134 config_vars="$config_vars
135 enable-cet = $enable_cet"
137 # Check if -mamx-tile works properly.
138 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mamx-tile works properly" >&5
139 printf %s "checking whether -mamx-tile works properly... " >&6; }
140 if test ${libc_cv_x86_have_amx_tile+y}
141 then :
142   printf %s "(cached) " >&6
143 else $as_nop
144   cat > conftest.c <<EOF
145 #include <x86intrin.h>
147                libc_cv_x86_have_amx_tile=no
148                if { ac_try='${CC-cc} -E $CFLAGS -mamx-tile conftest.c > conftest.i'
149   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
150   (eval $ac_try) 2>&5
151   ac_status=$?
152   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
153   test $ac_status = 0; }; }; then
154                  if grep -q __builtin_ia32_ldtilecfg conftest.i; then
155                    libc_cv_x86_have_amx_tile=yes
156                  fi
157                fi
158                rm -rf conftest*
160 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_have_amx_tile" >&5
161 printf "%s\n" "$libc_cv_x86_have_amx_tile" >&6; }
162 config_vars="$config_vars
163 have-mamx-tile = $libc_cv_x86_have_amx_tile"
165 # Check if -mapxf is enabled.
166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mapxf is enabled" >&5
167 printf %s "checking whether -mapxf is enabled... " >&6; }
168 if test ${libc_cv_x86_have_apx+y}
169 then :
170   printf %s "(cached) " >&6
171 else $as_nop
172   cat > conftest.c <<EOF
173 #ifndef __APX_F__
174 # error APX isn't enabled
175 #endif
177                libc_cv_x86_have_apx=no
178                if { ac_try='${CC-cc} -c $CFLAGS conftest.c -o conftest.o 1>&5'
179   { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
180   (eval $ac_try) 2>&5
181   ac_status=$?
182   printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
183   test $ac_status = 0; }; }; then
184                    libc_cv_x86_have_apx=yes
185                fi
186                rm -rf conftest*
188 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_have_apx" >&5
189 printf "%s\n" "$libc_cv_x86_have_apx" >&6; }
190 if test $libc_cv_x86_have_apx = yes; then
191   printf "%s\n" "#define HAVE_X86_APX 1" >>confdefs.h
194 config_vars="$config_vars
195 have-x86-apx = $libc_cv_x86_have_apx"
197 test -n "$critic_missing" && as_fn_error $? "
198 *** $critic_missing" "$LINENO" 5