| 1 |
282 |
jeremybenn |
# Copyright (C) 1997, 1998, 1999, 2001, 2003 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 |
|
|
# .
|
| 18 |
|
|
|
| 19 |
|
|
# We want fine grained libraries, so use the new code to build the
|
| 20 |
|
|
# floating point emulation libraries.
|
| 21 |
|
|
FPBIT = fp-bit.c
|
| 22 |
|
|
DPBIT = dp-bit.c
|
| 23 |
|
|
|
| 24 |
|
|
# Turn off the SDA while compiling libgcc2. There are no headers for it
|
| 25 |
|
|
# and we want maximal upward compatibility here.
|
| 26 |
|
|
|
| 27 |
|
|
TARGET_LIBGCC2_CFLAGS = -G 0
|
| 28 |
|
|
|
| 29 |
|
|
fp-bit.c: $(srcdir)/config/fp-bit.c
|
| 30 |
|
|
echo '#define FLOAT' > fp-bit.c
|
| 31 |
|
|
cat $(srcdir)/config/fp-bit.c >> fp-bit.c
|
| 32 |
|
|
|
| 33 |
|
|
dp-bit.c: $(srcdir)/config/fp-bit.c
|
| 34 |
|
|
cat $(srcdir)/config/fp-bit.c > dp-bit.c
|
| 35 |
|
|
|
| 36 |
|
|
# We need to use -fpic when we are using gcc to compile the routines in
|
| 37 |
|
|
# initfini.c. This is only really needed when we are going to use gcc/g++
|
| 38 |
|
|
# to produce a shared library, but since we don't know ahead of time when
|
| 39 |
|
|
# we will be doing that, we just always use -fpic when compiling the
|
| 40 |
|
|
# routines in initfini.c.
|
| 41 |
|
|
# -fpic currently isn't supported for the m32r.
|
| 42 |
|
|
|
| 43 |
|
|
CRTSTUFF_T_CFLAGS =
|
| 44 |
|
|
|
| 45 |
|
|
# .init/.fini section routines
|
| 46 |
|
|
|
| 47 |
|
|
$(T)crtinit.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
|
| 48 |
|
|
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) \
|
| 49 |
|
|
$(CRTSTUFF_T_CFLAGS) $(INCLUDES) -DCRT_INIT \
|
| 50 |
|
|
-finhibit-size-directive -fno-inline-functions -g0 \
|
| 51 |
|
|
-mmodel=medium -c $(srcdir)/config/m32r/initfini.c \
|
| 52 |
|
|
-o $(T)crtinit.o
|
| 53 |
|
|
|
| 54 |
|
|
$(T)crtfini.o: $(srcdir)/config/m32r/initfini.c $(GCC_PASSES) $(CONFIG_H)
|
| 55 |
|
|
$(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) \
|
| 56 |
|
|
$(CRTSTUFF_T_CFLAGS) $(INCLUDES) -DCRT_FINI \
|
| 57 |
|
|
-finhibit-size-directive -fno-inline-functions -g0 \
|
| 58 |
|
|
-mmodel=medium -c $(srcdir)/config/m32r/initfini.c \
|
| 59 |
|
|
-o $(T)crtfini.o
|
| 60 |
|
|
m32rx:
|
| 61 |
|
|
mkdir $@
|
| 62 |
|
|
m32r2:
|
| 63 |
|
|
mkdir $@
|
| 64 |
|
|
|
| 65 |
|
|
# -mmodel={small,medium} requires separate libraries.
|
| 66 |
|
|
# We don't build libraries for the large model, instead we use the medium
|
| 67 |
|
|
# libraries. The only difference is that the large model can handle jumps
|
| 68 |
|
|
# more than 26 signed bits away.
|
| 69 |
|
|
|
| 70 |
|
|
MULTILIB_OPTIONS = mmodel=small/mmodel=medium m32r/m32rx/m32r2
|
| 71 |
|
|
MULTILIB_DIRNAMES = small medium m32r m32rx m32r2
|
| 72 |
|
|
MULTILIB_MATCHES = mmodel?medium=mmodel?large
|
| 73 |
|
|
|
| 74 |
|
|
# Set MULTILIB_EXTRA_OPTS so shipped libraries have small data in .sdata and
|
| 75 |
|
|
# SHN_M32R_SCOMMON.
|
| 76 |
|
|
# This is important for objects referenced in system header files.
|
| 77 |
|
|
MULTILIB_EXTRA_OPTS = msdata=sdata
|
| 78 |
|
|
|
| 79 |
|
|
EXTRA_MULTILIB_PARTS = crtinit.o crtfini.o
|
| 80 |
|
|
|
| 81 |
|
|
LIBGCC = stmp-multilib
|
| 82 |
|
|
INSTALL_LIBGCC = install-multilib
|