<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Michael,<div class=""><br class=""></div><div class="">Thanks for your clarifications, it was indeed helpful. I had a second look at these issues in the past few days, and I still have some issues in trying to be able to arbitrarily set the compiler. The compiler is respected in the sense that it will be correctly set, but the build may very well fail.</div><div class=""><br class=""></div><div class="">It seems to me that the issue in fact comes from higher up, in the qt4 settings, as I encountered similar issues when checking some ports which were purely relying on qt4 PG too.</div><div class="">In particular, it seems to me that the ‘macx-g++’ template is used in qt4 PG, which sets for instance:</div><div class="">set qt_qmake_spec       macx-g++</div><div class=""><br class=""></div><div class="">The template will set several variables assuming clang as being the compiler (such as Xarg arguments) regardless of settings defined by Macports. Furthermore, even removing these settings seems to not fully remove the use of these templates, as they are still called when calling moc after qmake.</div><div class="">I could not find yet where these settings are predefined, as it does not seem to me that they are set at configure stage. At least I could not find them.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class=""><br class=""></div><div class="">Nicolas</div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul2, 2017, at 4:44, Michael Dickens <<a href="mailto:michaelld@macports.org" class="">michaelld@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">


<title class=""></title>

<div class=""><div style="font-family:Arial;" class="">Hi Nicolas - qmake by itself will not "do the right thing", as you note, for pretty much any 'port' setting (CC, CXX, *FLAGS).<br class=""></div>
<div style="font-family:Arial;" class=""><br class=""></div>
<div style="font-family:Arial;" class="">If you use the qmake 1.0 PortGroup, then qmake should "do the right thing". If you're using this PG & qmake is still not doing the right thing, then the issue is likely the 'Makefile' or 'configure' script interface.<br class=""></div>
<div style="font-family:Arial;" class=""><br class=""></div>
<div style="font-family:Arial;" class="">Hope this helps! - MLD<br class=""><br class=""></div>
<div class="">On Sat, Jul 1, 2017, at 08:07 AM, Nicolas Pavillon wrote:<br class=""></div>
<blockquote type="cite" class=""><div style="font-family:Arial;" class="">While trying to solve an issue where one of my ports does not respect the compiler choice (ticket #<span class="font" style="font-family:"Helvetica Neue""><span style="" class="">54372, thanks Ryan for pointing that out), I realised that qmake seems </span><span class="colour" style="color:rgb(0, 0, 133)">to</span><span style="" class=""> not be respecting the choice of compiler in any case. </span></span><br class=""></div>
<div class=""><span class="font" style="font-family:"Helvetica Neue""><span style="" class="">On Mac, qmake uses by default the '</span></span><span class="colour" style="color:rgb(0, 0, 133)"><span class="font" style="font-family:"Helvetica Neue"">macx-g++’ configuration, which sets everything to use clang, regardless of the choice of compiler, including flags such as Xarch which are not compatible with gcc. I could reproduce that problem with both mine and other ports.</span></span><br class=""></div>
<div class=""><span class="colour" style="color:rgb(0, 0, 133)"><span class="font" style="font-family:"Helvetica Neue"">I noticed that qmake also has config files for instance for gcc 4.2 (macx-g++42) or llvm (macx-llvm), but I did not yet confirm if those could be used. </span></span><br class=""></div>
<div class=""><span class="colour" style="color:rgb(0, 0, 133)"><span class="font" style="font-family:"Helvetica Neue""></span></span><br class=""></div>
<div class=""><span class="colour" style="color:rgb(0, 0, 133)"><span class="font" style="font-family:"Helvetica Neue"">I assume that the PortGroup would have to be modified to properly choose the config file depending on the chosen compiler (which I could try to implement), but I wanted to check first if someone already solved that issue, or if I am missing something obvious.</span></span><br class=""></div>
</blockquote><div style="font-family:Arial;" class=""><br class=""></div>
</div>

</div></blockquote></div><br class=""></div></body></html>