[110419] trunk/base/src/port1.0/portconfigure.tcl

Jeremy Huddleston Sequoia jeremyhu at macports.org
Sat Aug 31 09:02:44 PDT 2013


I reverted this as it prevents the Portfile from overriding (eg: r110452 and r110480) and other ports (eg: cctools, ld64, boost)

If you would like to revise it to support Portfiles setting 'configure.cxx_runtime', that would be a great idea (of course more ports that use ${configure.cxxflags} rather than what is in the environment would need to be manually updated).

--Jeremy

On Aug 30, 2013, at 16:49, larryv at macports.org wrote:

> Revision
> 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
> Diff
> 
> Modified: trunk/base/src/port1.0/portconfigure.tcl (110418 => 110419)
> 
> --- 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 \
> 
> _______________________________________________
> macports-changes mailing list
> macports-changes at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-changes

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4145 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130831/25b57472/attachment.p7s>


More information about the macports-dev mailing list