erlang: fix host build when pcre/host is installed

OpenWrt added pcre/host recently. When it is available (installed)
erlang finds staging_dir/hostpkg/include/pcre.h before it finds its own
copy and the build fails.

 CC	obj/x86_64-pc-linux-gnu/opt/smp/erl_bif_chksum.o
 CC	obj/x86_64-pc-linux-gnu/opt/smp/erl_bif_re.o
beam/erl_bif_re.c: In function 'erts_init_bif_re':
beam/erl_bif_re.c:96:5: error: 'erts_pcre_malloc' undeclared (first use in this function)
     erts_pcre_malloc = &erts_erts_pcre_malloc;
     ^~~~~~~~~~~~~~~~
beam/erl_bif_re.c:96:5: note: each undeclared identifier is reported only once for each function it appears in
beam/erl_bif_re.c:97:5: error: 'erts_pcre_free' undeclared (first use in this function)
     erts_pcre_free = &erts_erts_pcre_free;
     ^~~~~~~~~~~~~~

This adds a patch from Romain Naour and Bernd Kuhls to prevent that.
Patch snatched from buildroot [1].

[1] https://github.com/buildroot/buildroot/blob/master/package/erlang/0002-erts-emulator-reorder-inclued-headers-paths.patch

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper
2020-09-01 23:14:58 +02:00
parent 8966849a5a
commit 49ad98ce60
2 changed files with 47 additions and 1 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=erlang
PKG_VERSION:=23.0
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=otp_src_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:= http://www.erlang.org/download/