This is a patch for compatibility with MacOS X and Darwin from Apple. The atch works when applied to the CVS sources for SDCC 2.2.2 as of 08/22/2001
aly this patch with "patch -0 < sdcc_patch" from outside your sdcc root directory
Details of this patch:
OS X/Darwin can be detected through: #if defined(__APPLE__) && defined(__MACH__)
- OS X has <malloc.h> in <sys/malloc.h> ...and it requires <sys/types.h> already included somewhere...
- OS X has <endian.h> in <machine/endian.h>
- sed doesn't like the "/@target_overrides@/r"-style lines in configure - removed as they weren't being used (sdcc/support/cpp2)
- Had to change the reference from <safe-ctype.h> to "libiberty/safe-ctype.h" in sdcc/support/cpp2 - not sure why this was necessary
- changed the reference from "obstack.h" to "libiberty/obstack.h" in sdcc/support/cpp2 - not sure why this was necessary
- forced setting of HAVE_DESIGNATED_INITIALIZERS to 0 in sdcc/support/cpp2/system.h
- OS X/Darwin gcc seems to already have _G defined as a symbol - changed all references from _G to _G_
- in debugger/mcs51/cmd.c: had to removed contents of copying and warranty static strings, as compiler was choking on the embedded newlines
I haven't yet gotten the simulator to work as it requires an updated curses library and there are issues with mcs51.so that I'm still sorting out.
Log in to post a comment.