* sysdeps/powerpc/elf/libc-start.c [! SHARED]: Call
[glibc.git] / sysdeps / powerpc / Makefile
blobe6444f2b70854f15d8d1d134c0d642949f6d042a
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 ($(with-fp),no)
7 +cflags += -msoft-float
8 sysdep-LDFLAGS += -msoft-float
9 endif
11 ifeq ($(subdir),gmon)
12 sysdep_routines += ppc-mcount
13 endif
15 ifeq ($(subdir),misc)
16 sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1
17 endif
19 # On PPC, -fpic works until the GOT contains 2^15 bytes, and possibly
20 # more depending on how clever the linker is. Each GOT entry takes 4 bytes,
21 # so that's at least 8192 entries. Since libc only uses about 2000 entries,
22 # we want to use -fpic, because this generates fewer relocs.
23 ifeq (yes,$(build-shared))
24 pic-ccflag = -fpic
25 endif
27 ifeq ($(subdir),csu)
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 = -g0 -fpic -O1
33 # There is no benefit to using sdata for these objects, and the user
34 # of the library should be able to control what goes into sdata.
35 CFLAGS-init.o = -G0
36 CFLAGS-gmon-start.o = -G0
37 endif
38 ifeq (yes,$(build-shared))
39 # Compatibility
40 ifeq (yes,$(have-protected))
41 CPPFLAGS-divdi3.c = -DHAVE_DOT_HIDDEN
42 CPPFLAGS-libgcc-compat.S = -DHAVE_DOT_HIDDEN
43 endif
44 sysdep_routines += divdi3 libgcc-compat
45 shared-only-routines += divdi3 libgcc-compat
46 endif
47 endif
49 ifeq ($(subdir):$(elf),linuxthreads:yes)
50 # See CFLAGS-initfini.s above; this is the same code.
51 CFLAGS-pt-initfini.s = -g0 -fpic -O1
52 endif
54 ifeq ($(subdir),string)
55 CFLAGS-memcmp.c += -Wno-uninitialized
56 endif
58 ifeq ($(subdir),elf)
59 # extra shared linker files to link into dl-allobjs.so and libc
60 sysdep-dl-routines += dl-machine
61 sysdep_routines += dl-machine
62 # extra shared linker files to link only into dl-allobjs.so
63 sysdep-rtld-routines += dl-machine dl-start
64 endif