summaryrefslogtreecommitdiff
path: root/gcc/config/rs6000/t-ppccomm
blob: 8b5e8cba142eea89437bc07fcb48f2e4fa90b129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Common support for PowerPC ELF targets (both EABI and SVR4).

LIB2FUNCS_EXTRA = tramp.S

# This one can't end up in shared libgcc
LIB2FUNCS_STATIC_EXTRA = eabi.S

# We want fine grained libraries, so use the new code to build the
# floating point emulation libraries.
FPBIT = fp-bit.c
DPBIT = dp-bit.c


dp-bit.c: $(srcdir)/config/fp-bit.c
	cat $(srcdir)/config/fp-bit.c > dp-bit.c

fp-bit.c: $(srcdir)/config/fp-bit.c
	echo '#define FLOAT' > fp-bit.c
	cat $(srcdir)/config/fp-bit.c >> fp-bit.c

eabi.S: $(srcdir)/config/rs6000/eabi.asm
	cat $(srcdir)/config/rs6000/eabi.asm > eabi.S

tramp.S: $(srcdir)/config/rs6000/tramp.asm
	cat $(srcdir)/config/rs6000/tramp.asm > tramp.S

# Switch synonyms
MULTILIB_MATCHES_FLOAT	= msoft-float=mcpu?401 \
			  msoft-float=mcpu?403 \
			  msoft-float=mcpu?ec603e \
			  msoft-float=mcpu?801 \
			  msoft-float=mcpu?821 \
			  msoft-float=mcpu?823 \
			  msoft-float=mcpu?860
MULTILIB_MATCHES_ENDIAN	= mlittle=mlittle-endian mbig=mbig-endian
MULTILIB_MATCHES_SYSV	= mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux mcall-sysv=mcall-netbsd

LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \
  crtbeginS$(objext) crtendS$(objext) \
  ecrti$(objext) ecrtn$(objext) \
  scrt0$(objext) scrti$(objext) scrtn$(objext) \
  ncrti$(objext) ncrtn$(objext)

# We build {e,s}crti.o, {e,s}crtn.o, and {s,n}crt0.o which serve to
# add begin and end labels to all of the special sections used when we
# link using gcc.

# Assemble startup files.
ecrti.S: $(srcdir)/config/rs6000/eabi-ci.asm
	cat $(srcdir)/config/rs6000/eabi-ci.asm >ecrti.S

ecrtn.S: $(srcdir)/config/rs6000/eabi-cn.asm
	cat $(srcdir)/config/rs6000/eabi-cn.asm >ecrtn.S

ncrti.S: $(srcdir)/config/rs6000/sol-ci.asm
	sed -e 's/__init/_init/' -e 's/__fini/_fini/' \
		$(srcdir)/config/rs6000/sol-ci.asm >ncrti.S

ncrtn.S: $(srcdir)/config/rs6000/sol-cn.asm
	sed -e 's/__init/_init/' -e 's/__fini/_fini/' \
		$(srcdir)/config/rs6000/sol-cn.asm >ncrtn.S

scrti.S: $(srcdir)/config/rs6000/sol-ci.asm
	cat $(srcdir)/config/rs6000/sol-ci.asm >scrti.S

scrtn.S: $(srcdir)/config/rs6000/sol-cn.asm
	cat $(srcdir)/config/rs6000/sol-cn.asm >scrtn.S

scrt0.c: $(srcdir)/config/rs6000/sol-c0.c
	cat $(srcdir)/config/rs6000/sol-c0.c >scrt0.c

# Build multiple copies of ?crt{i,n}.o, one for each target switch.
$(T)ecrti$(objext): ecrti.S
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)ecrti$(objext)

$(T)ecrtn$(objext): ecrtn.S
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrtn.S -o $(T)ecrtn$(objext)

$(T)ncrti$(objext): ncrti.S
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrti.S -o $(T)ncrti$(objext)

$(T)ncrtn$(objext): ncrtn.S
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ncrtn.S -o $(T)ncrtn$(objext)

$(T)scrti$(objext): scrti.S
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c scrti.S -o $(T)scrti$(objext)

$(T)scrtn$(objext): scrtn.S
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c scrtn.S -o $(T)scrtn$(objext)

$(T)scrt0$(objext): scrt0.c
	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c scrt0.c -o $(T)scrt0$(objext)

# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata.
CRTSTUFF_T_CFLAGS = -msdata=none
# There is no need to add -fPIC here because crtstuff is multilibbed
# and so automatically gets -fPIC when needed.
CRTSTUFF_T_CFLAGS_S = -msdata=none