Merge from mainline
[official-gcc.git] / gcc / config / rs6000 / t-ppccomm
blobe58dfe5f68738ab30d04ab282145dc3a8c0650ca
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 TARGET_LIBGCC2_CFLAGS += -specs=ldblspecs
17 SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc-glibc.ver
19 # Hack to use -mlong-double-128 only when not compiling nof libgcc
20 mklibgcc: ldblspecs
22 ldblspecs: specs
23         sed -e '/cc1_options/{ n; s/$$/ %{!msoft-float:-mlong-double-128}/; }' < specs > $@
24 endif
26 # Switch synonyms
27 MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian
28 MULTILIB_MATCHES_SYSV   = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd
30 EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \
31   crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \
32   ecrti$(objext) ecrtn$(objext) \
33   ncrti$(objext) ncrtn$(objext) \
34   crtsavres$(objext)
36 # We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and
37 # end labels to all of the special sections used when we link using gcc.
39 # Assemble startup files.
40 ecrti.S: $(srcdir)/config/rs6000/eabi-ci.asm
41         cat $(srcdir)/config/rs6000/eabi-ci.asm >ecrti.S
43 ecrtn.S: $(srcdir)/config/rs6000/eabi-cn.asm
44         cat $(srcdir)/config/rs6000/eabi-cn.asm >ecrtn.S
46 ncrti.S: $(srcdir)/config/rs6000/sol-ci.asm
47         cat $(srcdir)/config/rs6000/sol-ci.asm >ncrti.S
49 ncrtn.S: $(srcdir)/config/rs6000/sol-cn.asm
50         cat $(srcdir)/config/rs6000/sol-cn.asm >ncrtn.S
52 crtsavres.S: $(srcdir)/config/rs6000/crtsavres.asm
53         cat $(srcdir)/config/rs6000/crtsavres.asm >crtsavres.S
55 # Build multiple copies of ?crt{i,n}.o, one for each target switch.
56 $(T)ecrti$(objext): ecrti.S
57         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)ecrti$(objext)
59 $(T)ecrtn$(objext): ecrtn.S
60         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrtn.S -o $(T)ecrtn$(objext)
62 $(T)ncrti$(objext): ncrti.S
63         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrti.S -o $(T)ncrti$(objext)
65 $(T)ncrtn$(objext): ncrtn.S
66         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrtn.S -o $(T)ncrtn$(objext)
68 $(T)crtsavres$(objext): crtsavres.S
69         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c crtsavres.S -o $(T)crtsavres$(objext)
71 # It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata.
72 CRTSTUFF_T_CFLAGS = -msdata=none
73 # Make sure crt*.o are built with -fPIC even if configured with 
74 # --enable-shared --disable-multilib
75 CRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none