diff options
author | Björn Gustavsson <[email protected]> | 2011-08-30 17:01:14 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-09-20 14:02:45 +0200 |
commit | dd24ca1cb76de9973220fed356540f190a05ac83 (patch) | |
tree | 7171c03de6e57d2de3fa3f72e7a820a78f73a42e /erts/emulator | |
parent | e84f232326b2800ca806c867b2bfbe3652d423cb (diff) | |
download | otp-dd24ca1cb76de9973220fed356540f190a05ac83.tar.gz otp-dd24ca1cb76de9973220fed356540f190a05ac83.tar.bz2 otp-dd24ca1cb76de9973220fed356540f190a05ac83.zip |
Fix build problems on MacOS 10.7 (Lion)
On MacOS 10.7 (Lion) with Xcode 4.1 installed, the default
C compiler is llvm-gcc-4.2. That compiler compiles beam_emu.c
incorrectly, resulting in an emulator that will not start.
The problem can be worked around by turning off all optimizations,
but that will significantly degrade the performance of the run-time
system. The problem can also be worked around manually like this:
CC=gcc-4.2 ./configure
To allow a working system to be built "out of the box", have
the configure script set up the emulator Makefile so that gcc-4.2
will be used to compile beam_emu.c if the default compiler is
llvm-based. All other C files will still be compiled with the
default compiler.
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/Makefile.in | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in index b658e79378..620402fbfb 100644 --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in @@ -598,11 +598,6 @@ INCLUDES += -I$(ERL_TOP)/erts/etc/vxworks endif ifeq ($(TARGET),win32) -# Usually the same as the default rule, but certain platforms (i.e. win32) mix -# different compilers -$(OBJDIR)/beam_emu.o: beam/beam_emu.c - $(EMU_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ - $(OBJDIR)/dll_sys.o: sys/$(ERLANG_OSTYPE)/sys.c $(CC) $(CFLAGS) -DERL_RUN_SHARED_LIB=1 $(INCLUDES) -c $< -o $@ @@ -616,6 +611,11 @@ $(OBJDIR)/beam_emu.o: beam/beam_emu.c $(CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) \ -OPT:Olimit=0 -WOPT:lpre=off:spre=off:epre=off \ $(INCLUDES) -c $< -o $@ +else +# Usually the same as the default rule, but certain platforms (e.g. win32) mix +# different compilers +$(OBJDIR)/beam_emu.o: beam/beam_emu.c + $(EMU_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ endif |