port only builds with build_arch=i386 on command line -- any way to specify that in the portfile?
Ryan Schmidt
ryandesign at macports.org
Mon Sep 5 21:49:33 PDT 2016
On Sep 5, 2016, at 19:10, Fred Wright <fw at fwright.net> wrote:
>
>
>> On Sat, 3 Sep 2016, Ryan Schmidt wrote:
>>
>> But only do this if this software requires it. Otherwise, let MacPorts use its default value of -Os.
>
> Seriously? In this day and age?
>
> AIUI, Apple used to use -Os for their own builds in the PPC era, since it
> was needed to keep the bloat down to a dull roar in relation to disk
> drives at the time. But when they switched to Intel, they also switched
> to -O2. This allowed them to inflate the performance benefit of the
> architecture switch. :-)
MacPorts changed from -O2 to -Os in version 2.2.0 in 2013, well after the Intel transition, at the suggestion of Jeremy Sequoia, one of our contributors from Apple whose judgment I trust completely:
https://trac.macports.org/ticket/38218
My point in this thread was just to point out that it is *not* customary for ports to override the optimization level. They can, but should only do so if they have a good reason to. The mere presence of a particular optimization flag in a project's Makefile is not in itself a good reason; that's not sufficient evidence that the project's developer put any thought into the choice. Of course, if the Makefile says e.g. -O0, and has a comment that says the program fails to work with other optimization levels, then that would be a good reason to test further and set the same value in the Portfile.
More information about the macports-dev
mailing list