xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/config/frv/t-frv (revision d11b170b9000ada93db553723522a63d5deac310)
1# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
2#
3# This file is part of GCC.
4#
5# GCC is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3, or (at your option)
8# any later version.
9#
10# GCC is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with GCC; see the file COPYING3.  If not see
17# <http://www.gnu.org/licenses/>.
18
19# Name of assembly file containing libgcc1 functions.
20# This entry must be present, but it can be empty if the target does
21# not need any assembler functions to support its code generation.
22#
23# Alternatively if assembler functions *are* needed then define the
24# entries below:
25CROSS_LIBGCC1	= libgcc1-asm.a
26LIB1ASMSRC	= frv/lib1funcs.asm
27LIB1ASMFUNCS	= _cmpll _cmpf _cmpd _addll _subll _andll _orll _xorll _notll _cmov
28LIB2FUNCS_EXTRA	= cmovh.c cmovw.c cmovd.c modi.c umodi.c uitof.c uitod.c ulltof.c ulltod.c
29
30# We want fine grained libraries, so use the new code to build the
31# floating point emulation libraries.
32FPBIT = fp-bit.c
33DPBIT = dp-bit.c
34
35# If any special flags are necessary when building libgcc2 put them here.
36TARGET_LIBGCC2_CFLAGS =
37
38fp-bit.c: $(srcdir)/config/fp-bit.c
39	echo '#define FLOAT' > fp-bit.c
40	echo '#include "config/frv/frv-abi.h"' >> fp-bit.c
41	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
42
43dp-bit.c: $(srcdir)/config/fp-bit.c
44	echo '#include "config/frv/frv-abi.h"' > dp-bit.c
45	cat $(srcdir)/config/fp-bit.c >> dp-bit.c
46
47cmovh.c: $(srcdir)/config/frv/cmovh.c
48	$(LN_S) $(srcdir)/config/frv/cmovh.c .
49
50cmovw.c: $(srcdir)/config/frv/cmovw.c
51	$(LN_S) $(srcdir)/config/frv/cmovw.c .
52
53cmovd.c: $(srcdir)/config/frv/cmovd.c
54	$(LN_S) $(srcdir)/config/frv/cmovd.c .
55
56modi.c: $(srcdir)/config/frv/modi.c
57	$(LN_S) $(srcdir)/config/frv/modi.c .
58
59umodi.c: $(srcdir)/config/frv/umodi.c
60	$(LN_S) $(srcdir)/config/frv/umodi.c .
61
62uitof.c: $(srcdir)/config/frv/uitof.c
63	$(LN_S) $(srcdir)/config/frv/uitof.c .
64
65uitod.c: $(srcdir)/config/frv/uitod.c
66	$(LN_S) $(srcdir)/config/frv/uitod.c .
67
68ulltof.c: $(srcdir)/config/frv/ulltof.c
69	$(LN_S) $(srcdir)/config/frv/ulltof.c .
70
71ulltod.c: $(srcdir)/config/frv/ulltod.c
72	$(LN_S) $(srcdir)/config/frv/ulltod.c .
73
74# Build frvbegin.o and frvend.o
75EXTRA_MULTILIB_PARTS=frvbegin.o frvend.o
76
77# Compile two additional files that are linked with every program
78# linked using GCC on systems using COFF or ELF, for the sake of C++
79# constructors.
80
81FRVSTUFF_CFLAGS = $(TARGET_LIBGCC2_CFLAGS)
82
83$(T)frvbegin$(objext): $(srcdir)/config/frv/frvbegin.c $(GCC_PASSES) \
84  $(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h
85	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \
86	  -c $(srcdir)/config/frv/frvbegin.c -o $(T)frvbegin$(objext)
87
88$(T)frvend$(objext): $(srcdir)/config/frv/frvend.c $(GCC_PASSES) \
89  $(CONFIG_H) defaults.h unwind-dw2-fde.h gbl-ctors.h
90	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) $(FRVSTUFF_CFLAGS) \
91	  -c $(srcdir)/config/frv/frvend.c -o $(T)frvend$(objext)
92
93# Enable the following if multilibs are needed.
94# See gcc/genmultilib, gcc/gcc.texi and gcc/tm.texi for a
95# description of the options and their values.
96#
97#MULTILIB_OPTIONS	= mcpu=fr500/mcpu=tomcat/mcpu=simple/mcpu=frv msoft-float mdword/mno-dword
98#MULTILIB_DIRNAMES	= fr500 tomcat simple frv nof dw no-dw
99#MULTILIB_MATCHES	= mcpu?simple=mcpu?fr300 mno-double=mcpu?fr500 mcpu?frv=mdouble
100#MULTILIB_EXCEPTIONS	= *mcpu=simple/*msoft-float* *mcpu=frv/*msoft-float*
101#MULTILIB_EXTRA_OPTS	= mlibrary-pic
102
103MULTILIB_OPTIONS	= mcpu=fr400/mcpu=fr550 mno-pack mlibrary-pic/mfdpic
104MULTILIB_DIRNAMES	= fr400 fr550 unpacked pic fdpic
105MULTILIB_MATCHES	= mcpu?simple=mcpu?fr300 \
106			  mlibrary-pic=multilib-library-pic \
107			  mcpu?fr400=mcpu?fr405 mcpu?fr400=mcpu?fr450
108MULTILIB_EXCEPTIONS	= mcpu=frv/mno-pack* mcpu=simple/mno-pack*
109
110LIBGCC = stmp-multilib
111INSTALL_LIBGCC = install-multilib
112
113EXTRA_HEADERS = $(srcdir)/config/frv/frv-asm.h
114