enable-cet = $enable_cet"
# Check if -mamx-tile works properly.
-check_x86_have_amx_tile ()
-{
- eval $1=no
- if grep -q __builtin_ia32_ldtilecfg conftest; then
- eval $1=yes
- fi
-}
-
-conftest_code="
-#include <x86intrin.h>
-"
cat > conftest.c <<EOF
-$conftest_code
+#include <x86intrin.h>
EOF
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mamx-tile works properly" >&5
-printf %s "checking whether -mamx-tile works properly... " >&6; }
-if test ${libc_cv_x86_have_amx_tile+y}
-then :
- printf %s "(cached) " >&6
-else case e in #(
- e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -E -mamx-tile conftest.c -o conftest 1>&5'
- { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }
- then
- check_x86_have_amx_tile libc_cv_x86_have_amx_tile
- else
- libc_cv_x86_have_amx_tile=no
- fi
- ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_x86_have_amx_tile" >&5
-printf "%s\n" "$libc_cv_x86_have_amx_tile" >&6; }
-if test "$TEST_CC" = "$CC"; then
- libc_cv_test_x86_have_amx_tile=$libc_cv_x86_have_amx_tile
-else
saved_CC="$CC"
CC="$TEST_CC"
then :
printf %s "(cached) " >&6
else case e in #(
- e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -E -mamx-tile conftest.c -o conftest 1>&5'
+ e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -E -mamx-tile conftest.c -o conftest 1>&5'
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
(eval $ac_try) 2>&5
ac_status=$?
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; }
- then
- check_x86_have_amx_tile libc_cv_test_x86_have_amx_tile
- else
- libc_cv_test_x86_have_amx_tile=no
- fi ;;
+ then
+
+if test $libc_cv_test_clang = yes; then
+ libc_cv_test_x86_have_amx_tile=yes
+else
+ if grep -q __builtin_ia32_ldtilecfg conftest; then
+ libc_cv_test_x86_have_amx_tile=yes
+ else
+ libc_cv_test_x86_have_amx_tile=no
+ fi
+fi
+
+ else
+ libc_cv_test_x86_have_amx_tile=no
+ fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_x86_have_amx_tile" >&5
CC="$saved_CC"
-fi
rm -f conftest*
config_vars="$config_vars
-have-mamx-tile = $libc_cv_x86_have_amx_tile"
+have-mamx-tile = $libc_cv_test_x86_have_amx_tile"
# Check if -mapxf is enabled.
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -mapxf is enabled" >&5
LIBC_CONFIG_VAR([enable-cet], [$enable_cet])
# Check if -mamx-tile works properly.
-check_x86_have_amx_tile ()
-{
- eval $1=no
- if grep -q __builtin_ia32_ldtilecfg conftest; then
- eval $1=yes
- fi
-}
-
-conftest_code="
-#include <x86intrin.h>
-"
-LIBC_TRY_CC_AND_TEST_CC_COMMAND([whether -mamx-tile works properly],
- [$conftest_code],
+LIBC_TRY_TEST_CC_COMMAND([whether -mamx-tile works properly],
+ [#include <x86intrin.h>],
[-E -mamx-tile],
- libc_cv_x86_have_amx_tile,
- [check_x86_have_amx_tile libc_cv_x86_have_amx_tile],
- [libc_cv_x86_have_amx_tile=no],
libc_cv_test_x86_have_amx_tile,
- [check_x86_have_amx_tile libc_cv_test_x86_have_amx_tile],
+ [
+if test $libc_cv_test_clang = yes; then
+ libc_cv_test_x86_have_amx_tile=yes
+else
+ if grep -q __builtin_ia32_ldtilecfg conftest; then
+ libc_cv_test_x86_have_amx_tile=yes
+ else
+ libc_cv_test_x86_have_amx_tile=no
+ fi
+fi
+ ],
[libc_cv_test_x86_have_amx_tile=no])
-LIBC_CONFIG_VAR([have-mamx-tile], [$libc_cv_x86_have_amx_tile])
+LIBC_CONFIG_VAR([have-mamx-tile], [$libc_cv_test_x86_have_amx_tile])
# Check if -mapxf is enabled.
AC_CACHE_CHECK(whether -mapxf is enabled,