1# Common support for PowerPC ELF targets (both EABI and SVR4). 2 3LIB2FUNCS_EXTRA += tramp.S $(srcdir)/config/rs6000/darwin-ldouble.c 4 5# This one can't end up in shared libgcc 6LIB2FUNCS_STATIC_EXTRA = eabi.S 7 8eabi.S: $(srcdir)/config/rs6000/eabi.asm 9 cat $(srcdir)/config/rs6000/eabi.asm > eabi.S 10 11tramp.S: $(srcdir)/config/rs6000/tramp.asm 12 cat $(srcdir)/config/rs6000/tramp.asm > tramp.S 13 14ifneq (,$(findstring gnu,$(target))) 15ifeq (,$(findstring spe,$(target))) 16TARGET_LIBGCC2_CFLAGS += -mlong-double-128 17 18SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc-glibc.ver 19endif 20endif 21 22# Switch synonyms 23MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian 24MULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd 25 26EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \ 27 crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \ 28 ecrti$(objext) ecrtn$(objext) \ 29 ncrti$(objext) ncrtn$(objext) \ 30 crtsavres$(objext) 31 32# We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and 33# end labels to all of the special sections used when we link using gcc. 34 35# Assemble startup files. 36ecrti.S: $(srcdir)/config/rs6000/eabi-ci.asm 37 cat $(srcdir)/config/rs6000/eabi-ci.asm >ecrti.S 38 39ecrtn.S: $(srcdir)/config/rs6000/eabi-cn.asm 40 cat $(srcdir)/config/rs6000/eabi-cn.asm >ecrtn.S 41 42ncrti.S: $(srcdir)/config/rs6000/sol-ci.asm 43 cat $(srcdir)/config/rs6000/sol-ci.asm >ncrti.S 44 45ncrtn.S: $(srcdir)/config/rs6000/sol-cn.asm 46 cat $(srcdir)/config/rs6000/sol-cn.asm >ncrtn.S 47 48crtsavres.S: $(srcdir)/config/rs6000/crtsavres.asm 49 cat $(srcdir)/config/rs6000/crtsavres.asm >crtsavres.S 50 51# Build multiple copies of ?crt{i,n}.o, one for each target switch. 52$(T)ecrti$(objext): ecrti.S 53 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)ecrti$(objext) 54 55$(T)ecrtn$(objext): ecrtn.S 56 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrtn.S -o $(T)ecrtn$(objext) 57 58$(T)ncrti$(objext): ncrti.S 59 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrti.S -o $(T)ncrti$(objext) 60 61$(T)ncrtn$(objext): ncrtn.S 62 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrtn.S -o $(T)ncrtn$(objext) 63 64$(T)crtsavres$(objext): crtsavres.S 65 $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c crtsavres.S -o $(T)crtsavres$(objext) 66 67# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata. 68CRTSTUFF_T_CFLAGS = -msdata=none 69# Make sure crt*.o are built with -fPIC even if configured with 70# --enable-shared --disable-multilib 71CRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none 72