From: Paul E. Murphy Date: Fri, 7 Feb 2020 20:08:08 +0000 (-0600) Subject: powerpc64: apply -mabi=ibmlongdouble to special files X-Git-Tag: glibc-2.32~479 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57651ee4c84aacad1a66a61fc44689dee77731f5;p=thirdparty%2Fglibc.git powerpc64: apply -mabi=ibmlongdouble to special files Some of these files depend on the avoidance of using the various register sets of POWER. When enabling the IEEE 128 long double, we must be sure to disable this ABI as some compilers will refuse to compile if -mno-vsx and -mabi=ieeelongdouble are both present. Reviewed-by: Tulio Magno Quites Machado Filho --- diff --git a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile index 6e88df1d696..dd49dbbce28 100644 --- a/sysdeps/powerpc/powerpc64/Makefile +++ b/sysdeps/powerpc/powerpc64/Makefile @@ -25,6 +25,12 @@ no-special-regs := $(sort $(foreach n,40 41 50 51 60 61 62 63 \ -ffixed-v$n)) \ -ffixed-vrsave -ffixed-vscr -mno-altivec -mno-vsx +# Likewise, we must disable IEEE long double support as some (all?) +# compilers will not accept the above options with IEEE long double. +ifeq ($(ibm128-fcts),yes) +no-special-regs += -mabi=ibmlongdouble +endif + # Need to prevent gcc from using fprs in code used during dynamic linking. CFLAGS-dl-runtime.os = $(no-special-regs) diff --git a/sysdeps/powerpc/powerpc64/le/Makefile b/sysdeps/powerpc/powerpc64/le/Makefile index 882cf865dd1..d79ad222fc2 100644 --- a/sysdeps/powerpc/powerpc64/le/Makefile +++ b/sysdeps/powerpc/powerpc64/le/Makefile @@ -6,7 +6,8 @@ type-ldouble-CFLAGS = no-gnu-attribute-CFLAGS = ifeq ($(ibm128-fcts),yes) -type-ldouble-CFLAGS += -mabi=ibmlongdouble +ibm128-abi-CFLAGS := -mabi=ibmlongdouble +type-ldouble-CFLAGS += $(ibm128-abi-CFLAGS) no-gnu-attribute-CFLAGS = -mno-gnu-attribute endif diff --git a/sysdeps/powerpc/powerpc64/power7/Makefile b/sysdeps/powerpc/powerpc64/power7/Makefile index 89a22960850..9a0e7474bb1 100644 --- a/sysdeps/powerpc/powerpc64/power7/Makefile +++ b/sysdeps/powerpc/powerpc64/power7/Makefile @@ -1,7 +1,11 @@ ifeq ($(subdir),elf) # Prevent the use of VSX registers and insns in _dl_start, which under -O3 # optimization may require a TOC reference before relocations are resolved. -CFLAGS-rtld.c += -mno-vsx +CFLAGS-rtld.c += $(ibm128-abi-CFLAGS) -mno-vsx + +# Likewise, remove options to build IEEE long double +$(foreach suf,$(all-object-suffixes),$(objpfx)rtld$(suf)): \ + sysdep-CFLAGS := $(filter-out -mabi=ieeelongdouble,$(sysdep-CFLAGS)) endif ifeq ($(subdir),string)