Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 2014 23:21:37 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r269102 - in stable/10/share: examples/etc mk
Message-ID:  <201407252321.s6PNLbJb035843@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Fri Jul 25 23:21:36 2014
New Revision: 269102
URL: http://svnweb.freebsd.org/changeset/base/269102

Log:
  MFC r263373, r268402
  
    Add a way to apply CFLAGS only when building the given architecture.  This
    is useful primarily on a system used for cross-building, when you have a
    set of flags to apply to the TARGET_ARCH being cross-built but don't want
    those settings applied to building the cross-tools or other components that
    run on the build host machine.
  
    Support CXXFLAGS.${MACHINE_ARCH} as well as CFLAGS.  This allows different
    C++ options for toolchain versus target when cross-building.

Modified:
  stable/10/share/examples/etc/make.conf
  stable/10/share/mk/bsd.cpu.mk
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/share/examples/etc/make.conf
==============================================================================
--- stable/10/share/examples/etc/make.conf	Fri Jul 25 23:12:22 2014	(r269101)
+++ stable/10/share/examples/etc/make.conf	Fri Jul 25 23:21:36 2014	(r269102)
@@ -60,6 +60,12 @@
 # nonstandard optimization settings
 # before submitting bug reports without patches to the developers.
 #
+# CFLAGS.arch provides a mechanism for applying CFLAGS only when building 
+# the given architecture.  This is useful primarily on a system used for 
+# cross-building, when you have a set of flags to apply to the TARGET_ARCH 
+# being cross-built but don't want those settings applied to building the 
+# cross-tools or other components that run on the build host machine.  
+#
 # CXXFLAGS controls the compiler settings used when compiling C++ code.
 # Note that CXXFLAGS is initially set to the value of CFLAGS.  If you wish
 # to add to CXXFLAGS value, "+=" must be used rather than "=".  Using "="
@@ -71,6 +77,7 @@
 #
 # CFLAGS+=	-msse3
 # CXXFLAGS+=	-msse3
+# CFLAGS.armv6+= -mfloat-abi=softfp
 #
 # MAKE_SHELL controls the shell used internally by make(1) to process the
 # command scripts in makefiles.  Three shells are supported, sh, ksh, and

Modified: stable/10/share/mk/bsd.cpu.mk
==============================================================================
--- stable/10/share/mk/bsd.cpu.mk	Fri Jul 25 23:12:22 2014	(r269101)
+++ stable/10/share/mk/bsd.cpu.mk	Fri Jul 25 23:21:36 2014	(r269102)
@@ -262,3 +262,8 @@ CFLAGS += -G0
 .if !defined(NO_CPU_CFLAGS)
 CFLAGS += ${_CPUCFLAGS}
 .endif
+
+# Add in any architecture-specific CFLAGS.  
+# These come from make.conf or the command line or the environment.
+CFLAGS += ${CFLAGS.${MACHINE_ARCH}}
+CXXFLAGS += ${CXXFLAGS.${MACHINE_ARCH}}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407252321.s6PNLbJb035843>