t-ppccomm revision 169689
190075Sobrien# Common support for PowerPC ELF targets (both EABI and SVR4). 290075Sobrien 3169689SkanLIB2FUNCS_EXTRA += tramp.S $(srcdir)/config/rs6000/darwin-ldouble.c 490075Sobrien 590075Sobrien# This one can't end up in shared libgcc 690075SobrienLIB2FUNCS_STATIC_EXTRA = eabi.S 790075Sobrien 890075Sobrieneabi.S: $(srcdir)/config/rs6000/eabi.asm 990075Sobrien cat $(srcdir)/config/rs6000/eabi.asm > eabi.S 1090075Sobrien 1190075Sobrientramp.S: $(srcdir)/config/rs6000/tramp.asm 1290075Sobrien cat $(srcdir)/config/rs6000/tramp.asm > tramp.S 1390075Sobrien 14169689Skanifneq (,$(findstring gnu,$(target))) 15169689Skanifeq (,$(findstring spe,$(target))) 16169689SkanTARGET_LIBGCC2_CFLAGS += -mlong-double-128 17169689Skan 18169689SkanSHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc-glibc.ver 19169689Skanendif 20169689Skanendif 21169689Skan 2290075Sobrien# Switch synonyms 2390075SobrienMULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian 2490075SobrienMULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd 2590075Sobrien 2690075SobrienEXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \ 2796263Sobrien crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \ 2890075Sobrien ecrti$(objext) ecrtn$(objext) \ 2996263Sobrien ncrti$(objext) ncrtn$(objext) \ 3096263Sobrien crtsavres$(objext) 3190075Sobrien 3290075Sobrien# We build {e,n}crti.o and {e,n}crtn.o, which serve to add begin and 3390075Sobrien# end labels to all of the special sections used when we link using gcc. 3490075Sobrien 3590075Sobrien# Assemble startup files. 3690075Sobrienecrti.S: $(srcdir)/config/rs6000/eabi-ci.asm 3790075Sobrien cat $(srcdir)/config/rs6000/eabi-ci.asm >ecrti.S 3890075Sobrien 3990075Sobrienecrtn.S: $(srcdir)/config/rs6000/eabi-cn.asm 4090075Sobrien cat $(srcdir)/config/rs6000/eabi-cn.asm >ecrtn.S 4190075Sobrien 4290075Sobrienncrti.S: $(srcdir)/config/rs6000/sol-ci.asm 4390075Sobrien cat $(srcdir)/config/rs6000/sol-ci.asm >ncrti.S 4490075Sobrien 4590075Sobrienncrtn.S: $(srcdir)/config/rs6000/sol-cn.asm 4690075Sobrien cat $(srcdir)/config/rs6000/sol-cn.asm >ncrtn.S 4790075Sobrien 4896263Sobriencrtsavres.S: $(srcdir)/config/rs6000/crtsavres.asm 4996263Sobrien cat $(srcdir)/config/rs6000/crtsavres.asm >crtsavres.S 5096263Sobrien 5190075Sobrien# Build multiple copies of ?crt{i,n}.o, one for each target switch. 5290075Sobrien$(T)ecrti$(objext): ecrti.S 5390075Sobrien $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)ecrti$(objext) 5490075Sobrien 5590075Sobrien$(T)ecrtn$(objext): ecrtn.S 5690075Sobrien $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrtn.S -o $(T)ecrtn$(objext) 5790075Sobrien 5890075Sobrien$(T)ncrti$(objext): ncrti.S 5990075Sobrien $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrti.S -o $(T)ncrti$(objext) 6090075Sobrien 6190075Sobrien$(T)ncrtn$(objext): ncrtn.S 6290075Sobrien $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrtn.S -o $(T)ncrtn$(objext) 6390075Sobrien 6496263Sobrien$(T)crtsavres$(objext): crtsavres.S 6596263Sobrien $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c crtsavres.S -o $(T)crtsavres$(objext) 6696263Sobrien 6790075Sobrien# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata. 6890075SobrienCRTSTUFF_T_CFLAGS = -msdata=none 6990075Sobrien# Make sure crt*.o are built with -fPIC even if configured with 7090075Sobrien# --enable-shared --disable-multilib 7190075SobrienCRTSTUFF_T_CFLAGS_S = -fPIC -msdata=none 72