[cfe-dev] Compiling emacs on Mac OS X

Mike Stump mrs at apple.com
Wed Dec 9 10:40:56 PST 2009

On Dec 9, 2009, at 9:22 AM, Filipe Cabecinhas wrote:
> clang on Mac OS X, compiling the console or the Cocoa version always creates a defective temacs (something akin to a "stage 1 emacs"), which always blows up with a Bus Error.

I suspect track these sorts of problems down by having two build trees, one with clang and one with gcc.  You can then copy *.o from gcc into the clang tree, finish building temacs, and then verify it works, if it works, you can then start binary stepping half of the .o files over and so on, until you whittle it down to a single (or a group) of .o files, that must be replaced by the files from gcc, inorder for temacs to work.  Usually, this process results in a single file.  That .ii is then the testcase.  Harder is to describe what about the file is bad.  To do that, I'd normally split the file into two bits, one compiled with clang and one compiled with gcc.  Again, binary search that code for the code that much be compiled by gcc for temacs to work, then, that cut down bit is the final testcase.

More information about the cfe-dev mailing list