2.9
[glibc/nacl-glibc.git] / sysdeps / powerpc / powerpc64 / Makefile
blob78d4f07e575fab67e985ae9998deacb6301bcf7a
1 # Powerpc64 specific build options.
2 # this is ./sysdeps/powerpc/powerpc64/Makefile
4 # Each TOC entry takes 8 bytes and the TOC holds up to 2^16 bytes,
5 # or 8192 entries.
6 # If -fpic is not specified, the latest gcc-3.2.1 now generates
7 # different code for call stubs (without the TOC reload).
8 # Shared objects need the TOC reload so specify -fpic.
9 ifeq (yes,$(build-shared))
10 pic-ccflag = -fpic
11 endif
13 # These flags prevent FPU or Altivec registers from being used,
14 # for code called in contexts that is not allowed to touch those registers.
15 # Stupid GCC requires us to pass all these ridiculous switches.
16 no-special-regs := $(sort $(foreach n,40 41 50 51 60 61 62 63 \
17 $(foreach m,2 3 4 5 6 7 8 9, \
18 3$m 4$m 5$m),\
19 -ffixed-$n)) \
20 $(sort $(foreach n,$(foreach m,0 1 2 3 4 5 6 7 8 9,\
21 $m 1$m 2$m) 30 31,\
22 -ffixed-v$n)) \
23 -ffixed-vrsave -ffixed-vscr
25 ifeq ($(subdir),csu)
26 sysdep_routines += hp-timing
27 elide-routines.os += hp-timing
28 ifneq ($(elf),no)
29 # The initfini generation code doesn't work in the presence of -fPIC, so
30 # we use -fpic instead which is much better.
31 CFLAGS-initfini.s += -fpic -O1
32 endif
33 endif
35 ifeq ($(subdir),elf)
36 # help gcc inline asm code from dl-machine.h
37 +cflags += -finline-limit=2000
38 endif
40 ifeq ($(subdir),gmon)
41 # The assembly functions assume that fp arg regs are not trashed.
42 # Compiling with -msoft-float ensures that fp regs are not used
43 # for moving memory around.
44 CFLAGS-mcount.c += $(no-special-regs)
45 endif