From c79607a474439d50e9f0bcae59709817112900cc Mon Sep 17 00:00:00 2001 From: "Paul E. Murphy" Date: Wed, 8 Jul 2020 16:49:34 -0500 Subject: [PATCH] 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 Reviewed-by: Tulio Magno Quites Machado Filho --- sysdeps/powerpc/powerpc64/le/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- 2.43.5