diff options
Diffstat (limited to 'gcc/config/mips/t-vr')
-rw-r--r-- | gcc/config/mips/t-vr | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/gcc/config/mips/t-vr b/gcc/config/mips/t-vr new file mode 100644 index 00000000000..7af78ab21f7 --- /dev/null +++ b/gcc/config/mips/t-vr @@ -0,0 +1,96 @@ +# BEGIN boiler-plate MIPS stuff + +# Don't let CTOR_LIST end up in sdata section. +CRTSTUFF_T_CFLAGS = -G 0 + +# We must build libgcc2.a with -G 0, in case the user wants to link +# without the $gp register. +TARGET_LIBGCC2_CFLAGS = -G 0 + +LIB2FUNCS_EXTRA = $(srcdir)/config/mips/mips16.S +EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o + +# Assemble startup files. +$(T)crti.o: $(srcdir)/config/mips/crti.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/mips/crti.asm + +$(T)crtn.o: $(srcdir)/config/mips/crtn.asm $(GCC_PASSES) + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \ + -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/mips/crtn.asm + +# END boiler-plate + +# Endianness: EB or EL +# +# ABIs: mabi=32 +# mabi=o64 +# mabi=eabi +# meabi=eabi/mlong32 +# mabi=eabi/mgp32 +# mabi=eabi/mgp32/mlong64 +# +# Architecture: march=vr5400 +# march=vr4100 +# march=vr4100/mips16 +# +# Total: 2 * 6 * 3 = 36 multilibs. +MULTILIB_OPTIONS = \ + EL/EB \ + mabi=32/mabi=o64/mabi=eabi \ + mgp32 \ + mlong32/mlong64 \ + mips16 \ + march=vr5400/march=vr4100 + +MULTILIB_DIRNAMES = \ + el eb \ + o32 o64 eabi \ + gp32 \ + long32 long64 \ + mips16 \ + vr5400 vr4100 + +MULTILIB_MATCHES = EL=mel EB=meb + +# Assume a 4000-series is the default: we'd need a *mips16 entry if +# the default processor didn't support mips16. Also assume o64, +# which means we need to extend the o64 exceptions to combinations +# without a -mabi flag. +MULTILIB_EXCEPTIONS = \ + *mabi=32/mlong64* \ + *mabi=32/mgp32/mlong64* \ + *mabi=o64/mgp32* \ + *mabi=o64/mlong64* \ + mgp32* E[LB]/mgp32* \ + mlong64* E[LB]/mlong64* \ + *mips16/march=vr5* + +# The real value of this macro is very long, so generate it using a +# shell fragment. The idea is to tell the GCC driver how -mabi, +# -mgp32, -mlong32 and -mlong64 interact, so that it choses the right +# library when some options are specified redundantly (for example, +# -mabi=32 -mgp32). + +# The core equalities are listed after "for changes in ". The first +# entry assumes o64 is the default ABI. +MULTILIB_REDUNDANT_DIRS=` \ + for endian in '' 'el' 'eb'; do \ + for arch in '' 'vr5400' 'vr4100' \ + 'mips16' 'mips16/vr100'; do \ + for changes in long32= \ + o32/gp32=o32 \ + o32/gp32/long32=o32 \ + o32/long32=o32 \ + o64/long32=o64 \ + eabi/gp32/long32=eabi/gp32 \ + eabi/long64=eabi; do \ + from=\`echo \$${changes} | sed 's/=.*//'\`; \ + to=\`echo \$${changes} | sed 's/.*=//'\`; \ + echo \$$endian \$$from \$$arch=\$$endian \$$to \$$arch \ + | sed -e 's: *= *:=:' \ + -e 's: *:/:g' \ + -e 's:=$$:=.:'; \ + done; \ + done; \ + done` |