OSDN Git Service

2001-04-29 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
[pf3gnuchains/gcc-fork.git] / gcc / config / rs6000 / t-ppccomm
1 # Common support for PowerPC ELF targets (both EABI and SVR4).
2
3 # Do not build libgcc1.
4 LIBGCC1 =
5 CROSS_LIBGCC1 =
6
7 # These are really part of libgcc1, but this will cause them to be
8 # built correctly, so... [taken from t-sparclite]
9 LIB2FUNCS_EXTRA = tramp.S
10
11 # This one can't end up in shared libgcc
12 LIB2FUNCS_STATIC_EXTRA = eabi.S
13
14 # We want fine grained libraries, so use the new code to build the
15 # floating point emulation libraries.
16 FPBIT = fp-bit.c
17 DPBIT = dp-bit.c
18
19
20 dp-bit.c: $(srcdir)/config/fp-bit.c
21         cat $(srcdir)/config/fp-bit.c > dp-bit.c
22
23 fp-bit.c: $(srcdir)/config/fp-bit.c
24         echo '#define FLOAT' > fp-bit.c
25         cat $(srcdir)/config/fp-bit.c >> fp-bit.c
26
27 eabi.S: $(srcdir)/config/rs6000/eabi.asm
28         cat $(srcdir)/config/rs6000/eabi.asm > eabi.S
29
30 tramp.S: $(srcdir)/config/rs6000/tramp.asm
31         cat $(srcdir)/config/rs6000/tramp.asm > tramp.S
32
33 # Switch synonyms
34 MULTILIB_MATCHES_FLOAT  = msoft-float=mcpu?401 \
35                           msoft-float=mcpu?403 \
36                           msoft-float=mcpu?ec603e \
37                           msoft-float=mcpu?801 \
38                           msoft-float=mcpu?821 \
39                           msoft-float=mcpu?823 \
40                           msoft-float=mcpu?860
41 MULTILIB_MATCHES_ENDIAN = mlittle=mlittle-endian mbig=mbig-endian
42 MULTILIB_MATCHES_SYSV   = mcall-sysv=mcall-sysv-eabi mcall-sysv=mcall-sysv-noeabi mcall-sysv=mcall-linux
43
44 LIBGCC = stmp-multilib
45 INSTALL_LIBGCC = install-multilib
46 EXTRA_MULTILIB_PARTS = crtbegin$(objext) crtend$(objext) \
47   crtbeginS$(objext) crtendS$(objext) \
48   ecrti$(objext) ecrtn$(objext) scrt0$(objext) scrti$(objext) scrtn$(objext)
49
50 # We build {e,s}crti.o, {e,s}crtn.o, and scrt0.o which serve to add begin and
51 # end labels to all of the special sections used when we link using gcc.
52
53 # Assemble startup files.
54 ecrti.S: $(srcdir)/config/rs6000/eabi-ci.asm
55         cat $(srcdir)/config/rs6000/eabi-ci.asm >ecrti.S
56
57 ecrtn.S: $(srcdir)/config/rs6000/eabi-cn.asm
58         cat $(srcdir)/config/rs6000/eabi-cn.asm >ecrtn.S
59
60 scrti.S: $(srcdir)/config/rs6000/sol-ci.asm
61         cat $(srcdir)/config/rs6000/sol-ci.asm >scrti.S
62
63 scrtn.S: $(srcdir)/config/rs6000/sol-cn.asm
64         cat $(srcdir)/config/rs6000/sol-cn.asm >scrtn.S
65
66 scrt0.c: $(srcdir)/config/rs6000/sol-c0.c
67         cat $(srcdir)/config/rs6000/sol-c0.c >scrt0.c
68
69 # Build multiple copies of ?crt{i,n}.o, one for each target switch.
70 $(T)ecrti$(objext): ecrti.S
71         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrti.S -o $(T)ecrti$(objext)
72
73 $(T)ecrtn$(objext): ecrtn.S
74         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c ecrtn.S -o $(T)ecrtn$(objext)
75
76 $(T)scrti$(objext): scrti.S
77         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c scrti.S -o $(T)scrti$(objext)
78
79 $(T)scrtn$(objext): scrtn.S
80         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c scrtn.S -o $(T)scrtn$(objext)
81
82 $(T)scrt0$(objext): scrt0.c
83         $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -c scrt0.c -o $(T)scrt0$(objext)
84
85 # It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata.
86 CRTSTUFF_T_CFLAGS = -msdata=none
87 # There is no need to add -fPIC here because crtstuff is multilibbed
88 # and so automatically gets -fPIC when needed.
89 CRTSTUFF_T_CFLAGS_S = -msdata=none