On Sun, Apr 26, 2009 at 1:35 PM, Rick Altherr <kc8...@kc8apf.net> wrote: > On Apr 26, 2009, at 1:06 AM, Albert Cahalan wrote:
>> As you noticed, weird things can happen. :-( >> >> For MacOS, don't define anything to indicate >> BSD or POSIX source. That would break stuff. > > Actually since MacOS X is both POSIX-compliant and > FreeBSD-based, both work perfectly fine. You haven't needed anything much then. :-) Defining that sort of stuff on MacOS X will remove things from the namespace. To get it back you need something like APPLE_C_SOURCE. (that might not be spelled quite right) >> -Wl,-warn-common (warn about UNIX-only C feature) > > This will pass -warn-common to the linker. On MacOS X, the linker uses > -warn_commons. > >> -fno-common (block that UNIX-only C feature) One way or another, this needless "feature" is good to block. It kills portability. >> If not debugging: >> >> -s (make executable file smaller) > > Strips all symbol and relocation information. Depending on the tools, this > can make debugging or profiling much more challenging. And thus "If not debugging". You can default to using this. Developers chasing bugs would compile differently. >> -fomit-frame-pointer (make code smaller and faster) > > Also makes profiling nearly impossible without unwinding information. That > is included with DWARF, but not STABs. Even with DWARF, not all tools can > use it (see kernel-based profilers). And thus "If not debugging". You can default to using this. Developers chasing bugs would compile differently. _______________________________________________ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development