freebsd-ports/base/binutils/Makefile
John Baldwin c0cd82c292 Use a unified packing list for base/binutils.
Create a single pkg-plist that uses arch-specific PLIST_SUBs to control
arch-specific linker scripts but is otherwise machine-independent.
- Only include objcopy for OS versions older than 11.0 (11.0 uses the
  elftoolchain elfcopy as objcopy in the base system)
- Use %%BUTARGET%% throughout.  This probably fixes the sparc64 pkg-plist
  which was not updated when BUTARGET started including OSREL.  This also
  avoids hardcoding an OSREL of 12.0 for powerpc64.
- Enable MIPS ldscripts for all MIPS architectures which probably fixes
  this port on mips64 and mipsn32.
- Enable PowerPC ldscripts for all PowerPC architectures which probably
  fixes this port on powerpc.

Reviewed by:	bapt, bdrewery
2018-06-29 18:07:29 +00:00

49 lines
868 B
Makefile

# $FreeBSD$
PORTEPOCH= 0
CATEGORIES= base
PKGNAMEPREFIX= ${OPSYS:tl}-
VALID_CATEGORIES= base
COMMENT= GNU binary tools for base
MASTERDIR= ${.CURDIR}/../../devel/binutils
PLIST= ${.CURDIR}/pkg-plist
.if !defined(CROSS_TOOLCHAIN)
.error Please define CROSS_TOOLCHAIN before building
.endif
.if !defined(CROSS_SYSROOT)
.error Please define CROSS_SYSROOT before building
.endif
BUTARGET= ${ARCH}-unknown-${OPSYS:tl}${OSREL}
CONFIGURE_ARGS+= --disable-host-shared
PREFIX= /usr
.include "${MASTERDIR}/Makefile"
.if ${OSVERSION} >= 1100100
PLIST_SUB+= OBJCOPY="@comment "
.else
PLIST_SUB+= OBJCOPY=""
.endif
.if ${ARCH:Mmips*}
PLIST_SUB+= MIPS=""
.else
PLIST_SUB+= MIPS="@comment "
.endif
.if ${ARCH:Mpowerpc*}
PLIST_SUB+= POWERPC=""
.else
PLIST_SUB+= POWERPC="@comment "
.endif
.if ${ARCH:Msparc*}
PLIST_SUB+= SPARC=""
.else
PLIST_SUB+= SPARC="@comment "
.endif