1From 85a3e5b4f65e5284e59dcdd90e92ea7d50ef6907 Mon Sep 17 00:00:00 2001 2From: Romain Naour <romain.naour@openwide.fr> 3Date: Sun, 8 Feb 2015 17:23:13 +0100 4Subject: [PATCH] erts/emulator: reorder inclued headers paths 5 6If the Perl Compatible Regular Expressions is installed on the 7host and the path to the headers is added to the CFLAGS, the 8pcre.h from the host is used instead of the one provided by 9erlang. 10 11Erlang use an old version of this file which is incompatible 12with the upstream one. 13 14Move INCLUDES before CFLAGS to use pcre.h from erlang. 15 16http://autobuild.buildroot.net/results/cbd/cbd8b54eef535f19d7d400fd269af1b3571d6143/build-end.log 17 18Signed-off-by: Romain Naour <romain.naour@openwide.fr> 19[Bernd: rebased for erlang-21.0] 20Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> 21--- 22 erts/emulator/Makefile.in | 4 ++-- 23 1 file changed, 2 insertions(+), 2 deletions(-) 24 25diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in 26index 7145824..d079487 100644 27--- a/erts/emulator/Makefile.in 28+++ b/erts/emulator/Makefile.in 29@@ -712,7 +712,7 @@ 30 # Usually the same as the default rule, but certain platforms (e.g. win32) mix 31 # different compilers 32 $(OBJDIR)/beam_emu.o: beam/beam_emu.c 33- $(V_EMU_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ 34+ $(V_EMU_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ 35 36 $(OBJDIR)/beam_emu.S: beam/beam_emu.c 37 $(V_EMU_CC) -S -fverbose-asm $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ 38@@ -765,7 +765,7 @@ 39 # General targets 40 # 41 $(OBJDIR)/%.o: beam/%.c 42- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ 43+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ 44 45 $(OBJDIR)/%.o: $(TARGET)/%.c 46 $(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ 47