diff options
| author | Juli Mallett <jmallett@FreeBSD.org> | 2010-06-02 11:06:03 +0000 |
|---|---|---|
| committer | Juli Mallett <jmallett@FreeBSD.org> | 2010-06-02 11:06:03 +0000 |
| commit | 5619a3e4bf36620134740c06f87fa30eb22c841d (patch) | |
| tree | 37acadcf4e976e87c154f5e994d5f484e3aa0770 /gnu/usr.bin/cc | |
| parent | e3303e900e033aa21cf40c7bd23def0834782911 (diff) | |
Notes
Diffstat (limited to 'gnu/usr.bin/cc')
| -rw-r--r-- | gnu/usr.bin/cc/Makefile.inc | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index 1b7cbceda88f..3f03d2683623 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -32,10 +32,31 @@ CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE} CFLAGS+= -DCROSS_COMPILE .endif -.if ${TARGET_ARCH} == "mips" && !defined(TARGET_BIG_ENDIAN) +.if ${TARGET_ARCH} == "mips" +# XXX This is backwards, MIPS should default to BE. +.if !defined(TARGET_BIG_ENDIAN) CFLAGS += -DTARGET_ENDIAN_DEFAULT=0 .endif +.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32" +.if ${TARGET_ABI} == "n32" +MIPS_ABI_DEFAULT=ABI_N32 +.elif ${TARGET_ABI} == "n64" +MIPS_ABI_DEFAULT=ABI_64 +.endif +.endif + +MIPS_ABI_DEFAULT?=ABI_32 +CFLAGS += -DMIPS_ABI_DEFAULT=${MIPS_ABI_DEFAULT} + +# GCC by default takes the ISA from the ABI's requirements. If world is built +# with a superior ISA, since we lack multilib, we have to set the right +# default ISA to be able to link against what's in /usr/lib. Terrible stuff. +.if defined(TARGET_CPUTYPE) +CFLAGS += -DMIPS_CPU_STRING_DEFAULT=\"${TARGET_CPUTYPE}\" +.endif +.endif + .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE) CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE} .endif |
