From 8d98c7c00f3f06545de9e5ce5cf778d2ab2450a4 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Fri, 11 Mar 2022 10:40:44 -0300 Subject: configure: Use -Wno-ignored-attributes if compiler warns about multiple aliases clang emits an warning when a double alias redirection is used, to warn the the original symbol will be used even when weak definition is overridden. However, this is a common pattern for weak_alias, where multiple alias are set to same symbol. Reviewed-by: Fangrui Song --- configure | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'configure') diff --git a/configure b/configure index adf263d06d..fc3d7842de 100755 --- a/configure +++ b/configure @@ -6347,6 +6347,35 @@ $as_echo "$libc_cv_mtls_dialect_gnu2" >&6; } config_vars="$config_vars have-mtls-dialect-gnu2 = $libc_cv_mtls_dialect_gnu2" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if -Wno-ignored-attributes is required for aliases" >&5 +$as_echo_n "checking if -Wno-ignored-attributes is required for aliases... " >&6; } +if ${libc_cv_wno_ignored_attributes+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } +then + libc_cv_wno_ignored_attributes="-Wno-ignored-attributes" +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_ignored_attributes" >&5 +$as_echo "$libc_cv_wno_ignored_attributes" >&6; } +config_vars="$config_vars +config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5 $as_echo_n "checking whether cc puts quotes around section names... " >&6; } if ${libc_cv_have_section_quotes+:} false; then : -- cgit 1.4.1