From patchwork Mon Aug 21 17:59:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 22289 Received: (qmail 67582 invoked by alias); 21 Aug 2017 17:59:38 -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 67246 invoked by uid 89); 21 Aug 2017 17:59:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.4 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, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Mon, 21 Aug 2017 17:59:27 +0000 From: Joseph Myers To: "H.J. Lu" CC: Florian Weimer , GNU C Library Subject: Re: [PATCH] Add hidden visibility to internal function prototypes In-Reply-To: Message-ID: References: <20170817122244.GA14297@gmail.com> <1cb1b2db-db57-85dd-02ff-a7a1371bcee3@redhat.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) The commit commit 568ff4296c72534e49c8d9c83c33f3a0069cccc7 Author: H.J. Lu Date: Mon Aug 21 05:50:38 2017 -0700 Add hidden visibility to internal function prototypes breaks the build of the testsuite for many platforms: https://sourceware.org/ml/libc-testresults/2017-q3/msg00300.html The errors are of the following form, building math/atest-exp: [...] /scratch/jmyers/glibc-bot/build/glibcs/aarch64-linux-gnu/glibc/stdlib/rshift.o: In function `__mpn_rshift': /scratch/jmyers/glibc-bot/build/glibcs/aarch64-linux-gnu/glibc-src/stdlib/rshift.c:45: undefined reference to `__assert_fail' /scratch/jmyers/glibc-bot/install/compilers/aarch64-linux-gnu/lib/gcc/aarch64-glibc-linux-gnu/7.2.1/../../../../aarch64-glibc-linux-gnu/bin/ld: /scratch/jmyers/glibc-bot/build/glibcs/aarch64-linux-gnu/glibc/math/atest-exp: hidden symbol `__assert_fail' isn't defined /scratch/jmyers/glibc-bot/install/compilers/aarch64-linux-gnu/lib/gcc/aarch64-glibc-linux-gnu/7.2.1/../../../../aarch64-glibc-linux-gnu/bin/ld: final link failed: Bad value This test is using various objects from the build of libc. Some of those objects contain references to __assert_fail. Because those references are hidden, they cannot refer to __assert_fail from libc.so. Given the tests using internal objects those symbols in libc.a can't safely be made hidden, so this patch reverts the problem commit until any alternative approach that doesn't break the build can be found. Committed (having tested on aarch64 with build-many-glibcs.py that this fixes the build). diff --git a/ChangeLog b/ChangeLog index b0f3a17..0e0ab13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2017-08-21 Joseph Myers + Revert: + 2017-08-21 H.J. Lu + + * include/libc-symbols.h (__hidden_proto_hiddenattr): New for + building libc.a. + (hidden_proto): Likewise. + (hidden_tls_proto): Likewise. + (__hidden_proto): Likewise. + [BZ #21973] * sysdeps/sparc/sparc32/fpu/w_sqrt_compat.S: Remove file. * sysdeps/sparc/sparc32/fpu/w_sqrtf_compat.S: Likewise. diff --git a/include/libc-symbols.h b/include/libc-symbols.h index fe3571a..d6a1c26 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -513,20 +513,8 @@ for linking") # endif #else # ifndef __ASSEMBLER__ -# if !defined SHARED && IS_IN (libc) && !defined LIBC_NONSHARED \ - && !defined NO_HIDDEN -# define __hidden_proto_hiddenattr(attrs...) \ - __attribute__ ((visibility ("hidden"), ##attrs)) -# define hidden_proto(name, attrs...) \ - __hidden_proto (name, , name, ##attrs) -# define hidden_tls_proto(name, attrs...) \ - __hidden_proto (name, __thread, name, ##attrs) -# define __hidden_proto(name, thread, internal, attrs...) \ - extern thread __typeof (name) name __hidden_proto_hiddenattr (attrs); -# else -# define hidden_proto(name, attrs...) -# define hidden_tls_proto(name, attrs...) -# endif +# define hidden_proto(name, attrs...) +# define hidden_tls_proto(name, attrs...) # else # define HIDDEN_JUMPTARGET(name) JUMPTARGET(name) # endif /* Not __ASSEMBLER__ */