From patchwork Thu Feb 11 10:19:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 42014 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8DA423870881; Thu, 11 Feb 2021 10:22:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8DA423870881 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1613038924; bh=tLXT2cFMfSGP6yiFbfoQxma7JLmGcKHJtLsp3+8lm14=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=UqydznmITCzKdMcJm51CrYi307vV4W/Xyy8NSangtpLwN8b5cedQrzvO9pV+aesuT ui9oxk2NV0VUzRUlSGqfTJh90zs73ODbpDJ/gEn/xuhKtSnn4IdRQR8+FY1ThHa1+Y emKNUvhKRaRlpvR2EhgdyWV/W/k6sCNNQzOrUEpE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from dragonfly.birch.relay.mailchannels.net (dragonfly.birch.relay.mailchannels.net [23.83.209.51]) by sourceware.org (Postfix) with ESMTPS id 6B4BD386188A for ; Thu, 11 Feb 2021 10:22:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 6B4BD386188A X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 427F26824F6; Thu, 11 Feb 2021 10:22:00 +0000 (UTC) Received: from pdx1-sub0-mail-a12.g.dreamhost.com (100-96-11-12.trex.outbound.svc.cluster.local [100.96.11.12]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B34AC682496; Thu, 11 Feb 2021 10:21:59 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a12.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.11.12 (trex/6.0.2); Thu, 11 Feb 2021 10:22:00 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Juvenile-Obese: 3c2a3c6370cb8ddc_1613038920003_549875812 X-MC-Loop-Signature: 1613038920003:39500330 X-MC-Ingress-Time: 1613038920003 Received: from pdx1-sub0-mail-a12.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTP id E05E284DA7; Thu, 11 Feb 2021 02:21:58 -0800 (PST) Received: from rhbox.intra.reserved-bit.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTPSA id C4B367F246; Thu, 11 Feb 2021 02:21:56 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a12 To: libc-alpha@sourceware.org Subject: [PATCH 1/2] Move __isnanf128 to libc.so Date: Thu, 11 Feb 2021 15:49:07 +0530 Message-Id: <20210211101908.2825685-2-siddhesh@sourceware.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210211101908.2825685-1-siddhesh@sourceware.org> References: <20210211101908.2825685-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3494.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP, URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Cc: fweimer@redhat.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" All of the isnan functions are in libc.so due to printf_fp, so move __isnanf128 there too for consistency. --- sysdeps/ieee754/float128/Versions | 2 +- sysdeps/mach/hurd/i386/libc.abilist | 1 + sysdeps/mach/hurd/i386/libm.abilist | 1 - sysdeps/unix/sysv/linux/i386/libc.abilist | 1 + sysdeps/unix/sysv/linux/i386/libm.abilist | 1 - sysdeps/unix/sysv/linux/ia64/libc.abilist | 1 + sysdeps/unix/sysv/linux/ia64/libm.abilist | 1 - sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist | 1 + sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist | 1 - sysdeps/unix/sysv/linux/x86_64/64/libc.abilist | 1 + sysdeps/unix/sysv/linux/x86_64/64/libm.abilist | 1 - sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist | 1 + sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist | 1 - 13 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysdeps/ieee754/float128/Versions b/sysdeps/ieee754/float128/Versions index 2eebc6f1b0..8e644385f4 100644 --- a/sysdeps/ieee754/float128/Versions +++ b/sysdeps/ieee754/float128/Versions @@ -4,6 +4,7 @@ %endif libc { FLOAT128_VERSION { + __isnanf128; __strtof128_internal; __wcstof128_internal; } @@ -30,7 +31,6 @@ libm { __hypotf128_finite; __iseqsigf128; __isinff128; - __isnanf128; __issignalingf128; __j0f128_finite; __j1f128_finite; diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist index 509e9b7cb0..58b0120d58 100644 --- a/sysdeps/mach/hurd/i386/libc.abilist +++ b/sysdeps/mach/hurd/i386/libc.abilist @@ -1995,6 +1995,7 @@ GLIBC_2.25 gnu_dev_minor F GLIBC_2.25 strfromd F GLIBC_2.25 strfromf F GLIBC_2.25 strfroml F +GLIBC_2.26 __isnanf128 F GLIBC_2.26 __strtof128_internal F GLIBC_2.26 __wcstof128_internal F GLIBC_2.26 _hurd_exec_paths F diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index a19a69ce6a..bb077b9030 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -474,7 +474,6 @@ GLIBC_2.26 __gammaf128_r_finite F GLIBC_2.26 __hypotf128_finite F GLIBC_2.26 __iseqsigf128 F GLIBC_2.26 __isinff128 F -GLIBC_2.26 __isnanf128 F GLIBC_2.26 __issignalingf128 F GLIBC_2.26 __j0f128_finite F GLIBC_2.26 __j1f128_finite F diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist index ddc5837059..ed631c0423 100644 --- a/sysdeps/unix/sysv/linux/i386/libc.abilist +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2002,6 +2002,7 @@ GLIBC_2.25 getrandom F GLIBC_2.25 strfromd F GLIBC_2.25 strfromf F GLIBC_2.25 strfroml F +GLIBC_2.26 __isnanf128 F GLIBC_2.26 __strtof128_internal F GLIBC_2.26 __wcstof128_internal F GLIBC_2.26 preadv2 F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index 0ab740dd97..335b5e7aa2 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -481,7 +481,6 @@ GLIBC_2.26 __gammaf128_r_finite F GLIBC_2.26 __hypotf128_finite F GLIBC_2.26 __iseqsigf128 F GLIBC_2.26 __isinff128 F -GLIBC_2.26 __isnanf128 F GLIBC_2.26 __issignalingf128 F GLIBC_2.26 __j0f128_finite F GLIBC_2.26 __j1f128_finite F diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist index e3b345b803..e4e0bfb2b8 100644 --- a/sysdeps/unix/sysv/linux/ia64/libc.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist @@ -1872,6 +1872,7 @@ GLIBC_2.25 getrandom F GLIBC_2.25 strfromd F GLIBC_2.25 strfromf F GLIBC_2.25 strfroml F +GLIBC_2.26 __isnanf128 F GLIBC_2.26 __strtof128_internal F GLIBC_2.26 __wcstof128_internal F GLIBC_2.26 preadv2 F diff --git a/sysdeps/unix/sysv/linux/ia64/libm.abilist b/sysdeps/unix/sysv/linux/ia64/libm.abilist index c8e8fd7142..ec82b83e6f 100644 --- a/sysdeps/unix/sysv/linux/ia64/libm.abilist +++ b/sysdeps/unix/sysv/linux/ia64/libm.abilist @@ -411,7 +411,6 @@ GLIBC_2.26 __gammaf128_r_finite F GLIBC_2.26 __hypotf128_finite F GLIBC_2.26 __iseqsigf128 F GLIBC_2.26 __isinff128 F -GLIBC_2.26 __isnanf128 F GLIBC_2.26 __issignalingf128 F GLIBC_2.26 __j0f128_finite F GLIBC_2.26 __j1f128_finite F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist index 0ea50dc851..d89e2ca6bb 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist @@ -2183,6 +2183,7 @@ GLIBC_2.25 getrandom F GLIBC_2.25 strfromd F GLIBC_2.25 strfromf F GLIBC_2.25 strfroml F +GLIBC_2.26 __isnanf128 F GLIBC_2.26 __strtof128_internal F GLIBC_2.26 __wcstof128_internal F GLIBC_2.26 preadv2 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist index 4f8d3c1191..8266bc32f4 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist @@ -478,7 +478,6 @@ GLIBC_2.26 __gammaf128_r_finite F GLIBC_2.26 __hypotf128_finite F GLIBC_2.26 __iseqsigf128 F GLIBC_2.26 __isinff128 F -GLIBC_2.26 __isnanf128 F GLIBC_2.26 __issignalingf128 F GLIBC_2.26 __j0f128_finite F GLIBC_2.26 __j1f128_finite F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist index 2744bba4af..4e4682c657 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist @@ -1853,6 +1853,7 @@ GLIBC_2.25 getrandom F GLIBC_2.25 strfromd F GLIBC_2.25 strfromf F GLIBC_2.25 strfroml F +GLIBC_2.26 __isnanf128 F GLIBC_2.26 __strtof128_internal F GLIBC_2.26 __wcstof128_internal F GLIBC_2.26 preadv2 F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist index 89c4ac484d..b6a088ca64 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist @@ -472,7 +472,6 @@ GLIBC_2.26 __gammaf128_r_finite F GLIBC_2.26 __hypotf128_finite F GLIBC_2.26 __iseqsigf128 F GLIBC_2.26 __isinff128 F -GLIBC_2.26 __isnanf128 F GLIBC_2.26 __issignalingf128 F GLIBC_2.26 __j0f128_finite F GLIBC_2.26 __j1f128_finite F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist index ce2f4fb72b..8151ac474e 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist @@ -2106,6 +2106,7 @@ GLIBC_2.25 getrandom F GLIBC_2.25 strfromd F GLIBC_2.25 strfromf F GLIBC_2.25 strfroml F +GLIBC_2.26 __isnanf128 F GLIBC_2.26 __strtof128_internal F GLIBC_2.26 __wcstof128_internal F GLIBC_2.26 preadv2 F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist index d3c9cec71a..dfb5a7fa79 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist @@ -472,7 +472,6 @@ GLIBC_2.26 __gammaf128_r_finite F GLIBC_2.26 __hypotf128_finite F GLIBC_2.26 __iseqsigf128 F GLIBC_2.26 __isinff128 F -GLIBC_2.26 __isnanf128 F GLIBC_2.26 __issignalingf128 F GLIBC_2.26 __j0f128_finite F GLIBC_2.26 __j1f128_finite F From patchwork Thu Feb 11 10:19:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 42015 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F17BD3870867; Thu, 11 Feb 2021 10:22:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F17BD3870867 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1613038927; bh=LVIS7xSx3jbk+/I7dpM3NF4KKgT6xKa246w+k86HDxg=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=FzRTBp+0+Wis+oTmcf8r6Tw6QytjtOLKuKnp/bNLfiVPhKgtY/IOs+mSCjcK85XY0 O3ghSZQCauqZc4Tie9z7UYSS0I3GwJyYH4rKgFxElLAqGe+RkEhayc6ZHE9dWSkoVw OJUXCnOabXJHdkKvCgZZBZjT7ogfSKvR0Xaiecao= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from cyan.elm.relay.mailchannels.net (cyan.elm.relay.mailchannels.net [23.83.212.47]) by sourceware.org (Postfix) with ESMTPS id 3740B3870867 for ; Thu, 11 Feb 2021 10:22:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3740B3870867 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 284AD921B08; Thu, 11 Feb 2021 10:22:03 +0000 (UTC) Received: from pdx1-sub0-mail-a12.g.dreamhost.com (100-96-16-13.trex.outbound.svc.cluster.local [100.96.16.13]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id B24BC922836; Thu, 11 Feb 2021 10:22:02 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a12.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.13 (trex/6.0.2); Thu, 11 Feb 2021 10:22:03 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Stop-Hook: 224535625657feb2_1613038922971_1614156732 X-MC-Loop-Signature: 1613038922971:1901998806 X-MC-Ingress-Time: 1613038922970 Received: from pdx1-sub0-mail-a12.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTP id 1904B7F246; Thu, 11 Feb 2021 02:22:02 -0800 (PST) Received: from rhbox.intra.reserved-bit.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a12.g.dreamhost.com (Postfix) with ESMTPSA id A9E5C87B22; Thu, 11 Feb 2021 02:21:59 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a12 To: libc-alpha@sourceware.org Subject: [PATCH 2/2] Avoid adding duplicated symbols into static libraries Date: Thu, 11 Feb 2021 15:49:08 +0530 Message-Id: <20210211101908.2825685-3-siddhesh@sourceware.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210211101908.2825685-1-siddhesh@sourceware.org> References: <20210211101908.2825685-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3492.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP, URIBL_BLACK autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Cc: fweimer@redhat.com Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" Some math functions (such as __isnan*) are built into both libm and libc because they are needed in libc. The symbol gets exported from libc.so and not libm.so, because of which dynamic linking works fine; the symbols are always resolved from libc.so and libm.so uses its internal copy of the same function if needed. When linking statically though, the libm variants get used throughout because the symbols are exported in both archives and libm.a is searched first. This patch removes these duplicate objects from the libm.a archive so that programs always link to libc in both, the static and dynamic case. The difference this will cause is that libm uses of these functions will start using the libc versions in the !SHARED case. This is harmless at the moment because the objects are identical except for their names. Some of these duplicates could be removed from libm.so too, but I avoided that in the interest of retaining an internal reference if at all those functions get used within libm in future. --- math/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/math/Makefile b/math/Makefile index 687aa5d510..c4cc1b2068 100644 --- a/math/Makefile +++ b/math/Makefile @@ -196,6 +196,9 @@ calls = s_isinfF s_isnanF s_finiteF s_copysignF s_modfF s_scalbnF s_frexpF \ gen-calls = s_ldexpF generated += $(foreach s,.c .S,$(call type-foreach, $(calls:s_%=m_%$(s)))) routines = $(call type-foreach, $(calls)) +# The $(calls) that are shared between libm and libc are not included in static +# libm so the symbols end up in exactly one place. +libm-shared-only-routines = $(call type-foreach, $(calls:s_%=m_%)) ifeq ($(build-mathvec),yes) # We need to install libm.so and libm.a as linker scripts