From patchwork Tue Nov 13 00:27:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 30125 Received: (qmail 63586 invoked by alias); 13 Nov 2018 00:27:48 -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 63576 invoked by uid 89); 13 Nov 2018 00:27:48 -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: Tue, 13 Nov 2018 00:27:41 +0000 From: Joseph Myers To: Subject: Fix sparc64 build with GCC 9 [committed] Message-ID: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Similar to the x86_64 and armv7 build issues, glibc fails to build for sparc64 with current mainline GCC because of aliases declared in the course of defining IFUNCs, which copy their attributes from a header declaration, ending up with fewer attributes than the (built-in) string function they alias. This patch fixes the issue similarly to the fixes for those other architectures. Tested with build-many-glibcs.py compilers build for sparc64-linux-gnu. Committed. 2018-11-13 Joseph Myers * sysdeps/sparc/sparc-ifunc.h [SHARED] (sparc_ifunc_redirected_hidden_def): Use __attribute_copy__ to copy attributes from name. diff --git a/sysdeps/sparc/sparc-ifunc.h b/sysdeps/sparc/sparc-ifunc.h index 561aeea2f8..10552e93c3 100644 --- a/sysdeps/sparc/sparc-ifunc.h +++ b/sysdeps/sparc/sparc-ifunc.h @@ -35,7 +35,8 @@ #if defined SHARED # define sparc_ifunc_redirected_hidden_def(redirect_name, name) \ __hidden_ver1 (name, __GI_##name, redirect_name) \ - __attribute__ ((visibility ("hidden"))); + __attribute__ ((visibility ("hidden"))) \ + __attribute_copy__ (name); #else # define sparc_ifunc_redirected_hidden_def(redirect_name, name) #endif