differences in configure flags

Joshua Root jmr at macports.org
Wed Feb 2 15:24:16 PST 2011


On 2011-2-3 09:54 , James Gregurich wrote:
> a couple of questions:
> 
> Why doesn't CPPFLAGS contain ${output} like the other c-language flags?
> 
> 
> 
>         append_list_to_environment_value configure "CFLAGS"
> ${output}${configure.cflags}
>         append_list_to_environment_value configure "CPPFLAGS"
> ${configure.cppflags}
>         append_list_to_environment_value configure "CXXFLAGS"
> ${output}${configure.cxxflags}
>         append_list_to_environment_value configure "OBJCFLAGS"
> ${output}${configure.objcflags}

It's not a terribly descriptive variable name. If you look just above
you see that it's either empty or "-pipe", which doesn't affect the
preprocessor.

> from configure_main:
> 
> 
> 
> 
> 
>         # add extra flags that are conditional on whether we're building
> universal
>         if {[variant_exists universal] && [variant_isset universal]} {
>             foreach flags {CFLAGS OBJCFLAGS} {
>                 append_list_to_environment_value configure $flags
> ${configure.universal_cflags}
>             }
>             append_list_to_environment_value configure "CXXFLAGS"
> ${configure.universal_cxxflags}
>             append_list_to_environment_value configure "CPPFLAGS"
> ${configure.universal_cppflags}
>             append_list_to_environment_value configure "LDFLAGS"
> ${configure.universal_ldflags}
>             eval configure.pre_args-append ${configure.universal_args}
>         } else {
>             foreach {tool flags} {cc CFLAGS cxx CXXFLAGS objc OBJCFLAGS
> f77 FFLAGS f90 F90FLAGS fc FCFLAGS ld LDFLAGS} {
>                 append_list_to_environment_value configure $flags [set
> configure.${tool}_archflags]
>                 if {${configure.march} != {}} {
>                     append_list_to_environment_value configure $flags
> "-march=${configure.march}"
>                 }
>                 if {${configure.mtune} != {}} {
>                     append_list_to_environment_value configure $flags
> "-mtune=${configure.mtune}"
>                 }
>             }
>         }
> 
> 
> 
> Why isn't CPPFLAGS being updated with the same info as the other
> c-language flags? Should it be?

I don't understand the question. How do you think CPPFLAGS should be
updated here?

- Josh


More information about the macports-dev mailing list