[108385] trunk/dports/gis/gdal/Portfile

Landon Fuller landonf at macports.org
Tue Jul 30 14:33:47 PDT 2013


On Jul 30, 2013, at 14:31, Ryan Schmidt <ryandesign at macports.org> wrote:

> 
> On Jul 30, 2013, at 09:49, Landon J Fuller wrote:
> 
>> Without actually measuring the gains, there's no guarantee that these changes will actually improve performance, and in moving away from the optimization flags et al selected by the original developers, could very possibly trigger bugs in code generation output (e.g., compiler bugs, especially with bleeding-edge clang), or reveal bugs in the project that aren't apparent at lower optimization levels.
> 
> All ports in MacPorts already move away from the optimization flags selected by the original developers. MacPorts 2.2 sets optflags to -Os, to match what Apple uses to compile the software distributed with OS X; previous versions of MacPorts set optflags to -O2. Most ports don't care what optimization flags are used and respect the values MacPorts provides. Some ports do care and their build systems (or in some cases their portfiles) override what MacPorts sets.

-Os is a much safer default in that its widely tested and a reasonable conservative choice. All Xcode projects default to -Os, and as you noted,  Apple ships most of their code compiled with -Os. The setting is also less aggressive than -O2, and unlikely to result in any surprises for the original developers.

-landonf


More information about the macports-dev mailing list