diff mbox series

Fix sparc64 build with GCC 9 [committed]

Message ID alpine.DEB.2.21.1811130027250.18130@digraph.polyomino.org.uk
State New
Headers show
Series Fix sparc64 build with GCC 9 [committed] | expand

Commit Message

Joseph Myers Nov. 13, 2018, 12:27 a.m. UTC
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  <joseph@codesourcery.com>

	* sysdeps/sparc/sparc-ifunc.h [SHARED]
	(sparc_ifunc_redirected_hidden_def): Use __attribute_copy__ to
	copy attributes from name.

Comments

David Miller Nov. 13, 2018, 12:29 a.m. UTC | #1
From: Joseph Myers <joseph@codesourcery.com>
Date: Tue, 13 Nov 2018 00:27:41 +0000

> 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.

Thank you.
diff mbox series

Patch

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