aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2010-09-15 10:54:46 +0000
committerPav Lucistnik <pav@FreeBSD.org>2010-09-15 10:54:46 +0000
commit8dab5e989705ab34484d61f4f30d92f32ea2a948 (patch)
tree480efefad91832f0341e71675cbaf7ad49416b56 /Mk/bsd.port.mk
parentde64fe3e78e2c7165a2807d5d27225270473d526 (diff)
downloadports-8dab5e989705ab34484d61f4f30d92f32ea2a948.tar.gz
ports-8dab5e989705ab34484d61f4f30d92f32ea2a948.zip
- Add USE_BINUTILS knob that makes the build process use binutils from port
instead of the binutils in base PR: ports/149955 Submitted by: bf
Notes
Notes: svn path=/head/; revision=261203
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 88b098954210..ffd0233a5442 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -312,6 +312,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# USE_GCC - If set, this port requires this version of gcc, either in
# the system or installed from a port.
# USE_CSTD - Override the default C language standard (gnu89, gnu99)
+# USE_BINUTILS - Use binutils suite from port instead of the version in base.
# USE_GMAKE - If set, this port uses gmake.
# GMAKE - Set to path of GNU make if not in $PATH.
# Default: gmake
@@ -1734,6 +1735,22 @@ CONFIGURE_ENV+= MAKE=${GMAKE}
.include "${PORTSDIR}/Mk/bsd.gcc.mk"
.endif
+.if defined(USE_BINUTILS) && !defined(DISABLE_BINUTILS)
+BUILD_DEPENDS+= ${LOCALBASE}/bin/as:${PORTSDIR}/devel/binutils
+BINUTILS?= ADDR2LINE AR AS CPPFILT GPROF LD NM OBJCOPY OBJDUMP RANLIB \
+ READELF SIZE STRINGS
+BINUTILS_NO_MAKE_ENV?=
+. for b in ${BINUTILS}
+${b}= ${LOCALBASE}/bin/${b:C/PP/++/:L}
+. if defined(GNU_CONFIGURE) || defined(BINUTILS_CONFIGURE)
+CONFIGURE_ENV+= ${b}="${${b}}"
+. endif
+. if ${BINUTILS_NO_MAKE_ENV:M${b}} == ""
+MAKE_ENV+= ${b}="${${b}}"
+. endif
+. endfor
+.endif
+
.if defined(USE_OPENLDAP) || defined(WANT_OPENLDAP_VER)
.include "${PORTSDIR}/Mk/bsd.ldap.mk"
.endif