From patchwork Mon Nov 12 18:47:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 30118 Received: (qmail 26400 invoked by alias); 12 Nov 2018 18:48:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 26391 invoked by uid 89); 12 Nov 2018 18:47:59 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Mon, 12 Nov 2018 18:47:51 +0000 From: Joseph Myers To: Subject: Fix i686 build with GCC 9 [committed] Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 This patch fixes the glibc build for i686 with current mainline GCC, where there are warnings about inconsistent attributes for aliases in certain files defining libm IFUNCs. In three of the files, the aliases were defined in terms of internal symbols such as __sinf, and copied attributes from file-local declarations of those functions which lacked the nothrow attribute. Since the nothrow attribute is present on the declarations from (which include declarations of those __-prefixed functions), the natural fix was to include in those files, replacing the local declarations. In the other three files, a more complicated __hidden_ver1 call was involved in the warnings. has not been included at this point and, furthermore, it is included indirectly only later in the source file after macros have been defined to remap a function name therein. So there isn't an obvious declaration from which to copy the attribute and it seems simplest and safest just to add __THROW to the hidden_ver1 calls. Tested for i686 (build-many-glibcs.py compilers build for x86_64-linux-gnu with GCC mainline; full testsuite run with GCC 7). Committed. 2018-11-12 Joseph Myers * sysdeps/i386/i686/fpu/multiarch/e_expf.c [SHARED]: Use __THROW with __hidden_ver1 call. * sysdeps/i386/i686/fpu/multiarch/e_log2f.c [SHARED]: Likewise. * sysdeps/i386/i686/fpu/multiarch/e_logf.c [SHARED]: Likewise. * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: Include . (__cosf): Do not declare here. * sysdeps/i386/i686/fpu/multiarch/s_sincosf.c: Include . (__sincosf): Do not declare here. * sysdeps/i386/i686/fpu/multiarch/s_sinf.c: Include . (__sinf): Do not declare here. diff --git a/sysdeps/i386/i686/fpu/multiarch/e_expf.c b/sysdeps/i386/i686/fpu/multiarch/e_expf.c index 1f7c35701b..d11ca309a7 100644 --- a/sysdeps/i386/i686/fpu/multiarch/e_expf.c +++ b/sysdeps/i386/i686/fpu/multiarch/e_expf.c @@ -26,7 +26,7 @@ libc_ifunc_redirected (__redirect_expf, __expf, IFUNC_SELECTOR ()); #include #ifdef SHARED __hidden_ver1 (__expf_ia32, __GI___expf, __redirect_expf) - __attribute__ ((visibility ("hidden"))); + __attribute__ ((visibility ("hidden"))) __THROW; # include versioned_symbol (libm, __expf, expf, GLIBC_2_27); diff --git a/sysdeps/i386/i686/fpu/multiarch/e_log2f.c b/sysdeps/i386/i686/fpu/multiarch/e_log2f.c index 3dacaa609e..9c11536604 100644 --- a/sysdeps/i386/i686/fpu/multiarch/e_log2f.c +++ b/sysdeps/i386/i686/fpu/multiarch/e_log2f.c @@ -26,7 +26,7 @@ libc_ifunc_redirected (__redirect_log2f, __log2f, IFUNC_SELECTOR ()); #include #ifdef SHARED __hidden_ver1 (__log2f_ia32, __GI___log2f, __redirect_log2f) - __attribute__ ((visibility ("hidden"))); + __attribute__ ((visibility ("hidden"))) __THROW; # include versioned_symbol (libm, __log2f, log2f, GLIBC_2_27); diff --git a/sysdeps/i386/i686/fpu/multiarch/e_logf.c b/sysdeps/i386/i686/fpu/multiarch/e_logf.c index 1ce90e2e05..070e8b7175 100644 --- a/sysdeps/i386/i686/fpu/multiarch/e_logf.c +++ b/sysdeps/i386/i686/fpu/multiarch/e_logf.c @@ -26,7 +26,7 @@ libc_ifunc_redirected (__redirect_logf, __logf, IFUNC_SELECTOR ()); #include #ifdef SHARED __hidden_ver1 (__logf_ia32, __GI___logf, __redirect_logf) - __attribute__ ((visibility ("hidden"))); + __attribute__ ((visibility ("hidden"))) __THROW; # include versioned_symbol (libm, __logf, logf, GLIBC_2_27); diff --git a/sysdeps/i386/i686/fpu/multiarch/s_cosf.c b/sysdeps/i386/i686/fpu/multiarch/s_cosf.c index a4556a478d..52951186cc 100644 --- a/sysdeps/i386/i686/fpu/multiarch/s_cosf.c +++ b/sysdeps/i386/i686/fpu/multiarch/s_cosf.c @@ -18,10 +18,10 @@ #include #include +#include extern float __cosf_sse2 (float); extern float __cosf_ia32 (float); -float __cosf (float); libm_ifunc (__cosf, HAS_CPU_FEATURE (SSE2) ? __cosf_sse2 : __cosf_ia32); libm_alias_float (__cos, cos); diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c b/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c index 5f21f5c0ed..164c97ba7b 100644 --- a/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c +++ b/sysdeps/i386/i686/fpu/multiarch/s_sincosf.c @@ -18,10 +18,10 @@ #include #include +#include extern void __sincosf_sse2 (float, float *, float *); extern void __sincosf_ia32 (float, float *, float *); -void __sincosf (float, float *, float *); libm_ifunc (__sincosf, HAS_CPU_FEATURE (SSE2) ? __sincosf_sse2 : __sincosf_ia32); diff --git a/sysdeps/i386/i686/fpu/multiarch/s_sinf.c b/sysdeps/i386/i686/fpu/multiarch/s_sinf.c index 80a7ffaa1e..c69976b2ec 100644 --- a/sysdeps/i386/i686/fpu/multiarch/s_sinf.c +++ b/sysdeps/i386/i686/fpu/multiarch/s_sinf.c @@ -18,10 +18,10 @@ #include #include +#include extern float __sinf_sse2 (float); extern float __sinf_ia32 (float); -float __sinf (float); libm_ifunc (__sinf, HAS_CPU_FEATURE (SSE2) ? __sinf_sse2 : __sinf_ia32); libm_alias_float (__sin, sin);