Why -O and -g in universal variants?
Vincent Lefevre
vincent-opdarw at vinc17.org
Sun Feb 25 17:35:48 PST 2007
On 2007-02-25 11:12:48 -0500, Salvatore Domenick Desiano wrote:
> Peering into the minds of Apple's documentation writers (I know, my
> eyes will be burned), there may be a reason for this. -O turns on
> optimization. The default is -O0 (no optimization), and there are
> libraries that actually fail when built that way. The compiler is
> designed and tested mostly at -O1, so Apple may know something we
> don't.
Do you mean that -O2 (which normally produces faster and smaller code)
should not be used?
> As for -g, Tiger has debugging facilities that send information to
> Apple, and I could see this as providing hooks for Apple fetching
> that information.
This is not specific to Apple. -g allows the compiler to produce
debugging information. Such information is useful in bug reports
when a program crashes and a backtrace is included in the report.
But it takes more disk space. Similarly, one may choose to strip
binaries or not. IMHO, the choice to do that or not should be a
global option. Therefore those who have plenty of disk space could
choose to keep debugging information (in case a program crashes),
and those who are short of disk space could choose to remove them.
--
Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
More information about the macports-dev
mailing list