[erlang-questions] Native code for Windows/MacOS?

Richard O'Keefe <>
Fri Jun 26 03:31:31 CEST 2009

On Jun 25, 2009, at 8:52 pm, Joel Reymont wrote:
>> How far away is native code for x86 Windows and/or Mac OS X?
> I made that work on Mac OSX at least a couple of years ago! See the  
> list archives.
> The solution relied on Mach code injection and could not be  
> distributed with OTP.
> It was fully working otherwise.

I found

The next thing was to visit
It wasn't immediately clear where the mach_override* files
were, but downloading a .tar file gave me something that
contained them.  However,
cc mach_override_test.c mach_override.c
_dyld_lookup_and_bind_with_hint is deprecated
_dyld_lookup_and_bind           is deprecated
/usr/include/mach-o/dyld.h declares them as
NSLookupSymbolInImage  apparently should replace them,
but I don't have the faintest idea how to do that (yet).

However, "deprecated" isn't "deleted", and the test program
reports success.  The original message says

"I hardcoded erts/emulator/Makefile.in to
  add mach_override.o to x86 OBJS.  It should of course
  be conditional.  ..."

I'm not perfectly sure what to do here.  I _think_ this means
"find the line starting HIPE_x86_OBJS= and add
  $(OBJDIR)/mach_override.o at the end".

Let's see how that goes.

PowerPC-specific code.

More information about the erlang-questions mailing list