[110419] trunk/base/src/port1.0/portconfigure.tcl
larryv at macports.org
larryv at macports.org
Fri Aug 30 16:49:06 PDT 2013
Revision: 110419
https://trac.macports.org/changeset/110419
Author: larryv at macports.org
Date: 2013-08-30 16:49:06 -0700 (Fri, 30 Aug 2013)
Log Message:
-----------
portconfigure.tcl: Rewrite cxx_stdlib handling to more closely resemble
similar options, like "configure.pipe". (Namely, let
configure.[obj]cxxflags be and add -stdlib while setting up the
environment.)
Modified Paths:
--------------
trunk/base/src/port1.0/portconfigure.tcl
Modified: trunk/base/src/port1.0/portconfigure.tcl
===================================================================
--- trunk/base/src/port1.0/portconfigure.tcl 2013-08-30 23:41:40 UTC (rev 110418)
+++ trunk/base/src/port1.0/portconfigure.tcl 2013-08-30 23:49:06 UTC (rev 110419)
@@ -136,9 +136,9 @@
# compiler flags section
default configure.optflags {-Os}
default configure.cflags {${configure.optflags}}
-default configure.cxxflags {[portconfigure::choose_default_cxxflags]}
+default configure.cxxflags {${configure.optflags}}
default configure.objcflags {${configure.optflags}}
-default configure.objcxxflags {[portconfigure::choose_default_cxxflags]}
+default configure.objcxxflags {${configure.optflags}}
default configure.cppflags {-I${prefix}/include}
default configure.ldflags {"-L${prefix}/lib -Wl,-headerpad_max_install_names"}
default configure.libs {}
@@ -259,21 +259,6 @@
}
}
-# internal function to choose the default configure.cxxflags and configure.objcxxflags
-proc portconfigure::choose_default_cxxflags {} {
- global cxx_stdlib
- global configure.optflags
- global configure.cxx
-
- set flags ${configure.optflags}
-
- if {${cxx_stdlib} != "" && [string match *clang* ${configure.cxx}]} {
- append flags " -stdlib=${cxx_stdlib}"
- }
-
- return ${flags}
-}
-
# internal function to choose the default configure.build_arch and
# configure.universal_archs based on supported_archs and build_arch or
# universal_archs
@@ -639,7 +624,7 @@
configure.pkg_config configure.pkg_config_path \
configure.ccache configure.distcc configure.cpp configure.javac configure.sdkroot \
configure.march configure.mtune \
- os.platform os.major
+ os.platform os.major cxx_stdlib
foreach tool {cc cxx objc objcxx f77 f90 fc ld} {
global configure.${tool} configure.${tool}_archflags
}
@@ -706,6 +691,15 @@
append_to_environment_value configure $env_var $output
}
+ # Add C++ standard library, if requested. Set up here to allow
+ # ${configure.cxxflags} and ${configure.objcxxflags} to override.
+ if {[info exists cxx_stdlib] && $cxx_stdlib ne {} &&
+ [string match *clang* [option configure.cxx]]
+ } then {
+ append_to_environment_value configure CXXFLAGS -stdlib=$cxx_stdlib
+ append_to_environment_value configure OBJCXXFLAGS -stdlib=$cxx_stdlib
+ }
+
# Append configure flags.
foreach env_var { \
CC CXX OBJC OBJCXX FC F77 F90 JAVAC \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130830/631f59fc/attachment.html>
More information about the macports-changes
mailing list