aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2013-12-27 18:46:54 +0800
committerbapt <bapt@FreeBSD.org>2013-12-27 18:46:54 +0800
commit9c13dec15e0dcbfff90eebc61e47b5332368020d (patch)
treea1254991d85de65a4c169fd728e0de3220b154d7 /Mk
parentd5a93483537e47055689a49314331df642f096e8 (diff)
downloadfreebsd-ports-9c13dec15e0dcbfff90eebc61e47b5332368020d.tar.gz
freebsd-ports-9c13dec15e0dcbfff90eebc61e47b5332368020d.tar.zst
freebsd-ports-9c13dec15e0dcbfff90eebc61e47b5332368020d.zip
New CFLAGS_${ARCH} and CXXFLAGS_${ARCH}
Those are respectively appended to CFLAGS and CXXFLAGS on the matching arches That avoid having to include .pre.mk just for selecting where to add CFLAGS
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 4d8a670b47c8..9a3cb07bf13c 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -341,6 +341,9 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# USE_CSTD - Override the default C language standard (gnu89, gnu99)
# USE_CXXSTD Override the default C++ language standard
# USE_BINUTILS - Use binutils suite from port instead of the version in base.
+# CFLAGS_${ARCH} Append the cflags to CFLAGS only on the specified architecture
+# CXXFLAGS_${ARCH}
+# Append the cxxflags to CXXFLAGS only on the specified architecture
##
# USE_GHOSTSCRIPT
# - If set, this port needs ghostscript to both
@@ -2101,10 +2104,18 @@ CFLAGS+= -fno-strict-aliasing
CFLAGS:= ${CFLAGS:N-std=*} -std=${USE_CSTD}
.endif
+.if defined(CFLAGS_${ARCH})
+CFLAGS+= ${CFLAGS_${ARCH}}
+.endif
+
.if defined(USE_CXXSTD)
CXXFLAGS:= ${CXXFLAGS:N-std=*} -std=${USE_CXXSTD}
.endif
+.if defined(CXXFLAGS_${ARCH})
+CXXFLAGS+= ${CXXFLAGS_${ARCH}}
+.endif
+
# Multiple make jobs support
.if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE)
_MAKE_JOBS= #