0002-erts-emulator-reorder-inclued-headers-paths.patch 1.8 KB

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