From 9dec52bfb2806d69392f4eefb3eaa91f355d2608 Mon Sep 17 00:00:00 2001 From: "David E. O'Brien" Date: Sun, 31 Aug 2008 23:38:28 +0000 Subject: 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. --- gnu/usr.bin/cc/Makefile.tgt | 15 +++++++++------ gnu/usr.bin/cc/cc_tools/Makefile | 19 +++++++++++-------- gnu/usr.bin/cc/cc_tools/freebsd64-fix.h | 9 --------- 3 files changed, 20 insertions(+), 23 deletions(-) delete mode 100644 gnu/usr.bin/cc/cc_tools/freebsd64-fix.h (limited to 'gnu') diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt index d044a471870e..3cb9678a0025 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 8ff177c1c9bf..586878b99722 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 23f14d1e088d..000000000000 --- 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" -- cgit v1.3