1 # Common support for PowerPC ELF targets (both EABI and SVR4).
3 LIB2FUNCS_EXTRA = tramp.S $(srcdir)/config/rs6000/darwin-ldouble.c
5 # This one can't end up in shared libgcc
6 LIB2FUNCS_STATIC_EXTRA = eabi.S
8 eabi.S: $(srcdir)/config/rs6000/eabi.asm
9 cat $(srcdir)/config/rs6000/eabi.asm > eabi.S
11 tramp.S: $(srcdir)/config/rs6000/tramp.asm
12 cat $(srcdir)/config/rs6000/tramp.asm > tramp.S
14 ifneq (,$(findstring gnu,$(target)))
15 ifeq (,$(findstring spe,$(target)))
16 TARGET_LIBGCC2_CFLAGS += -specs=ldblspecs
18 SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc-glibc.ver
20 # Hack to use -mlong-double-128 only when not compiling nof libgcc
24 sed -e '/cc1_options/{ n; s/$$/ %{!msoft-float:-mlong-double-128}/; }' < specs > $@
29 MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian
30 MULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd
32 EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \
33 crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \
34 ecrti$(objext) ecrtn$(objext) \
35 ncrti$(objext) ncrtn$(objext) \
38 # We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and
39 # end labels to all of the special sections used when we link using gcc.
41 # Assemble startup files.
42 ecrti.S: $(srcdir)/config/rs6000/eabi-ci.asm
43 cat $(srcdir)/config/rs6000/eabi-ci.asm >ecrti.S
45 ecrtn.S: $(srcdir)/config/rs6000/eabi-cn.asm
46 cat $(srcdir)/config/rs6000/eabi-cn.asm >ecrtn.S
48 ncrti.S: $(srcdir)/config/rs6000/sol-ci.asm
49 cat $(srcdir)/config/rs6000/sol-ci.asm >ncrti.S
51 ncrtn.S: $(srcdir)/config/rs6000/sol-cn.asm
52 cat $(srcdir)/config/rs6000/sol-cn.asm >ncrtn.S
54 crtsavres.S: $(srcdir)/config/rs6000/crtsavres.asm
55 cat $(srcdir)/config/rs6000/crtsavres.asm >crtsavres.S
57 # Build multiple copies of ?crt{i,n}.o, one for each target switch.
58 $(T)ecrti$(objext): ecrti.S
59 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)ecrti$(objext)
61 $(T)ecrtn$(objext): ecrtn.S
62 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrtn.S -o $(T)ecrtn$(objext)
64 $(T)ncrti$(objext): ncrti.S
65 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrti.S -o $(T)ncrti$(objext)
67 $(T)ncrtn$(objext): ncrtn.S
68 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrtn.S -o $(T)ncrtn$(objext)
70 $(T)crtsavres$(objext): crtsavres.S
71 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c crtsavres.S -o $(T)crtsavres$(objext)
73 # It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata.
74 CRTSTUFF_T_CFLAGS = -msdata=none
75 # Make sure crt*.o are built with -fPIC even if configured with
76 # --enable-shared --disable-multilib
77 CRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none