test-config-cflags-wno-ignored-attributes = @libc_cv_test_wno_ignored_attributes@
test-enable-cet = @test_enable_cet@
test-have-mamx-tile = @libc_cv_test_x86_have_amx_tile@
-test-have-mtls-descriptor = @libc_cv_test_mtls_descriptor@
test-have-static-pie = @libc_cv_test_static_pie@
test-supported-fortify = @libc_cv_test_supported_fortify_source@
config-cflags-wno-ignored-attributes="$(test-config-cflags-wno-ignored-attributes)" \
enable-cet="$(test-enable-cet)" \
have-mamx-tile="$(test-have-mamx-tile)" \
- have-mtls-descriptor="$(test-have-mtls-descriptor)" \
have-static-pie="$(test-have-static-pie)" \
supported-fortify="$(test-supported-fortify)" \
objdir=`pwd` $@
libc_cv_cc_submachine
libc_cv_cc_nofma
libc_cv_test_wno_ignored_attributes
-libc_cv_test_mtls_descriptor
libc_cv_has_glob_dat
libc_cv_fpie
libc_cv_test_static_pie
cat > conftest.c <<EOF
$conftest_code
EOF
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tls descriptor support" >&5
-printf %s "checking for tls descriptor support... " >&6; }
-if test ${libc_cv_mtls_descriptor+y}
-then :
- printf %s "(cached) " >&6
-else case e in #(
- e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=$mtls_descriptor -nostdlib -nostartfiles -shared 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
- libc_cv_mtls_descriptor=$mtls_descriptor
- else
- libc_cv_mtls_descriptor=no
- fi
- ;;
-esac
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mtls_descriptor" >&5
-printf "%s\n" "$libc_cv_mtls_descriptor" >&6; }
-if test "$TEST_CC" = "$CC"; then
- libc_cv_test_mtls_descriptor=$libc_cv_mtls_descriptor
-else
saved_CC="$CC"
CC="$TEST_CC"
then :
printf %s "(cached) " >&6
else case e in #(
- e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=$mtls_descriptor -nostdlib -nostartfiles -shared conftest.c -o conftest 1>&5'
+ e) if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -fPIC -mtls-dialect=$mtls_descriptor -nostdlib -nostartfiles -shared 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
- libc_cv_test_mtls_descriptor=$mtls_descriptor
- else
- libc_cv_test_mtls_descriptor=no
- fi ;;
+ then
+ libc_cv_test_mtls_descriptor=$mtls_descriptor
+ else
+ libc_cv_test_mtls_descriptor=no
+ fi ;;
esac
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_test_mtls_descriptor" >&5
CC="$saved_CC"
-fi
rm -f conftest*
config_vars="$config_vars
-have-mtls-descriptor = $libc_cv_mtls_descriptor"
-
+have-test-mtls-descriptor = $libc_cv_test_mtls_descriptor"
conftest_code="
void __foo (void)
i = 10;
}
"
-LIBC_TRY_CC_AND_TEST_CC_COMMAND([for tls descriptor support],
+dnl Check if TEST_CC support tls descriptor.
+LIBC_TRY_TEST_CC_COMMAND([for tls descriptor support],
[$conftest_code],
[-fPIC -mtls-dialect=$mtls_descriptor -nostdlib -nostartfiles -shared],
- libc_cv_mtls_descriptor,
- [libc_cv_mtls_descriptor=$mtls_descriptor],
- [libc_cv_mtls_descriptor=no],
libc_cv_test_mtls_descriptor,
[libc_cv_test_mtls_descriptor=$mtls_descriptor],
[libc_cv_test_mtls_descriptor=no])
-LIBC_CONFIG_VAR([have-mtls-descriptor], [$libc_cv_mtls_descriptor])
-AC_SUBST(libc_cv_test_mtls_descriptor)
+LIBC_CONFIG_VAR([have-test-mtls-descriptor],
+ [$libc_cv_test_mtls_descriptor])
dnl clang emits an warning for a double alias redirection, to warn the
dnl original symbol is sed even when weak definition overrides it.
# For +depfiles in Makerules.
extra-test-objs += tst-auditmod17.os
-ifneq (no,$(have-mtls-descriptor))
+ifneq (no,$(have-test-mtls-descriptor))
tests += tst-gnu2-tls1
modules-names += tst-gnu2-tls1mod
$(objpfx)tst-gnu2-tls1: $(objpfx)tst-gnu2-tls1mod.so
tst-gnu2-tls1mod.so-no-z-defs = yes
-CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=$(have-mtls-descriptor)
-endif # $(have-mtls-descriptor)
+CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=$(have-test-mtls-descriptor)
+endif # $(have-test-mtls-descriptor)
ifeq (yes,$(have-protected-data))
modules-names += tst-protected1moda tst-protected1modb
$(objpfx)tst-audit-tlsdesc: $(objpfx)tst-audit-tlsdesc-mod1.so \
$(objpfx)tst-audit-tlsdesc-mod2.so \
$(shared-thread-library)
-ifneq (no,$(have-mtls-descriptor))
+ifneq (no,$(have-test-mtls-descriptor))
# The test is valid for all TLS types, but we want to exercise GNU2
# TLS if possible.
-CFLAGS-tst-audit-tlsdesc-mod1.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-audit-tlsdesc-mod2.c += -mtls-dialect=$(have-mtls-descriptor)
+CFLAGS-tst-audit-tlsdesc-mod1.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-audit-tlsdesc-mod2.c += -mtls-dialect=$(have-test-mtls-descriptor)
endif
$(objpfx)tst-audit-tlsdesc-dlopen: $(shared-thread-library)
$(objpfx)tst-audit-tlsdesc-dlopen.out: $(objpfx)tst-audit-tlsdesc-mod1.so \
$(objpfx)tst-gnu2-tls2mod1.so \
$(objpfx)tst-gnu2-tls2mod2.so
-ifneq (no,$(have-mtls-descriptor))
-CFLAGS-tst-tlsgap-mod0.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-tlsgap-mod1.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-tlsgap-mod2.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-gnu2-tls2mod0.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-gnu2-tls2mod1.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-gnu2-tls2mod2.c += -mtls-dialect=$(have-mtls-descriptor)
+ifneq (no,$(have-test-mtls-descriptor))
+CFLAGS-tst-tlsgap-mod0.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-tlsgap-mod1.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-tlsgap-mod2.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-gnu2-tls2mod0.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-gnu2-tls2mod1.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-gnu2-tls2mod2.c += -mtls-dialect=$(have-test-mtls-descriptor)
endif
$(objpfx)tst-recursive-tls: $(objpfx)tst-recursive-tlsmallocmod.so
$(objpfx)tst-tls22-mod1-vars.os $(objpfx)tst-tls22-mod2-gnu2.so
$(objpfx)tst-tls22-mod2-gnu2.so: $(objpfx)tst-tls22-mod2-gnu2.os \
$(objpfx)tst-tls22-mod2-vars.os
-ifneq (no,$(have-mtls-descriptor))
-CFLAGS-tst-tls22-gnu2.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-tls22-mod1-gnu2.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-tls22-mod2-gnu2.c += -mtls-dialect=$(have-mtls-descriptor)
+ifneq (no,$(have-test-mtls-descriptor))
+CFLAGS-tst-tls22-gnu2.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-tls22-mod1-gnu2.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-tls22-mod2-gnu2.c += -mtls-dialect=$(have-test-mtls-descriptor)
endif
# These reference symbols from the main executable.
tst-tls22-mod1.so-no-z-defs = yes
lib-noranlib: $(objpfx)libgcc-stubs.a
ifeq ($(build-shared),yes)
-ifneq (no,$(have-mtls-descriptor))
+ifneq (no,$(have-test-mtls-descriptor))
tests += tst-armtlsdescloc tst-armtlsdescextnow tst-armtlsdescextlazy
modules-names += tst-armtlsdesclocmod
modules-names += tst-armtlsdescextlazymod tst-armtlsdescextnowmod
CPPFLAGS-tst-armtlsdescextnowmod.c += -Dstatic=
CPPFLAGS-tst-armtlsdescextlazymod.c += -Dstatic=
-CFLAGS-tst-armtlsdesclocmod.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-armtlsdescextnowmod.c += -mtls-dialect=$(have-mtls-descriptor)
-CFLAGS-tst-armtlsdescextlazymod.c += -mtls-dialect=$(have-mtls-descriptor)
+CFLAGS-tst-armtlsdesclocmod.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-armtlsdescextnowmod.c += -mtls-dialect=$(have-test-mtls-descriptor)
+CFLAGS-tst-armtlsdescextlazymod.c += -mtls-dialect=$(have-test-mtls-descriptor)
LDFLAGS-tst-armtlsdescextnowmod.so += -Wl,-z,now
tst-armtlsdescloc-ENV = LD_BIND_NOW=1
tst-armtlsdescextnow-ENV = LD_BIND_NOW=1
cp $< $@
endif
-ifeq (yes,$(have-mamx-tile))
+ifeq (yesgnu2,$(have-mamx-tile)$(have-test-mtls-descriptor))
tests += \
tst-gnu2-tls2-amx \
# tests