summary refs log tree commit diff
diff options
context:
space:
mode:
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-07-08 16:49:34 -0500
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>2020-07-21 09:03:01 -0500
commitc79607a474439d50e9f0bcae59709817112900cc (patch)
treeb7925baf3d7caeea8c46c982f5a6f79c50d592c5
parentec2f1fddf29053957d061dfe310f106388472a4f (diff)
downloadglibc-c79607a474439d50e9f0bcae59709817112900cc.tar.gz
glibc-c79607a474439d50e9f0bcae59709817112900cc.tar.xz
glibc-c79607a474439d50e9f0bcae59709817112900cc.zip
powerpc64le: guarantee a .gnu.attributes section [BZ #26220]
Upstream GCC 11 development is now building the ibm128 runtime
support (in libgcc) without a .gnu.attributes section on ppc64le.
Ensure we have one to replace by building one ibm128 file in
libc and libm with attributes.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Reviewed-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
-rw-r--r--sysdeps/powerpc/powerpc64/le/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/powerpc/powerpc64/le/Makefile b/sysdeps/powerpc/powerpc64/le/Makefile
index 05ab13d85c..033dc77b01 100644
--- a/sysdeps/powerpc/powerpc64/le/Makefile
+++ b/sysdeps/powerpc/powerpc64/le/Makefile
@@ -38,6 +38,14 @@ if [ ! -z "$(filter libm.so libc.so,$(notdir $1))" ]; then \
 fi
 endef
 
+# Ensure a .gnu.attributes section is present by building an ibm128 file with
+# -mgnu-attribute in both libm and libc shared libraries.  Prior to GCC 11 this
+# section was implicitly included via static libgcc ibm128 routines.
+ifeq ($(subdir),math)
+$(objpfx)m_ldexpl.os: CFLAGS += -mgnu-attribute
+$(objpfx)s_ldexpl.os: CFLAGS += -mgnu-attribute
+endif
+
 endif # ifeq ($(build-shared),yes)
 endif # ifeq ($(ibm128-fcts),yes)