summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/cc')
-rw-r--r--gnu/usr.bin/cc/Makefile.inc21
-rw-r--r--gnu/usr.bin/cc/Makefile.tgt4
-rw-r--r--gnu/usr.bin/cc/cc_tools/auto-host.h8
3 files changed, 10 insertions, 23 deletions
diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc
index 9d3ee2d..b97261a 100644
--- a/gnu/usr.bin/cc/Makefile.inc
+++ b/gnu/usr.bin/cc/Makefile.inc
@@ -22,12 +22,6 @@ CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\"
#CFLAGS+= -DWANT_COMPILER_INVARIANTS
CSTD?= gnu89
-# If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
-# to get the proper sizes in limits.h
-.if defined(LONG_TYPE_SIZE)
-CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
-.endif
-
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
CFLAGS+= -DCROSS_COMPILE
.endif
@@ -36,21 +30,18 @@ CFLAGS+= -DCROSS_COMPILE
CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END
.endif
-
.if ${TARGET_CPUARCH} == "mips"
-.if ${TARGET_ARCH} == "mipsel"
+.if ${TARGET_ARCH:Mmips*el} != ""
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"
+.if ${TARGET_ARCH:Mmips64*} != ""
MIPS_ABI_DEFAULT=ABI_64
+.elif ${TARGET_ARCH:Mmipsn32*} != ""
+MIPS_ABI_DEFAULT=ABI_N32
+.else
+MIPS_ABI_DEFAULT=ABI_32
.endif
-.endif
-
-MIPS_ABI_DEFAULT?=ABI_32
CFLAGS += -DMIPS_ABI_DEFAULT=${MIPS_ABI_DEFAULT}
# If we are compiling for the O32 ABI, we need to default to MIPS-III rather
diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt
index f0f15d1..e50abd0 100644
--- a/gnu/usr.bin/cc/Makefile.tgt
+++ b/gnu/usr.bin/cc/Makefile.tgt
@@ -4,7 +4,7 @@
# MACHINE_CPUARCH, but there's no easy way to export make functions...
.if defined(TARGET_ARCH)
-TARGET_CPUARCH=${TARGET_ARCH:C/mipse[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
+TARGET_CPUARCH=${TARGET_ARCH:C/mips.*e[bl]/mips/:C/armeb/arm/:C/powerpc64/powerpc/}
.else
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
@@ -17,7 +17,7 @@ TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD
.if ${TARGET_ARCH} == "sparc64"
TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc
.endif
-.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "mipseb" || ${TARGET_ARCH} == "mips64eb"
+.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH:Mmips*eb} != ""
TARGET_BIG_ENDIAN=t
.endif
.if ${TARGET_ARCH} == "powerpc64"
diff --git a/gnu/usr.bin/cc/cc_tools/auto-host.h b/gnu/usr.bin/cc/cc_tools/auto-host.h
index a3a235c..86795e1 100644
--- a/gnu/usr.bin/cc/cc_tools/auto-host.h
+++ b/gnu/usr.bin/cc/cc_tools/auto-host.h
@@ -267,9 +267,7 @@
/* Define if your assembler supports -relax option. */
#ifndef USED_FOR_TARGET
-# ifdef __sparc64__
-# define HAVE_AS_RELAX_OPTION 1
-# endif
+#define HAVE_AS_RELAX_OPTION 1
#endif
@@ -891,9 +889,7 @@
/* Define if your PowerPC64 linker only needs function descriptor syms. */
#ifndef USED_FOR_TARGET
-# ifdef __powerpc64__
-# define HAVE_LD_NO_DOT_SYMS 1
-# endif
+#define HAVE_LD_NO_DOT_SYMS 1
#endif
OpenPOWER on IntegriCloud