On Jul 22, 2013, at 11:58, Vincent Habchi wrote:

> Le 22 juil. 2013 à 14:52, Ryan Schmidt a écrit :
> 
>> Possibly you should set "configure.optflags -O3 -march=native" instead of 
>> dealing with cflags and cxxflags directly.
> 
> I found that setting configure.cflags and cxxflags does not seem to interfere 
> with the other options. But if you say there is a more suitable way to set 
> them, I’ll abide by your advice.

The default for configure.optflags is -Os in MacPorts 2.2 and was -O2 
previously.
The default for configure.cflags, configure.cxxflags, configure.objcflags, 
configure.objcxxflags, configure.fflags, configure.f90flags, and 
configure.fcflags is ${configure.optflags}.
Furthermore, if configure.pipe is true, "-pipe" is prepended to these. This 
setting can be influenced from macports.conf via the configurepipe setting. The 
default used to be false, but was changed to true in r59582 in 2009.
So since it is your intention to change the optimization flags, you should set 
configure.optflags, and not assume the user has configurepipe set to true.


>> Or possibly users who want performance should edit this and the compiler 
>> choice into macports.conf directly. However they would also have to disable 
>> the use of the precompiled binaries otherwise they would, without warning, 
>> receive a binary that was not compiled with those flags. So I could 
>> understand if we don't think that's the best solution.
> 
> Exactly. The idea I had is that the users that want their ports to be 
> compiled and optimized for their machine should add the +perf variant in 
> variants.conf. Since +perf is never enabled by default, this would never 
> result in the fetching of the pre-compiled binaries. What do you think?

I think that's true. I just wanted to avoid using variants for something if we 
already handle it at the MacPorts base level. But maybe we don't completely 
handle it there.

I *thought* we already had a setting in macports.conf for overriding 
configure.optflags, but I cannot find it described in macports.conf.default. 
Maybe I was imagining that.

I know we have a setting in macports.conf for overriding configure.compiler but 
that we deliberately do not advertise it because it's not something we wanted 
users to get into the habit of doing.

If we have settings for overriding configure.optflags and configure.compiler, 
then maybe doing so should automatically disable the use of binaries.


_______________________________________________
macports-dev mailing list
[email protected]
https://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to