upgrade erlang to 24.1.2 (#7738)
This commit is contained in:
parent
36d015371d
commit
7c1cd8a9d6
@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.erlang.org/
|
|||||||
TERMUX_PKG_DESCRIPTION="General-purpose concurrent functional programming language"
|
TERMUX_PKG_DESCRIPTION="General-purpose concurrent functional programming language"
|
||||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||||
TERMUX_PKG_MAINTAINER="@termux"
|
TERMUX_PKG_MAINTAINER="@termux"
|
||||||
TERMUX_PKG_VERSION=22.3.4.22
|
TERMUX_PKG_VERSION=24.1.2
|
||||||
TERMUX_PKG_SRCURL=https://github.com/erlang/otp/archive/OTP-$TERMUX_PKG_VERSION.tar.gz
|
TERMUX_PKG_SRCURL=https://github.com/erlang/otp/archive/OTP-$TERMUX_PKG_VERSION.tar.gz
|
||||||
TERMUX_PKG_SHA256=dd306ac9987bbe80b20bf1efc8f94b7d6c0248c9fcb2dc761580c2c28d06cfba
|
TERMUX_PKG_SHA256=c141a046bb7184a7bb5c3d6da2ed013e465d1fbe4ff5cd16e0fbb7a0e786a152
|
||||||
TERMUX_PKG_AUTO_UPDATE=true
|
TERMUX_PKG_AUTO_UPDATE=true
|
||||||
TERMUX_PKG_AUTO_UPDATE_TAG_REGEXP="\d+(\.\d+)+"
|
TERMUX_PKG_AUTO_UPDATE_TAG_REGEXP="\d+(\.\d+)+"
|
||||||
TERMUX_PKG_DEPENDS="openssl, ncurses, zlib"
|
TERMUX_PKG_DEPENDS="openssl, ncurses, zlib"
|
||||||
@ -12,26 +12,21 @@ TERMUX_PKG_NO_STATICSPLIT=true
|
|||||||
TERMUX_PKG_HOSTBUILD=true
|
TERMUX_PKG_HOSTBUILD=true
|
||||||
TERMUX_PKG_BUILD_IN_SRC=true
|
TERMUX_PKG_BUILD_IN_SRC=true
|
||||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-javac --with-ssl=${TERMUX_PREFIX} --with-termcap"
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-javac --with-ssl=${TERMUX_PREFIX} --with-termcap"
|
||||||
TERMUX_PKG_EXTRA_MAKE_ARGS="noboot"
|
|
||||||
|
|
||||||
termux_step_post_get_source() {
|
termux_step_post_get_source() {
|
||||||
# We need a host build every time:
|
# We need a host build every time, because we dont know the full output of host build and have no idea to cache it.
|
||||||
rm -Rf "$TERMUX_PKG_HOSTBUILD_DIR"
|
rm -Rf "$TERMUX_PKG_HOSTBUILD_DIR"
|
||||||
./otp_build autoconf
|
|
||||||
}
|
}
|
||||||
|
|
||||||
termux_step_host_build() {
|
termux_step_host_build() {
|
||||||
cd $TERMUX_PKG_SRCDIR
|
cd $TERMUX_PKG_BUILDDIR
|
||||||
./configure --enable-bootstrap-only
|
# Erlang cross compile reference: https://github.com/erlang/otp/blob/master/HOWTO/INSTALL-CROSS.md#building-a-bootstrap-system
|
||||||
make -j "$TERMUX_MAKE_PROCESSES"
|
# Build erlang bootstrap system.
|
||||||
|
./configure --enable-bootstrap-only --without-javac --without-ssl --without-termcap
|
||||||
|
make -j $TERMUX_MAKE_PROCESSES
|
||||||
}
|
}
|
||||||
|
|
||||||
termux_step_pre_configure() {
|
termux_step_pre_configure() {
|
||||||
(cd erts && autoreconf)
|
# Add --build flag for erlang cross build
|
||||||
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --build=$(./erts/autoconf/config.guess)"
|
||||||
# liblog is needed for syslog usage:
|
}
|
||||||
LDFLAGS+=" -llog"
|
|
||||||
# Put binaries built in termux_step_host_build at start of PATH:
|
|
||||||
cp bin/*/* $TERMUX_PKG_SRCDIR/bootstrap/bin
|
|
||||||
export PATH="$TERMUX_PKG_SRCDIR/bootstrap/bin:$PATH"
|
|
||||||
}
|
|
60
packages/erlang/emulator-asmjit-virtmem-shm.patch
Normal file
60
packages/erlang/emulator-asmjit-virtmem-shm.patch
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
diff --git a/erts/emulator/asmjit/core/virtmem.cpp b/erts/emulator/asmjit/core/virtmem.cpp
|
||||||
|
index a1b0f95..d1eb1ad 100644
|
||||||
|
--- a/erts/emulator/asmjit/core/virtmem.cpp
|
||||||
|
+++ b/erts/emulator/asmjit/core/virtmem.cpp
|
||||||
|
@@ -62,12 +62,18 @@
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
|
-#if defined(__APPLE__)
|
||||||
|
+#if defined(__APPLE__) || defined(__ANDROID__)
|
||||||
|
#define ASMJIT_VM_SHM_DETECT 0
|
||||||
|
#else
|
||||||
|
#define ASMJIT_VM_SHM_DETECT 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#if defined(__ANDROID__)
|
||||||
|
+ #define ASMJIT_VM_SHM_AVAILABLE 0
|
||||||
|
+#else
|
||||||
|
+ #define ASMJIT_VM_SHM_AVAILABLE 1
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
ASMJIT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
@@ -258,8 +264,10 @@ public:
|
||||||
|
|
||||||
|
if (type == kFileTypeTmp)
|
||||||
|
return unlink(tmpName.data());
|
||||||
|
+#if ASMJIT_VM_SHM_AVAILABLE
|
||||||
|
else if (type == kFileTypeShm)
|
||||||
|
return shm_unlink(tmpName.data());
|
||||||
|
+#endif
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
@@ -388,7 +396,7 @@ static ASMJIT_INLINE int VirtMem_appleSpecificMMapFlags(uint32_t flags) noexcept
|
||||||
|
#if !defined(SHM_ANON)
|
||||||
|
static const char* VirtMem_getTmpDir() noexcept {
|
||||||
|
const char* tmpDir = getenv("TMPDIR");
|
||||||
|
- return tmpDir ? tmpDir : "/tmp";
|
||||||
|
+ return tmpDir ? tmpDir : "@TERMUX_PREFIX@/tmp";
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -448,6 +456,7 @@ static Error VirtMem_openAnonymousMemory(AnonymousMemory* anonMem, bool preferTm
|
||||||
|
return kErrorOk;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#if ASMJIT_VM_SHM_AVAILABLE
|
||||||
|
else {
|
||||||
|
anonMem->tmpName.assignFormat(kShmFormat, (unsigned long long)bits);
|
||||||
|
anonMem->fd = shm_open(anonMem->tmpName.data(), O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
|
||||||
|
@@ -456,6 +465,7 @@ static Error VirtMem_openAnonymousMemory(AnonymousMemory* anonMem, bool preferTm
|
||||||
|
return kErrorOk;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
int e = errno;
|
||||||
|
if (e != EEXIST)
|
@ -1,45 +1,85 @@
|
|||||||
Based on the below change, updated for erlang 21:
|
diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in
|
||||||
|
index c3449c5..7fb2a20 100644
|
||||||
From 85a3e5b4f65e5284e59dcdd90e92ea7d50ef6907 Mon Sep 17 00:00:00 2001
|
--- a/erts/emulator/Makefile.in
|
||||||
From: Romain Naour <romain.naour@openwide.fr>
|
+++ b/erts/emulator/Makefile.in
|
||||||
Date: Sun, 8 Feb 2015 17:23:13 +0100
|
@@ -800,28 +800,28 @@ endif
|
||||||
Subject: [PATCH] erts/emulator: reorder inclued headers paths
|
|
||||||
|
|
||||||
If the Perl Compatible Regular Expressions is installed on the
|
|
||||||
host and the path to the headers is added to the CFLAGS, the
|
|
||||||
pcre.h from the host is used instead of the one provided by
|
|
||||||
erlang.
|
|
||||||
|
|
||||||
Erlang use an old version of this file which is incompatible
|
|
||||||
with the upstream one.
|
|
||||||
|
|
||||||
Move INCLUDES before CFLAGS to use pcre.h from erlang.
|
|
||||||
|
|
||||||
http://autobuild.buildroot.net/results/cbd/cbd8b54eef535f19d7d400fd269af1b3571d6143/build-end.log
|
|
||||||
|
|
||||||
Signed-off-by: Romain Naour <romain.naour@openwide.fr>
|
|
||||||
---
|
|
||||||
erts/emulator/Makefile.in | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff -u -r ../otp-OTP-21.0.1/erts/emulator/Makefile.in ./erts/emulator/Makefile.in
|
|
||||||
--- ../otp-OTP-21.0.1/erts/emulator/Makefile.in 2018-06-25 13:19:47.000000000 +0200
|
|
||||||
+++ ./erts/emulator/Makefile.in 2018-07-01 18:06:51.931989663 +0200
|
|
||||||
@@ -712,7 +712,7 @@
|
|
||||||
# Usually the same as the default rule, but certain platforms (e.g. win32) mix
|
# Usually the same as the default rule, but certain platforms (e.g. win32) mix
|
||||||
# different compilers
|
# different compilers
|
||||||
$(OBJDIR)/beam_emu.o: beam/beam_emu.c
|
$(OBJDIR)/beam_emu.o: beam/emu/beam_emu.c
|
||||||
- $(V_EMU_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
- $(V_EMU_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
+ $(V_EMU_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
+ $(V_EMU_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
$(OBJDIR)/beam_emu.S: beam/beam_emu.c
|
$(OBJDIR)/beam_emu.S: beam/emu/beam_emu.c
|
||||||
$(V_EMU_CC) -S -fverbose-asm $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
- $(V_EMU_CC) -S -fverbose-asm $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
@@ -765,7 +765,7 @@
|
+ $(V_EMU_CC) -S -fverbose-asm $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%_pg.o: beam/%.c
|
||||||
|
- $(V_CC) $(PROFILE_GENERATE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) $(PROFILE_GENERATE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%_pg.o: beam/emu/%.c
|
||||||
|
- $(V_CC) $(PROFILE_GENERATE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) $(PROFILE_GENERATE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%_pu.o: beam/%.c $(PROFILE_USE_DEPS)
|
||||||
|
- $(V_CC) $(PROFILE_USE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) $(PROFILE_USE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%_pu.o: beam/emu/%.c $(PROFILE_USE_DEPS)
|
||||||
|
- $(V_CC) $(PROFILE_USE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) $(PROFILE_USE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%_pu.S: beam/%.c $(PROFILE_USE_DEPS)
|
||||||
|
- $(V_CC) -S -fverbose-asm $(PROFILE_USE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) -S -fverbose-asm $(PROFILE_USE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%_pu.S: beam/emu/%.c $(PROFILE_USE_DEPS)
|
||||||
|
- $(V_CC) -S -fverbose-asm $(PROFILE_USE) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) -S -fverbose-asm $(PROFILE_USE) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/PROFILE: $(BINDIR)/$(PROFILE_EXECUTABLE)
|
||||||
|
$(V_at)echo " PROFILE ${PROFILE_EXECUTABLE}"
|
||||||
|
@@ -847,7 +847,7 @@ ifeq ($(ERTS_BUILD_FALLBACK_POLL),yes)
|
||||||
|
# Have to treat erl_poll differently as the same .c file is used
|
||||||
|
# twice for kernel poll builds.
|
||||||
|
$(OBJDIR)/erl_poll.o: sys/common/erl_poll.c
|
||||||
|
- $(V_CC) -DERTS_KERNEL_POLL_VERSION $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) -DERTS_KERNEL_POLL_VERSION $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
# Do a copy in order to make debuggers less confused
|
||||||
|
$(TTF_DIR)/erl_poll.flbk.c: sys/common/erl_poll.c
|
||||||
|
@@ -855,7 +855,7 @@ $(TTF_DIR)/erl_poll.flbk.c: sys/common/erl_poll.c
|
||||||
|
@touch $@
|
||||||
|
|
||||||
|
$(OBJDIR)/erl_poll.flbk.o: $(TTF_DIR)/erl_poll.flbk.c
|
||||||
|
- $(V_CC) -DERTS_NO_KERNEL_POLL_VERSION $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) -DERTS_NO_KERNEL_POLL_VERSION $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
@@ -863,13 +863,13 @@ endif
|
||||||
# General targets
|
# General targets
|
||||||
#
|
#
|
||||||
$(OBJDIR)/%.o: beam/%.c
|
$(OBJDIR)/%.o: beam/%.c
|
||||||
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%.o: beam/emu/%.c
|
||||||
|
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%.o: beam/jit/%.c
|
||||||
|
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
$(OBJDIR)/%.o: $(TARGET)/%.c
|
$(OBJDIR)/%.o: $(TARGET)/%.c
|
||||||
$(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@
|
$(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@
|
||||||
|
@@ -881,7 +881,7 @@ $(OBJDIR)/%.o: sys/$(ERLANG_OSTYPE)/%.c
|
||||||
|
$(V_CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%.o: sys/common/%.c
|
||||||
|
- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@
|
||||||
|
+ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@
|
||||||
|
|
||||||
|
$(OBJDIR)/%.o: drivers/common/%.c
|
||||||
|
$(V_CC) $(CFLAGS) -DLIBSCTP=$(LIBSCTP) $(INCLUDES) -Idrivers/common -Idrivers/$(ERLANG_OSTYPE) -c $< -o $@
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl
|
diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl
|
||||||
index 29a26674ba..e6ab453a70 100644
|
index 96b5da9..e166e89 100644
|
||||||
--- a/lib/kernel/src/os.erl
|
--- a/lib/kernel/src/os.erl
|
||||||
+++ b/lib/kernel/src/os.erl
|
+++ b/lib/kernel/src/os.erl
|
||||||
@@ -294,7 +294,7 @@ mk_cmd({win32,Wtype}, Cmd) ->
|
@@ -313,7 +313,7 @@ mk_cmd(_,Cmd) ->
|
||||||
mk_cmd(_,Cmd) ->
|
%% We use an absolute path here because we do not want the path to be
|
||||||
%% Have to send command in like this in order to make sh commands like
|
%% searched in case a stale NFS handle is somewhere in the path before
|
||||||
%% cd and ulimit available
|
%% the sh command.
|
||||||
- {"/bin/sh -s unix:cmd", [out],
|
- {"/bin/sh -s unix:cmd", [out],
|
||||||
+ {"@TERMUX_PREFIX@/bin/sh -s unix:cmd", [out],
|
+ {"@TERMUX_PREFIX@/bin/sh -s unix:cmd", [out],
|
||||||
%% We insert a new line after the command, in case the command
|
%% We insert a new line after the command, in case the command
|
||||||
|
Loading…
Reference in New Issue
Block a user