Fix missing _mcount@GLIBC_2.0 on powerpc32
[glibc.git] / sysdeps / powerpc / powerpc32 / Makefile
blob64f79003af264964dd7fbded59aadf6404c7be79
1 # Powerpc32 specific build options.
3 ifeq ($(with-fp),no)
4 +cflags += -msoft-float
5 sysdep-LDFLAGS += -msoft-float
6 endif
8 ifeq ($(subdir),gmon)
9 sysdep_routines += ppc-mcount compat-ppc-mcount
10 static-only-routines += ppc-mcount
11 shared-only-routines += compat-ppc-mcount
12 endif
14 ifeq ($(subdir),misc)
15 sysdep_routines += gprsave0 gprrest0 gprsave1 gprrest1
16 endif
18 # On PPC, -fpic works until the GOT contains 32768 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 # There is no benefit to using sdata for these objects, and the user
28 # of the library should be able to control what goes into sdata.
29 CFLAGS-init.o = -G0
30 CFLAGS-gmon-start.o = -G0
32 ifeq (yes,$(build-shared))
33 # Compatibility
34 ifeq (yes,$(have-protected))
35 CPPFLAGS-libgcc-compat.S = -DHAVE_DOT_HIDDEN
36 endif
37 sysdep_routines += libgcc-compat
38 shared-only-routines += libgcc-compat
39 endif
40 endif
42 ifeq ($(subdir),elf)
43 # extra shared linker files to link only into dl-allobjs.so
44 sysdep-rtld-routines += dl-start
45 endif