svn commit: r337704 - head/Mk

Baptiste Daroussin bapt at FreeBSD.org
Fri Dec 27 10:46:55 UTC 2013


Author: bapt
Date: Fri Dec 27 10:46:54 2013
New Revision: 337704
URL: http://svnweb.freebsd.org/changeset/ports/337704

Log:
  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

Modified:
  head/Mk/bsd.port.mk

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Fri Dec 27 10:45:40 2013	(r337703)
+++ head/Mk/bsd.port.mk	Fri Dec 27 10:46:54 2013	(r337704)
@@ -341,6 +341,9 @@ FreeBSD_MAINTAINER=	portmgr at 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=		#


More information about the svn-ports-head mailing list