diff options
author | obrien <obrien@FreeBSD.org> | 2008-08-31 23:38:28 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2008-08-31 23:38:28 +0000 |
commit | 1da46bec0265d325476f65094ffda9c1ed80c7f5 (patch) | |
tree | bc857117127eed5f74da8855b772fc2ddf1577aa | |
parent | affcc995ea407888eb3c840f0dfcc8a4b2936bd9 (diff) | |
download | FreeBSD-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.
-rw-r--r-- | contrib/gcc/config/i386/freebsd64.h | 2 | ||||
-rw-r--r-- | gnu/usr.bin/cc/Makefile.tgt | 15 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_tools/Makefile | 19 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_tools/freebsd64-fix.h | 9 |
4 files changed, 21 insertions, 24 deletions
diff --git a/contrib/gcc/config/i386/freebsd64.h b/contrib/gcc/config/i386/freebsd64.h index 0c41602..b9e7386 100644 --- a/contrib/gcc/config/i386/freebsd64.h +++ b/contrib/gcc/config/i386/freebsd64.h @@ -23,7 +23,7 @@ Boston, MA 02110-1301, USA. */ #undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (FreeBSD/x86-64 ELF)"); +#define TARGET_VERSION fprintf (stderr, " (FreeBSD/amd64 ELF)"); #undef FBSD_TARGET_CPU_CPP_BUILTINS #define FBSD_TARGET_CPU_CPP_BUILTINS() \ 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" |