From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 108003858436; Thu, 21 Dec 2023 18:53:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 108003858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1703184780; bh=QFevryHkrezcugCIVVlF68vQHhgRX0/OW/1hncUX49w=; h=From:To:Subject:Date:From; b=pb1RPcGMxUJnTdLJRQxDOGbJ/3dfR+6AOqXlr6NaO47z1I1hgoUjdGYun+GheW0z2 vOFIiWDJSuxE+PkDRb9izP4EgIt1o9AOVo/cQh17F3EWi5cMtCgHOiiOMBbIV0TvH6 BN4CA3QSMZbCkR6J+TErHNG4UKoBAPZTOVcYK3q0= 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: daa9123581eb72ceeda3d917ae29803cc6b96e3d X-Git-Newrev: 9de7d6f585393b6d1e455bbb5c4195797774330e Message-Id: <20231221185300.108003858436@sourceware.org> Date: Thu, 21 Dec 2023 18:53:00 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9de7d6f585393b6d1e455bbb5c4195797774330e commit 9de7d6f585393b6d1e455bbb5c4195797774330e 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 | 30 ++++++++++++++++++++++++++++++ configure.ac | 22 ++++++++++++++++++++++ math/Makefile | 8 ++++++++ sysdeps/x86_64/fpu/multiarch/Makefile | 2 ++ 4 files changed, 62 insertions(+) diff --git a/configure b/configure index a5551f96ec..bcb741baa1 100755 --- a/configure +++ b/configure @@ -7092,6 +7092,36 @@ printf "%s\n" "$libc_cv_wno_maybe_uninitialized" >&6; } config_vars="$config_vars config-cflags-wno-maybe-uninitialized = $libc_cv_wno_maybe_uninitialized" +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if -Wno-ignored-attributes is required for aliases" >&5 +printf %s "checking if -Wno-ignored-attributes is required for aliases... " >&6; } +if test ${libc_cv_wno_ignored_attributes+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat > conftest.c <&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_wno_ignored_attributes="-Wno-ignored-attributes" +fi +rm -f conftest* +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libc_cv_wno_ignored_attributes" >&5 +printf "%s\n" "$libc_cv_wno_ignored_attributes" >&6; } +config_vars="$config_vars +config-cflags-wno-ignored-attributes = $libc_cv_wno_ignored_attributes" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5 printf %s "checking whether cc puts quotes around section names... " >&6; } if test ${libc_cv_have_section_quotes+y} diff --git a/configure.ac b/configure.ac index 315fc5fb2b..c10e4bc306 100644 --- a/configure.ac +++ b/configure.ac @@ -1337,6 +1337,28 @@ AC_CACHE_CHECK([for -Wno-maybe-uninitialized], libc_cv_wno_maybe_uninitialized, LIBC_CONFIG_VAR([config-cflags-wno-maybe-uninitialized], [$libc_cv_wno_maybe_uninitialized]) +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 <