Update.
[glibc.git] / sysdeps / powerpc / Makefile
bloba29e387d83b345fb9caa9db9305f073273775be3
1 # We always want to use the new mnemonic syntax even if we are on a RS6000
2 # machine.
3 +cflags += -mnew-mnemonics -Wa,-mppc -mpowerpc
4 asm-CPPFLAGS += -Wa,-mppc
6 ifeq ($(subdir),math)
7 libm-support += fenv_const fe_nomask
8 endif
10 ifeq ($(subdir),gmon)
11 sysdep_routines += ppc-mcount
12 endif
14 ifeq ($(subdir),misc)
15 sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1 fprsave fprrest
16 endif
18 # On PPC, -fpic works until the GOT contains 2^15 bytes, and possibly
19 # more depending on how clever the linker is. Each GOT entry takes 4 bytes,
20 # so that's at least 8192 entries. Since libc only uses about 2000 entries,
21 # we want to use -fpic, because this generates fewer relocs.
22 ifeq (yes,$(build-shared))
23 pic-ccflag = -fpic
24 endif
26 ifeq ($(subdir),csu)
27 ifneq ($(elf),no)
28 # The initfini generation code doesn't work in the presence of -fPIC, so
29 # we use -fpic instead which is much better.
30 CFLAGS-initfini.s = -g0 -fpic -O1
32 # There is no benefit to using sdata for these objects, and the user
33 # of the library should be able to control what goes into sdata.
34 CFLAGS-init.o = -G0
35 CFLAGS-gmon-start.o = -G0
36 endif
37 endif
39 ifeq ($(subdir),string)
40 CFLAGS-memcmp.c += -Wno-uninitialized
41 endif
43 ifeq ($(subdir),elf)
44 # extra shared linker files to link into dl-allobjs.so and libc
45 sysdep-dl-routines += dl-machine
46 sysdep_routines += dl-machine
47 # extra shared linker files to link only into dl-allobjs.so
48 sysdep-rtld-routines += dl-machine dl-start
49 endif