[erlang-questions] [PATCH] Fix R15B02 cross-compilation for TileraMDE-3.0.1.125620
Motiejus Jakštys
desired.mta@REDACTED
Wed Oct 10 16:08:50 CEST 2012
Applying the patch below let me cross-compile and run R15B02 on Tilera64
using TileraMDE-3.0.1.125620.
In order to prepare a clean patch, I have to know what do the options
-OPT:Olimit=0 -WOPT:lpre=off:spre=off:epre=off do on the machines that
support it? Also, what is the meaning of -MALLOC_USE_HASH(1)?
Overall, thumbs up to the OTP team for making cross compilation very easy.
:)
---
-OPT:Olimit=0 -WOPT:lpre=off:spre=off:epre=off
tile-gcc 4.4.3 does accept these options:
cc1: error: unrecognized command line option
"-WOPT:lpre=off:spre=off:epre=off"
MALLOC_USE_HASH is not defined anywhere in the mentioned build
environment.
---
erts/emulator/Makefile.in | 1 -
erts/emulator/sys/unix/sys.c | 6 ------
2 files changed, 7 deletions(-)
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
index 985ef72..644ca18 100644
--- a/erts/emulator/Makefile.in
+++ b/erts/emulator/Makefile.in
@@ -633,7 +633,6 @@ endif
ifneq ($(filter tile-%,$(TARGET)),)
$(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
diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c
index c1fa00b..4c168b6 100644
--- a/erts/emulator/sys/unix/sys.c
+++ b/erts/emulator/sys/unix/sys.c
@@ -398,12 +398,6 @@ void sys_tty_reset(int exit_code)
}
}
-#ifdef __tile__
-/* Direct malloc to spread memory around the caches of multiple tiles. */
-#include <malloc.h>
-MALLOC_USE_HASH(1);
-#endif
-
#ifdef USE_THREADS
#ifdef ERTS_THR_HAVE_SIG_FUNCS
--
1.7.9.5
More information about the erlang-questions
mailing list