]>
Commit | Line | Data |
---|---|---|
b26e3a82 | 1 | # Common support for PowerPC ELF targets (both EABI and SVR4). |
eaf1bcf1 | 2 | |
602ea4d3 | 3 | LIB2FUNCS_EXTRA = tramp.S $(srcdir)/config/rs6000/darwin-ldouble.c |
fa9518de FS |
4 | |
5 | # This one can't end up in shared libgcc | |
6 | LIB2FUNCS_STATIC_EXTRA = eabi.S | |
c91fba50 | 7 | |
eaf1bcf1 MM |
8 | eabi.S: $(srcdir)/config/rs6000/eabi.asm |
9 | cat $(srcdir)/config/rs6000/eabi.asm > eabi.S | |
10 | ||
eaf1bcf1 MM |
11 | tramp.S: $(srcdir)/config/rs6000/tramp.asm |
12 | cat $(srcdir)/config/rs6000/tramp.asm > tramp.S | |
13 | ||
602ea4d3 JJ |
14 | ifneq (,$findstring gnu,$(target)) |
15 | TARGET_LIBGCC2_CFLAGS += -specs=ldblspecs | |
16 | ||
17 | SHLIB_MAPFILES += $(srcdir)/config/rs6000/libgcc-ppc-glibc.ver | |
18 | ||
19 | # Hack to use -mlong-double-128 only when not compiling nof libgcc | |
20 | mklibgcc: ldblspecs | |
21 | ||
22 | ldblspecs: specs | |
23 | sed -e '/cc1_options/{ n; s/$$/ %{!msoft-float:-mlong-double-128}/; }' < specs > $@ | |
24 | endif | |
25 | ||
eaf1bcf1 | 26 | # Switch synonyms |
eaf1bcf1 | 27 | MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian |
edf1b3f3 | 28 | MULTILIB_MATCHES_SYSV = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd |
eaf1bcf1 | 29 | |
b26e3a82 | 30 | EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \ |
ccd84f51 | 31 | crtbeginS$(objext) crtendS$(objext) crtbeginT$(objext) \ |
edf1b3f3 | 32 | ecrti$(objext) ecrtn$(objext) \ |
71c061e6 DE |
33 | ncrti$(objext) ncrtn$(objext) \ |
34 | crtsavres$(objext) | |
eaf1bcf1 | 35 | |
f607bc57 ZW |
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. | |
eaf1bcf1 MM |
38 | |
39 | # Assemble startup files. | |
40 | ecrti.S: $(srcdir)/config/rs6000/eabi-ci.asm | |
41 | cat $(srcdir)/config/rs6000/eabi-ci.asm >ecrti.S | |
42 | ||
43 | ecrtn.S: $(srcdir)/config/rs6000/eabi-cn.asm | |
44 | cat $(srcdir)/config/rs6000/eabi-cn.asm >ecrtn.S | |
45 | ||
edf1b3f3 | 46 | ncrti.S: $(srcdir)/config/rs6000/sol-ci.asm |
f607bc57 | 47 | cat $(srcdir)/config/rs6000/sol-ci.asm >ncrti.S |
edf1b3f3 AC |
48 | |
49 | ncrtn.S: $(srcdir)/config/rs6000/sol-cn.asm | |
f607bc57 | 50 | cat $(srcdir)/config/rs6000/sol-cn.asm >ncrtn.S |
eaf1bcf1 | 51 | |
71c061e6 DE |
52 | crtsavres.S: $(srcdir)/config/rs6000/crtsavres.asm |
53 | cat $(srcdir)/config/rs6000/crtsavres.asm >crtsavres.S | |
54 | ||
eaf1bcf1 MM |
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) | |
58 | ||
59 | $(T)ecrtn$(objext): ecrtn.S | |
60 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrtn.S -o $(T)ecrtn$(objext) | |
61 | ||
edf1b3f3 AC |
62 | $(T)ncrti$(objext): ncrti.S |
63 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrti.S -o $(T)ncrti$(objext) | |
64 | ||
65 | $(T)ncrtn$(objext): ncrtn.S | |
66 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrtn.S -o $(T)ncrtn$(objext) | |
67 | ||
71c061e6 DE |
68 | $(T)crtsavres$(objext): crtsavres.S |
69 | $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c crtsavres.S -o $(T)crtsavres$(objext) | |
70 | ||
2d5b6dea GK |
71 | # It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata. |
72 | CRTSTUFF_T_CFLAGS = -msdata=none | |
38abadee FS |
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 |