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.
This commit is contained in:
David E. O'Brien 2008-08-31 23:38:28 +00:00
parent f4769d1087
commit 9dec52bfb2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182579
4 changed files with 21 additions and 24 deletions

View File

@ -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() \

View File

@ -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

View File

@ -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

View File

@ -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"