This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix armv7 build with GCC 9 [committed]


Similar to the x86_64 build issues, glibc fails to build for armv7
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: the relevant attributes (nonnull, leaf)
are present on the header declaration, but elided therefrom when glibc
itself if being built (whatever the reasons are for disabling the
nonnull and leaf attributes in that case, and whether or not those
reasons are actually still valid).  This patch fixes the issue
similarly to the x86_64 fix, by adding an addition __attribute_copy__
use (in this case, on the definition of arm_libc_ifunc_hidden_def).

Tested with build-many-glibcs.py build for armeb-linux-gnueabi-be8.  
Committed.

2018-11-12  Joseph Myers  <joseph@codesourcery.com>

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

diff --git a/sysdeps/arm/arm-ifunc.h b/sysdeps/arm/arm-ifunc.h
index 80f4f0e3a3..71fb172b3b 100644
--- a/sysdeps/arm/arm-ifunc.h
+++ b/sysdeps/arm/arm-ifunc.h
@@ -27,7 +27,8 @@
 #if defined SHARED
 # define arm_libc_ifunc_hidden_def(redirect_name, name) \
   __hidden_ver1 (name, __GI_##name, redirect_name) \
-    __attribute__ ((visibility ("hidden")))
+    __attribute__ ((visibility ("hidden"))) \
+    __attribute_copy__ (name)
 #else
 # define arm_libc_ifunc_hidden_def(redirect_name, name)
 #endif

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]