]> sourceware.org Git - glibc.git/commitdiff
powerpc64: apply -mabi=ibmlongdouble to special files
authorPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Fri, 7 Feb 2020 20:08:08 +0000 (14:08 -0600)
committerPaul E. Murphy <murphyp@linux.vnet.ibm.com>
Wed, 25 Mar 2020 19:34:23 +0000 (14:34 -0500)
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 <tuliom@linux.ibm.com>
sysdeps/powerpc/powerpc64/Makefile
sysdeps/powerpc/powerpc64/le/Makefile
sysdeps/powerpc/powerpc64/power7/Makefile

index 6e88df1d6968212b5b15d093e77a5f69fbc3ce18..dd49dbbce28a1a4703262fc4150c5205fe8b154c 100644 (file)
@@ -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)
index 882cf865dd1448ce27dd166823a3005c80d6dc39..d79ad222fc2570cebe9128475c607e0acefcb3b0 100644 (file)
@@ -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
 
index 89a2296085082b6afe857696d0775107993b0c52..9a0e7474bb1e360f06fef29b6571974c76cc318c 100644 (file)
@@ -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)
This page took 0.043751 seconds and 5 git commands to generate.