freebsd-dev/gnu/usr.bin/binutils/Makefile.inc0

53 lines
1.6 KiB
Makefile
Raw Normal View History

1999-08-27 23:37:10 +00:00
# $FreeBSD$
#
# This is included explicitly at the top of each sub-Makefile. We can't
# use the normal "Makefile.inc" mechanism, because we need some of these
# definitions before the sub-Makefile is processed.
VERSION= "2.17.50 [FreeBSD] 2007-07-03"
.if defined(TARGET_ARCH)
TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}}
.else
TARGET_CPUARCH=${MACHINE_CPUARCH}
.endif
TARGET_ARCH?= ${MACHINE_ARCH}
TARGET_VENDOR?= unknown
TARGET_OS?= freebsd
BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
.if ${TARGET_ARCH:Marm*eb} != "" || \
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "")
TARGET_BIG_ENDIAN=t
.endif
# GNURELTOP is the relative path to this point in the source or object
# tree, from any subdirectory of same. It gets extra "../" prefixes
# added to it as we descend into subdirectories.
GNURELTOP:= ..
RELSRC= ${GNURELTOP}/../../../contrib/binutils
2001-10-14 00:58:59 +00:00
SRCDIR= ${.CURDIR}/${RELSRC}
.if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \
Create a new MACHINE_ARCH for Freescale PowerPC e500v2 Summary: The Freescale e500v2 PowerPC core does not use a standard FPU. Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor unit, which doubles as a FPU. The PowerPC SPE ABI is incompatible with the stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this. Additionaly, the SPE opcodes overlap with Altivec, so these are mutually exclusive. Taking advantage of this fact, a new file, powerpc/booke/spe.c, was created with the same function set as in powerpc/powerpc/altivec.c, so it becomes effectively a drop-in replacement. setjmp/longjmp were modified to save the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by the SPE). Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not support double-precision floating point. Also, without a new MACHINE_ARCH it would be impossible to provide binary packages which utilize the SPE. Additionally, no work has been done to support ports, work is needed for this. This also means no newer gcc can yet be used. However, gcc's powerpc support has been refactored which would make adding a powerpcspe-freebsd target very easy. Test Plan: This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222 (P1022-based) board, compiled against the new ABI. Base system utilities (/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot multiuser. Reviewed By: bdrewery, imp Relnotes: yes Differential Revision: https://reviews.freebsd.org/D5683
2016-10-22 01:57:15 +00:00
${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpcspe" || \
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "")
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
.else
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64
.endif
CFLAGS+= -I.
2001-10-14 00:58:59 +00:00
CFLAGS+= -I${.CURDIR}
CFLAGS+= -I${.CURDIR}/${GNURELTOP}/libbfd
CFLAGS+= -I${.OBJDIR}/${GNURELTOP}/libbfd
2001-10-14 00:58:59 +00:00
CFLAGS+= -I${SRCDIR}/include
ARCHS= ${TARGET_CPUARCH}
.if exists(${.CURDIR}/Makefile.${TARGET_ARCH})
.include "${.CURDIR}/Makefile.${TARGET_ARCH}"
.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH})
.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}"
.endif