aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/Makefile
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-02-02 08:23:52 +0000
committerRoland McGrath <roland@gnu.org>2006-02-02 08:23:52 +0000
commit05fcaaeea4c41115ff37ed60acfa2f5e7c73b676 (patch)
treebc92552a08cdf89228024f5fdaf20192ca073626 /sysdeps/powerpc/powerpc64/Makefile
parentfc1b9b023ba954c70293e8eb104f3efa7635153e (diff)
downloadglibc-05fcaaeea4c41115ff37ed60acfa2f5e7c73b676.tar
glibc-05fcaaeea4c41115ff37ed60acfa2f5e7c73b676.tar.gz
glibc-05fcaaeea4c41115ff37ed60acfa2f5e7c73b676.tar.bz2
glibc-05fcaaeea4c41115ff37ed60acfa2f5e7c73b676.zip
* sysdeps/powerpc/powerpc64/Makefile (no-special-regs): New variable.
(CFLAGS-mcount.c): Use it instead of -msoft-float. * sysdeps/powerpc/powerpc64/elf/Makefile (CFLAGS-dl-runtime.os, CFLAGS-dl-lookup.os, CFLAGS-dl-misc.os, CFLAGS-rtld-mempcpy.os, CFLAGS-rtld-memmove.os, CFLAGS-rtld-memchr.os, CFLAGS-rtld-strnlen.os): LIkewise
Diffstat (limited to 'sysdeps/powerpc/powerpc64/Makefile')
-rw-r--r--sysdeps/powerpc/powerpc64/Makefile14
1 files changed, 13 insertions, 1 deletions
diff --git a/sysdeps/powerpc/powerpc64/Makefile b/sysdeps/powerpc/powerpc64/Makefile
index cf7c4337e0..78d4f07e57 100644
--- a/sysdeps/powerpc/powerpc64/Makefile
+++ b/sysdeps/powerpc/powerpc64/Makefile
@@ -10,6 +10,18 @@ ifeq (yes,$(build-shared))
pic-ccflag = -fpic
endif
+# These flags prevent FPU or Altivec registers from being used,
+# for code called in contexts that is not allowed to touch those registers.
+# Stupid GCC requires us to pass all these ridiculous switches.
+no-special-regs := $(sort $(foreach n,40 41 50 51 60 61 62 63 \
+ $(foreach m,2 3 4 5 6 7 8 9, \
+ 3$m 4$m 5$m),\
+ -ffixed-$n)) \
+ $(sort $(foreach n,$(foreach m,0 1 2 3 4 5 6 7 8 9,\
+ $m 1$m 2$m) 30 31,\
+ -ffixed-v$n)) \
+ -ffixed-vrsave -ffixed-vscr
+
ifeq ($(subdir),csu)
sysdep_routines += hp-timing
elide-routines.os += hp-timing
@@ -29,5 +41,5 @@ ifeq ($(subdir),gmon)
# The assembly functions assume that fp arg regs are not trashed.
# Compiling with -msoft-float ensures that fp regs are not used
# for moving memory around.
-CFLAGS-mcount.c += -msoft-float
+CFLAGS-mcount.c += $(no-special-regs)
endif