summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2018-11-13 00:27:06 +0000
committerJoseph Myers <joseph@codesourcery.com>2018-11-13 00:27:06 +0000
commit53f5c65914b7601b652cd7a38714885a8492e562 (patch)
treea82ff1908254061f83a2a905215c59c6ea1b748c /sysdeps
parentFix armv7 build with GCC 9. (diff)
downloadglibc-53f5c65914b7601b652cd7a38714885a8492e562.tar.gz
glibc-53f5c65914b7601b652cd7a38714885a8492e562.tar.bz2
glibc-53f5c65914b7601b652cd7a38714885a8492e562.zip
Fix sparc64 build with GCC 9.
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. * sysdeps/sparc/sparc-ifunc.h [SHARED] (sparc_ifunc_redirected_hidden_def): Use __attribute_copy__ to copy attributes from name.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/sparc/sparc-ifunc.h3
1 files changed, 2 insertions, 1 deletions
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