Getting the entire configure.cflags variable

Lawrence Velázquez larryv at macports.org
Wed Oct 8 11:51:23 PDT 2014


On Oct 3, 2014, at 5:04 PM, Ryan Schmidt <ryandesign at macports.org> wrote:

> Any ports that clear those variables should no longer do so. Instead they should "-delete" from them those values that they don't want there, for example "configure.ldflags-delete -L${prefix}/lib". This process could already be begun now.

This could be avoided by tracing the flags options themselves, rather than the options that change them.

> configure.cxx_stdlib is harder. We would have to put the -stdlib=... flag into configure.cxxflags by default. Then, we would have to put a variable trace on configure.cxx_stdlib so that if it is changed, the value is changed in configure.cxxflags. Additionally we have to consider the compiler: only clang can deal with libc++ so if the compiler is not a version of clang, then we shouldn't do that. We would have to have a trace on configure.cxx as well.

My implementation is a little different. It places a read trace on configure.cxxflags and configure.objcxxflags that clears preexisting -stdlib flags and adds the appropriate one if necessary.

http://trac.macports.org/changeset?new=126358%40trunk%2Fbase%2Fsrc%2Fport1.0%2Fportconfigure.tcl&old=126355%40trunk%2Fbase%2Fsrc%2Fport1.0%2Fportconfigure.tcl

I committed this accidentally, but it seemed to be working for me, so I won't revert it. Do let me know if you notice any breakage.

vq


More information about the macports-dev mailing list