PowerPC LE strcmp and strncmp
[glibc.git] / sysdeps / powerpc / powerpc64 / Makefile
blob171e89b3bae4cabe07d8401aefc11692410d4787
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. We need to
16 # pass the -mno-* switches as well to prevent the compiler from attempting
17 # to emit altivec or vsx instructions, especially when the registers aren't
18 # available.
19 no-special-regs := $(sort $(foreach n,40 41 50 51 60 61 62 63 \
20 $(foreach m,2 3 4 5 6 7 8 9, \
21 3$m 4$m 5$m),\
22 -ffixed-$n)) \
23 $(sort $(foreach n,$(foreach m,0 1 2 3 4 5 6 7 8 9,\
24 $m 1$m 2$m) 30 31,\
25 -ffixed-v$n)) \
26 -ffixed-vrsave -ffixed-vscr -mno-altivec -mno-vsx
28 # Need to prevent gcc from using fprs in code used during dynamic linking.
30 CFLAGS-dl-runtime.os = $(no-special-regs)
31 CFLAGS-dl-lookup.os = $(no-special-regs)
32 CFLAGS-dl-misc.os = $(no-special-regs)
33 CFLAGS-rtld-mempcpy.os = $(no-special-regs)
34 CFLAGS-rtld-memmove.os = $(no-special-regs)
35 CFLAGS-rtld-memchr.os = $(no-special-regs)
36 CFLAGS-rtld-strnlen.os = $(no-special-regs)
38 ifeq ($(subdir),csu)
39 sysdep_routines += hp-timing
40 elide-routines.os += hp-timing
41 endif
43 ifeq ($(subdir),elf)
44 # help gcc inline asm code from dl-machine.h
45 +cflags += -finline-limit=2000
46 endif
48 ifeq ($(subdir),gmon)
49 # The assembly functions assume that fp arg regs are not trashed.
50 # Compiling with -msoft-float ensures that fp regs are not used
51 # for moving memory around.
52 CFLAGS-mcount.c += $(no-special-regs)
53 sysdep_routines += ppc-mcount
54 endif