anchor.diff:  compiler(".C")   -> "$CXX";
   compiler(_)      -> "$CC".
   
  -
  +%%
  +%% Given a list of {Key, Value} variables, and another list of default
  +%% {Key, Value} variables, return a merged list where the rule is if the
  +%% default is expandable expand it with the value of the variable list,
  +%% otherwise just return the value of the variable.
  +%%
  +apply_defaults(Vars, Defaults) ->
  +    dict:to_list(
  +        dict:merge(fun(Key, VarValue, DefaultValue) ->
  +                        case is_expandable(DefaultValue) of
  +                             true ->
  +                                 expand_env_variable(DefaultValue,
  +                                                     Key, VarValue);
  +                             false -> VarValue
  +                        end
  +                    end,
  +                    dict:from_list(Vars),
  +                    dict:from_list(Defaults))).
   %%
   %% Given a list of {Key, Value} environment variables, where Key may be defined
   %% multiple times, walk the list and expand each self-reference so that we
  
positive.code:     DefaultEnvs  = filter_envs(default_env(), []),
      PortEnvs = rebar_config:get_list(Config, port_envs, []),
      OverrideEnvs = filter_envs(PortEnvs, []),
      RawEnv = DefaultEnvs ++ OverrideEnvs ++ os_env(),
      expand_vars_loop(merge_each_var(RawEnv, [])).
  
  %% ===================================================================
  
negative.code:      {"ERLANG_ARCH", integer_to_list(8 * erlang:system_info(wordsize))},
       {"ERLANG_TARGET", rebar_utils:get_arch()},
  
       %% Solaris specific flags
       {"solaris.*-64$", "CFLAGS", "-D_REENTRANT -m64 $CFLAGS"},
       {"solaris.*-64$", "CXXFLAGS", "-D_REENTRANT -m64 $CXXFLAGS"},
       {"solaris.*-64$", "LDFLAGS", "-m64 $LDFLAGS"},
  
       %% OS X Leopard flags for 64-bit
       {"darwin9.*-64$", "CFLAGS", "-m64 $CFLAGS"},
       {"darwin9.*-64$", "CXXFLAGS", "-m64 $CXXFLAGS"},
       {"darwin9.*-64$", "LDFLAGS", "-arch x86_64 $LDFLAGS"},
  
       %% OS X Snow Leopard flags for 32-bit
       {"darwin10.*-32", "CFLAGS", "-m32 $CFLAGS"},
       {"darwin10.*-32", "CXXFLAGS", "-m32 $CXXFLAGS"},
       {"darwin10.*-32", "LDFLAGS", "-arch i386 $LDFLAGS"}
      ].
  
  
  