From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id ACD9C3857B98; Thu, 9 Feb 2023 19:47:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACD9C3857B98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675972078; bh=RuGS5L4YVBqFHUGvrVbz2NSrFtNWTWFOvr0GylqQNBU=; h=From:To:Subject:Date:From; b=bM8yyjSURpQmyeYbtOfOypUug+N9uq0+Pcma0nbNCASNYVJOQ9GeNKiPb/DGK6mN+ TY43Lqi9EcMYcVEW9EgTx07Dr7PfLSAw+ULGs1iS1PwT/ZekNAWyDmFhXW62857bj6 Q1ZxEvAJ9fFikRWmS2uRF7a+fEcEG9G/m9agG1Hg= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] configure: Use -Wno-ignored-attributes if compiler warns about multiple aliases X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 0f3815d866b876b6d178cb2d61c0eec2d150ec9e X-Git-Newrev: ba390dd1a58a1414cc7ae0571286d8f4f085f0f0 Message-Id: <20230209194758.ACD9C3857B98@sourceware.org> Date: Thu, 9 Feb 2023 19:47:58 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ba390dd1a58a1414cc7ae0571286d8f4f085f0f0 commit ba390dd1a58a1414cc7ae0571286d8f4f085f0f0 Author: Adhemerval Zanella Date: Fri Mar 11 10:40:44 2022 -0300 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. Howerver, this is a common pattern for weak_alias, where multiple alias are set to same symbol. Diff: --- configure | 29 +++++++++++++++++++++++++++++ configure.ac | 22 ++++++++++++++++++++++ math/Makefile | 8 ++++++++ sysdeps/x86_64/fpu/multiarch/Makefile | 2 ++ 4 files changed, 61 insertions(+) diff --git a/configure b/configure index f1fddbfeb6..073d474fcc 100755 --- a/configure +++ b/configure @@ -5992,6 +5992,35 @@ $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 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 : diff --git a/configure.ac b/configure.ac index 1b39d19735..c2a90c070d 100644 --- a/configure.ac +++ b/configure.ac @@ -1410,6 +1410,28 @@ rm -f conftest*]) LIBC_CONFIG_VAR([config-cflags-wno-ignored-attributes], [$libc_cv_wno_ignored_attributes]) +dnl clang emits an warning when a double alias redirection is used, to warn +dnl the the original symbol will be used even when weak definition is overridden. +dnl This is a common pattern for weak_alias, where multiple alias are set to +dnl same symbol. +AC_CACHE_CHECK([if -Wno-ignored-attributes is required for aliases], + libc_cv_wno_ignored_attributes, [dnl +cat > conftest.c < conftest.c <