summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2008-08-31 23:38:28 +0000
committerobrien <obrien@FreeBSD.org>2008-08-31 23:38:28 +0000
commit1da46bec0265d325476f65094ffda9c1ed80c7f5 (patch)
treebc857117127eed5f74da8855b772fc2ddf1577aa /gnu
parentaffcc995ea407888eb3c840f0dfcc8a4b2936bd9 (diff)
downloadFreeBSD-src-1da46bec0265d325476f65094ffda9c1ed80c7f5.zip
FreeBSD-src-1da46bec0265d325476f65094ffda9c1ed80c7f5.tar.gz
Turn cc_tools/Makefile and Makefile.tgt into a "linear" read. Shared
parts of the configuration aren't duplicated, and arch-specific exceptions are made "in-place". Also clean up the FreeBSD/amd64 config a little.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/cc/Makefile.tgt15
-rw-r--r--gnu/usr.bin/cc/cc_tools/Makefile19
-rw-r--r--gnu/usr.bin/cc/cc_tools/freebsd64-fix.h9
3 files changed, 20 insertions, 23 deletions
diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt
index d044a47..3cb9678 100644
--- a/gnu/usr.bin/cc/Makefile.tgt
+++ b/gnu/usr.bin/cc/Makefile.tgt
@@ -2,16 +2,19 @@
TARGET_ARCH?= ${MACHINE_ARCH}
-.if ${TARGET_ARCH} == "arm"
-GCC_CPU= arm
-.elif ${TARGET_ARCH} == "i386" || ${TARGET_ARCH} == "amd64"
+.if ${TARGET_ARCH} == "amd64"
GCC_CPU= i386
-.elif ${TARGET_ARCH} == "ia64"
-TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD
-GCC_CPU= ia64
.elif ${TARGET_ARCH} == "powerpc"
GCC_CPU= rs6000
.elif ${TARGET_ARCH} == "sparc64"
GCC_CPU= sparc
+.else
+GCC_CPU= ${TARGET_ARCH}
+.endif
+
+.if ${TARGET_ARCH} == "ia64"
+TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD
+.endif
+.if ${TARGET_ARCH} == "sparc64"
TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc
.endif
diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile
index 8ff177c..586878b 100644
--- a/gnu/usr.bin/cc/cc_tools/Makefile
+++ b/gnu/usr.bin/cc/cc_tools/Makefile
@@ -38,22 +38,25 @@ TARGET_INC+= freebsd-native.h
TARGET_INC+= freebsd-spec.h
TARGET_INC+= freebsd.h
.if ${TARGET_ARCH} != "i386" && ${TARGET_ARCH} != "amd64"
-.if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
+. if exists(${GCCDIR}/config/${GCC_CPU}/sysv4.h)
TARGET_INC+= ${GCC_CPU}/sysv4.h
-.endif
+. endif
.endif
.if ${TARGET_ARCH} == "amd64"
TARGET_INC+= ${GCC_CPU}/x86-64.h
-TARGET_INC+= ${GCC_CPU}/freebsd.h
-TARGET_INC+= ${GCC_CPU}/freebsd64.h
-TARGET_INC+= freebsd64-fix.h
-.elif ${TARGET_ARCH} == "arm"
+.endif
+.if ${TARGET_ARCH} == "arm"
TARGET_INC+= ${GCC_CPU}/elf.h
+.endif
+.if ${TARGET_ARCH} == "arm"
TARGET_INC+= ${GCC_CPU}/aout.h
+.endif
TARGET_INC+= ${GCC_CPU}/freebsd.h
+.if ${TARGET_ARCH} == "amd64"
+TARGET_INC+= ${GCC_CPU}/freebsd64.h
+.endif
+.if ${TARGET_ARCH} == "arm"
TARGET_INC+= ${GCC_CPU}/arm.h
-.else
-TARGET_INC+= ${GCC_CPU}/freebsd.h
.endif
TARGET_INC+= defaults.h
diff --git a/gnu/usr.bin/cc/cc_tools/freebsd64-fix.h b/gnu/usr.bin/cc/cc_tools/freebsd64-fix.h
deleted file mode 100644
index 23f14d1..0000000
--- a/gnu/usr.bin/cc/cc_tools/freebsd64-fix.h
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * config/i386/freebsd64.h neglects to override the default bogus mcount
- * function name. In order to avoid touching vendor source while gcc3.4
- * is in progress, try a minimal workaround.
- *
- * $FreeBSD$
- */
-#undef MCOUNT_NAME
-#define MCOUNT_NAME ".mcount"
OpenPOWER on IntegriCloud