aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 38 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 0b0d887..09d2ab7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -483,6 +483,9 @@ with_fp_cond=1
# A preconfigure script may define another name to TLS descriptor variant
mtls_descriptor=gnu2
+# A preconfigure script may define another name to traditional TLS variant
+mtls_traditional=gnu
+
dnl Let sysdeps/*/preconfigure act here.
LIBC_PRECONFIGURE([$srcdir], [for sysdeps])
@@ -522,7 +525,7 @@ AC_PROG_LN_S
LIBC_PROG_BINUTILS
-# Accept binutils 2.25 or newer.
+# Accept binutils 2.39 or newer.
libc_cv_with_lld=no
case $($LD --version) in
"GNU gold"*)
@@ -543,7 +546,7 @@ case $($LD --version) in
*)
AC_CHECK_PROG_VER(LD, $LD, --version,
[GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
- [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
+ [2.[1-9][0-9][0-9]*|2.39*|2.[4-9][0-9]*|[3-9].*|[1-9][0-9]*],
LD=: critic_missing="$critic_missing GNU ld")
;;
esac
@@ -1401,6 +1404,16 @@ LIBC_TRY_TEST_CC_COMMAND([for tls descriptor support],
LIBC_CONFIG_VAR([have-test-mtls-descriptor],
[$libc_cv_test_mtls_descriptor])
+dnl Check if TEST_CC support traditional tls.
+LIBC_TRY_TEST_CC_COMMAND([for traditional tls support],
+ [$conftest_code],
+ [-fPIC -mtls-dialect=$mtls_traditional -nostdlib -nostartfiles -shared],
+ libc_cv_test_mtls_traditional,
+ [libc_cv_test_mtls_traditional=$mtls_traditional],
+ [libc_cv_test_mtls_traditional=no])
+LIBC_CONFIG_VAR([have-test-mtls-traditional],
+ [$libc_cv_test_mtls_traditional])
+
dnl clang emits an warning for a double alias redirection, to warn the
dnl original symbol is sed even when weak definition overrides it.
dnl It is a usual pattern for weak_alias, where multiple alias point to
@@ -1575,6 +1588,29 @@ LIBC_CONFIG_VAR([cc-option-wimplicit-fallthrough],
[$libc_cv_cc_wimplicit_fallthrough])
AC_SUBST(libc_cv_test_cc_wimplicit_fallthrough)
+LIBC_TRY_CC_AND_TEST_CC_OPTION([for -Wfree-labels],
+ [-Werror -Wfree-labels],
+ libc_cv_cc_wfree_labels,
+ [libc_cv_cc_wfree_labels=-Wfree-labels],
+ [libc_cv_cc_wfree_labels=],
+ libc_cv_test_cc_wfree_labels,
+ [libc_cv_test_cc_wfree_labels=-Wfree-labels],
+ [libc_cv_test_cc_wfree_labels=])
+LIBC_CONFIG_VAR([cc-option-wfree-labels], [$libc_cv_cc_wfree_labels])
+AC_SUBST(libc_cv_test_cc_wfree_labels)
+
+LIBC_TRY_CC_AND_TEST_CC_OPTION([for -Wmissing-parameter-name],
+ [-Werror -Wmissing-parameter-name],
+ libc_cv_cc_wmissing_parameter_name,
+ [libc_cv_cc_wmissing_parameter_name=-Wmissing-parameter-name],
+ [libc_cv_cc_wmissing_parameter_name=],
+ libc_cv_test_cc_wmissing_parameter_name,
+ [libc_cv_test_cc_wmissing_parameter_name=-Wmissing-parameter-name],
+ [libc_cv_test_cc_wmissing_parameter_name=])
+LIBC_CONFIG_VAR([cc-option-wmissing-parameter-name],
+ [$libc_cv_cc_wmissing_parameter_name])
+AC_SUBST(libc_cv_test_cc_wmissing_parameter_name)
+
conftest_code="
void bar (void (*callback) (void));
int foo (void)