diff options
author | bapt <bapt@FreeBSD.org> | 2013-12-27 18:46:54 +0800 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2013-12-27 18:46:54 +0800 |
commit | 9c13dec15e0dcbfff90eebc61e47b5332368020d (patch) | |
tree | a1254991d85de65a4c169fd728e0de3220b154d7 /Mk | |
parent | d5a93483537e47055689a49314331df642f096e8 (diff) | |
download | freebsd-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.mk | 11 |
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= # |