aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorandrew <andrew@FreeBSD.org>2014-10-21 01:21:21 +0800
committerandrew <andrew@FreeBSD.org>2014-10-21 01:21:21 +0800
commit545d2767e9e386dd93b1bfdf1b39f09c649b118c (patch)
treef6e20594036530486bc2e10d9378e6dad14139c1 /devel
parentef7091e75f9b43195de65f2cdb37fa48cb28815a (diff)
downloadfreebsd-ports-gnome-545d2767e9e386dd93b1bfdf1b39f09c649b118c.tar.gz
freebsd-ports-gnome-545d2767e9e386dd93b1bfdf1b39f09c649b118c.tar.zst
freebsd-ports-gnome-545d2767e9e386dd93b1bfdf1b39f09c649b118c.zip
Allow devel/powerpc64-gcc to be used to target non-FreeBSD ports.
* The format extension patch should only be used on FreeBSD. * The name of the target may not follow the portbld scheme. Differential Revision: https://reviews.freebsd.org/D972 Approved by: bapt
Diffstat (limited to 'devel')
-rw-r--r--devel/powerpc64-gcc/Makefile14
-rw-r--r--devel/powerpc64-gcc/files/freebsd-format-extensions (renamed from devel/powerpc64-gcc/files/patch-format-extensions)0
2 files changed, 11 insertions, 3 deletions
diff --git a/devel/powerpc64-gcc/Makefile b/devel/powerpc64-gcc/Makefile
index 8cfa321bd8ce..5bfac137c76d 100644
--- a/devel/powerpc64-gcc/Makefile
+++ b/devel/powerpc64-gcc/Makefile
@@ -26,14 +26,22 @@ RUN_DEPENDS= ${PKGNAMEPREFIX}${OPSYS:tl}-as:${PORTSDIR}/devel/${PKGNAMEPREFIX}bi
PATCH_WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
WRKSRC= ${WRKDIR}/build-gcc
+.if empty(GCC_TARGET)
+# We are building for a FreeBSD target
+GCC_TARGET= ${PKGNAMEPREFIX}portbld-${OPSYS:tl}${OSREL}
+BU_PREFIX= ${PKGNAMEPREFIX}${OPSYS:tl}
+EXTRA_PATCHES+= ${FILESDIR}/freebsd-format-extensions
+.else
+BU_PREFIX= ${GCC_TARGET}
+.endif
GNU_CONFIGURE= yes
-CONFIGURE_ARGS= --target=${PKGNAMEPREFIX}portbld-${OPSYS:tl}${OSREL} --disable-nls --enable-languages=c,c++ \
+CONFIGURE_ARGS= --target=${GCC_TARGET} --disable-nls --enable-languages=c,c++ \
--without-headers --disable-shared \
--with-gmp=${LOCALBASE} \
--with-pkgversion="FreeBSD Ports Collection for ${PKGNAMEPREFIX:C/-//g}" \
--with-system-zlib \
- --with-as=${LOCALBASE}/bin/${PKGNAMEPREFIX}${OPSYS:tl}-as \
- --with-ld=${LOCALBASE}/bin/${PKGNAMEPREFIX}${OPSYS:tl}-ld
+ --with-as=${LOCALBASE}/bin/${BU_PREFIX}-as \
+ --with-ld=${LOCALBASE}/bin/${BU_PREFIX}-ld
CONFIGURE_SCRIPT= ../${PORTNAME}-${PORTVERSION}/configure
diff --git a/devel/powerpc64-gcc/files/patch-format-extensions b/devel/powerpc64-gcc/files/freebsd-format-extensions
index ed211f8e2070..ed211f8e2070 100644
--- a/devel/powerpc64-gcc/files/patch-format-extensions
+++ b/devel/powerpc64-gcc/files/freebsd-format-extensions