[108300] trunk/base/src/port1.0/portutil.tcl

Joshua Root jmr at macports.org
Thu Jul 18 11:52:18 PDT 2013


> Revision: 108300
>           https://trac.macports.org/changeset/108300
> Author:   larryv at macports.org
> Date:     2013-07-18 00:57:57 -0700 (Thu, 18 Jul 2013)
> Log Message:
> -----------
> portutil.tcl: Make get_canonical_archflags return an empty string for
> unknown flag types, instead of aborting the whole program.
> 
> Modified Paths:
> --------------
>     trunk/base/src/port1.0/portutil.tcl
> 
> Modified: trunk/base/src/port1.0/portutil.tcl
> ===================================================================
> --- trunk/base/src/port1.0/portutil.tcl	2013-07-18 07:52:52 UTC (rev 108299)
> +++ trunk/base/src/port1.0/portutil.tcl	2013-07-18 07:57:57 UTC (rev 108300)
> @@ -2988,13 +2988,14 @@
>  # returns the flags that should be passed to the compiler to choose arch(s)
>  proc get_canonical_archflags {{tool cc}} {
>      if {![variant_exists universal] || ![variant_isset universal]} {
> -        return [option configure.${tool}_archflags]
> +        set opt configure.${tool}_archflags
>      } else {
>          if {$tool == "cc"} {
>              set tool c
>          }
> -        return [option configure.universal_${tool}flags]
> +        set opt configure.universal_${tool}flags
>      }
> +    return [expr {[catch {option $opt} flags] ? {} : $flags}]

Wouldn't we *want* to get an error if we make a typo, rather than the
build silently proceeding with no archflags?

- Josh


More information about the macports-dev mailing list