xref: /netbsd-src/external/gpl3/gcc.old/dist/gcc/config/bfin/t-bfin-elf (revision b7b7574d3bf8eeb51a1fa3977b59142ec6434a55)
1# Copyright (C) 2005, 2006, 2007, 2008 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## Target part of the Makefile
20
21LIB1ASMSRC = bfin/lib1funcs.asm
22LIB1ASMFUNCS = _divsi3 _udivsi3 _umodsi3 _modsi3 _umulsi3_highpart
23LIB1ASMFUNCS += _smulsi3_highpart
24
25FPBIT = fp-bit.c
26DPBIT = dp-bit.c
27
28dp-bit.c: $(srcdir)/config/fp-bit.c
29	cat $(srcdir)/config/fp-bit.c > dp-bit.c
30
31fp-bit.c: $(srcdir)/config/fp-bit.c
32	echo '#define FLOAT' > fp-bit.c
33	cat $(srcdir)/config/fp-bit.c >> fp-bit.c
34
35CRTSTUFF_T_CFLAGS = -fpic
36TARGET_LIBGCC2_CFLAGS = -fpic
37
38MULTILIB_OPTIONS=mcpu=bf532-none
39MULTILIB_OPTIONS+=mid-shared-library/msep-data/mfdpic mleaf-id-shared-library
40MULTILIB_DIRNAMES=bf532-none mid-shared-library msep-data mfdpic mleaf-id-shared-library
41
42MULTILIB_MATCHES=mcpu?bf532-none=mcpu?bf512-none mcpu?bf532-none=mcpu?bf514-none
43MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf516-none mcpu?bf532-none=mcpu?bf518-none
44MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf522-none mcpu?bf532-none=mcpu?bf523-none
45MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf524-none mcpu?bf532-none=mcpu?bf525-none
46MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf526-none mcpu?bf532-none=mcpu?bf527-none
47MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf531-none mcpu?bf532-none=mcpu?bf533-none
48MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf534-none mcpu?bf532-none=mcpu?bf536-none
49MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf537-none mcpu?bf532-none=mcpu?bf538-none
50MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf539-none mcpu?bf532-none=mcpu?bf542-none
51MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf542m-none
52MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544-none
53MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf544m-none
54MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf547-none
55MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf547m-none
56MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548-none
57MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf548m-none
58MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf549-none
59MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf549m-none
60MULTILIB_MATCHES+=mcpu?bf532-none=mcpu?bf561-none
61
62MULTILIB_EXCEPTIONS=mleaf-id-shared-library*
63MULTILIB_EXCEPTIONS+=mcpu=bf532-none/mleaf-id-shared-library*
64MULTILIB_EXCEPTIONS+=*mfdpic/mleaf-id-shared-library*
65MULTILIB_EXCEPTIONS+=*msep-data/mleaf-id-shared-library*
66
67# Assemble startup files.
68$(T)crti.o: $(srcdir)/config/bfin/crti.s $(GCC_PASSES)
69	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
70	-c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/bfin/crti.s
71
72$(T)crtn.o: $(srcdir)/config/bfin/crtn.s $(GCC_PASSES)
73	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
74	-c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/bfin/crtn.s
75
76$(T)crtlibid.o: $(srcdir)/config/bfin/crtlibid.s $(GCC_PASSES)
77	$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
78	-c -o $(T)crtlibid.o -x assembler-with-cpp \
79	$(srcdir)/config/bfin/crtlibid.s
80
81EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o crti.o crtn.o crtlibid.o
82