diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-08-27 00:14:11 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2016-08-27 00:14:11 +0000 |
commit | 5af442e679c70d0024e1683e5ce001bf73991c4b (patch) | |
tree | a6e641f0102328614d401f042c055d4bb9aa8cf3 /base/binutils/Makefile | |
parent | d6cf438faab891637021c195584977982e3d2ee2 (diff) | |
download | ports-5af442e679c70d0024e1683e5ce001bf73991c4b.tar.gz ports-5af442e679c70d0024e1683e5ce001bf73991c4b.zip |
WIP: external toolchain cross buildable: binutils
Add a cross buildable binutils package.
The new category is not linked to the regular ports tree to avoid make install,
poudriere and others to catch it automagically
instead of ending with a very complex file removal in the stage, prefer to use
specific plist per arch.
For now only sparc64 tested and added. This version of binutils is stipped down
only the components that are not supported by elftoolchain
Notes
Notes:
svn path=/head/; revision=420954
Diffstat (limited to 'base/binutils/Makefile')
-rw-r--r-- | base/binutils/Makefile | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/base/binutils/Makefile b/base/binutils/Makefile new file mode 100644 index 000000000000..efc61270d52c --- /dev/null +++ b/base/binutils/Makefile @@ -0,0 +1,37 @@ +# $FreeBSD$ + +PORTEPOCH= 0 +CATEGORIES= base +PKGNAMEPREFIX= ${OPSYS}- +VALID_CATEGORIES= base + +COMMENT= GNU binary tools for base + +MASTERDIR= ${.CURDIR}/../..//devel/binutils +PLIST= ${.CURDIR}/pkg-plist.${TARGET_ARCH} + +.if !defined(CROSS_TOOLCHAIN) +.error Please define CROSS_TOOLCHAIN before building +.endif + +.if !defined(CROSS_SYSROOT) +.error Please define CROSS_SYSROOT before building +.endif + +TARGET_ARCH= ${CROSS_TOOLCHAIN:C,-.*$,,} +BUTARGET= ${TARGET_ARCH}-${OPSYS:tl} +CONFIGURE_ARGS+= --host=${BUTARGET} \ + --disable-host-shared +PREFIX= /usr + +.include "${MASTERDIR}/Makefile" +.include "${LOCALBASE}/share/toolchains/${CROSS_TOOLCHAIN}.mk" + +PKG_ENV+= ABI_FILE=${CROSS_SYSROOT}/bin/sh +CFLAGS+= --sysroot=${CROSS_SYSROOT} -isystem ${CROSS_SYSROOT}/usr/include +CXXFLAGS+= --sysroot=${CROSS_SYSROOT} +CC= ${XCC} +CXX= ${XCXX} +.for tool in AS AR LD NM OBJCOPY RANLIB SIZE STRINGS +${tool}= ${CROSS_BINUTILS_PREFIX}/${tool} +.endfor |