1999-08-27 23:37:10 +00:00
|
|
|
# $FreeBSD$
|
1998-03-01 23:41:17 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2010-11-01 19:39:10 +00:00
|
|
|
VERSION= "2.17.50 [FreeBSD] 2007-07-03"
|
1998-03-01 23:41:17 +00:00
|
|
|
|
2010-11-10 06:39:49 +00:00
|
|
|
.if defined(TARGET_ARCH)
|
2017-08-12 17:07:27 +00:00
|
|
|
TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}}
|
2004-06-16 07:09:44 +00:00
|
|
|
.else
|
2010-11-10 06:39:49 +00:00
|
|
|
TARGET_CPUARCH=${MACHINE_CPUARCH}
|
2004-06-16 07:09:44 +00:00
|
|
|
.endif
|
2010-11-10 06:39:49 +00:00
|
|
|
TARGET_ARCH?= ${MACHINE_ARCH}
|
2010-10-21 19:58:20 +00:00
|
|
|
TARGET_VENDOR?= unknown
|
|
|
|
TARGET_OS?= freebsd
|
2010-11-10 06:39:49 +00:00
|
|
|
BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
|
2010-10-21 19:58:20 +00:00
|
|
|
TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
|
2017-08-14 22:25:20 +00:00
|
|
|
.if ${TARGET_ARCH:Marm*eb} != "" || \
|
2016-10-31 15:33:58 +00:00
|
|
|
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "")
|
2010-11-10 06:39:49 +00:00
|
|
|
TARGET_BIG_ENDIAN=t
|
|
|
|
.endif
|
1999-03-01 04:01:57 +00:00
|
|
|
|
2017-10-31 00:07:37 +00:00
|
|
|
# GNURELTOP is the relative path to this point in the source or object
|
1998-03-01 23:41:17 +00:00
|
|
|
# tree, from any subdirectory of same. It gets extra "../" prefixes
|
|
|
|
# added to it as we descend into subdirectories.
|
2017-10-31 00:07:37 +00:00
|
|
|
GNURELTOP:= ..
|
1998-03-01 23:41:17 +00:00
|
|
|
|
2017-10-31 00:07:37 +00:00
|
|
|
RELSRC= ${GNURELTOP}/../../../contrib/binutils
|
2001-10-14 00:58:59 +00:00
|
|
|
SRCDIR= ${.CURDIR}/${RELSRC}
|
1998-03-01 23:41:17 +00:00
|
|
|
|
2010-11-10 06:39:49 +00:00
|
|
|
.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" || \
|
2011-01-27 14:16:12 +00:00
|
|
|
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "")
|
2007-02-11 07:15:06 +00:00
|
|
|
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32
|
|
|
|
.else
|
|
|
|
CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64
|
|
|
|
.endif
|
|
|
|
|
2002-02-07 17:35:49 +00:00
|
|
|
CFLAGS+= -I.
|
2001-10-14 00:58:59 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}
|
2017-10-31 00:07:37 +00:00
|
|
|
CFLAGS+= -I${.CURDIR}/${GNURELTOP}/libbfd
|
|
|
|
CFLAGS+= -I${.OBJDIR}/${GNURELTOP}/libbfd
|
2001-10-14 00:58:59 +00:00
|
|
|
CFLAGS+= -I${SRCDIR}/include
|
1998-03-12 02:55:43 +00:00
|
|
|
|
2010-11-10 06:39:49 +00:00
|
|
|
ARCHS= ${TARGET_CPUARCH}
|
1999-11-06 21:13:47 +00:00
|
|
|
|
2010-11-15 22:11:18 +00:00
|
|
|
.if exists(${.CURDIR}/Makefile.${TARGET_ARCH})
|
|
|
|
.include "${.CURDIR}/Makefile.${TARGET_ARCH}"
|
|
|
|
.elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH})
|
|
|
|
.include "${.CURDIR}/Makefile.${TARGET_CPUARCH}"
|
1998-03-12 02:55:43 +00:00
|
|
|
.endif
|