This commit is contained in:
TriForceX
2021-03-13 22:13:38 -03:00
parent c77595adbd
commit b3ecc6e32d
7043 changed files with 119377 additions and 73694 deletions

View File

@@ -1,42 +0,0 @@
From 011752ec7b31e3dde376270fc65c7ee70644f6e7 Mon Sep 17 00:00:00 2001
From: Johan Oudinet <johan.oudinet@gmail.com>
Date: Wed, 6 Dec 2017 15:01:17 +0100
Subject: [PATCH] Link with LDLIBS instead of LIBS for DED
Fix ERL-529 by avoiding to link with libz for no reason.
Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
lib/asn1/c_src/Makefile | 2 +-
lib/runtime_tools/c_src/Makefile.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
index 1f714df357..f7c6b8b9bc 100644
--- a/lib/asn1/c_src/Makefile
+++ b/lib/asn1/c_src/Makefile
@@ -126,7 +126,7 @@ $(NIF_LIB_FILE): $(NIF_STATIC_OBJ_FILES)
$(V_RANLIB) $@
$(NIF_SHARED_OBJ_FILE): $(NIF_OBJ_FILES)
- $(V_LD) $(LDFLAGS) -o $(NIF_SHARED_OBJ_FILE) $(NIF_OBJ_FILES) $(CLIB_FLAGS) $(LIBS)
+ $(V_LD) $(LDFLAGS) -o $(NIF_SHARED_OBJ_FILE) $(NIF_OBJ_FILES) $(CLIB_FLAGS) $(LDLIBS)
# ----------------------------------------------------
# Release Target
diff --git a/lib/runtime_tools/c_src/Makefile.in b/lib/runtime_tools/c_src/Makefile.in
index 4530a83aee..4e13e0d789 100644
--- a/lib/runtime_tools/c_src/Makefile.in
+++ b/lib/runtime_tools/c_src/Makefile.in
@@ -95,7 +95,7 @@ $(OBJDIR)/%$(TYPEMARKER).o: %.c dyntrace_lttng.h
$(V_CC) -c -o $@ $(ALL_CFLAGS) $<
$(LIBDIR)/%$(TYPEMARKER).@DED_EXT@: $(OBJDIR)/%$(TYPEMARKER).o
- $(V_LD) $(LDFLAGS) -o $@ $^ $(LIBS)
+ $(V_LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)
clean:
rm -f $(TRACE_LIBS)
--
2.14.1

View File

@@ -0,0 +1,54 @@
From de870d7f9f36b3e68f280057851a4585a67ab219 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <slyfox@gentoo.org>
Date: Tue, 14 Jan 2020 23:15:01 +0000
Subject: [PATCH] ei_portio.h: avoid ODR violation of
'ei_default_socket_callbacks'
Noticed as a build failure against fresh gcc-master:
```
LD otp/lib/erl_interface/bin/x86_64-unknown-linux-gnu/erl_call
ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(eirecv.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(send.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(send_reg.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(epmd_port.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
ld: otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_portio.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: multiple definition of `ei_default_socket_callbacks'; otp/lib/erl_interface/obj/x86_64-unknown-linux-gnu/libei.a(ei_connect.o):otp/lib/erl_interface/src/misc/ei_portio.h:50: first defined here
collect2: error: ld returned 1 exit status
make[3]: *** [x86_64-unknown-linux-gnu/Makefile:669: otp/lib/erl_interface/bin/x86_64-unknown-linux-gnu/erl_call] Error 1
```
The failure looks legitimate: `ei_default_socket_callbacks` is a
struct defined in 'ei_portio.h' and in 'ei_portio.c'.
The change flips 'ei_portio.h' definition to declaration.
gcc-10 will change the default from -fcommon to fno-common:
https://gcc.gnu.org/PR85678.
The error also happens if CFLAGS=-fno-common passed explicitly.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Patch taken from upstream: https://github.com/erlang/otp/commit/de870d7f9f36b3e68f280057851a4585a67ab219
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
lib/erl_interface/src/misc/ei_portio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/erl_interface/src/misc/ei_portio.h b/lib/erl_interface/src/misc/ei_portio.h
index 84ebc5039a..5172d085b4 100644
--- a/lib/erl_interface/src/misc/ei_portio.h
+++ b/lib/erl_interface/src/misc/ei_portio.h
@@ -47,7 +47,7 @@ int ei_writev_fill_ctx_t__(ei_socket_callbacks *cbs, void *ctx, const struct iov
int ei_socket_callbacks_have_writev__(ei_socket_callbacks *cbs);
#endif
-ei_socket_callbacks ei_default_socket_callbacks;
+extern ei_socket_callbacks ei_default_socket_callbacks;
#define EI_FD_AS_CTX__(FD) \
((void *) (long) (FD))
--
2.20.1

View File

@@ -1,4 +1,4 @@
# md5 from http://www.erlang.org/download/MD5, sha256 locally computed
md5 350988f024f88e9839c3715b35e7e27a otp_src_21.0.tar.gz
sha256 c7d247c0cad2d2e718eaca2e2dff051136a1347a92097abf19ebf65ea2870131 otp_src_21.0.tar.gz
md5 b2b48dad6e69c1e882843edbf2abcfd3 otp_src_22.2.tar.gz
sha256 89c2480cdac566065577c82704a48e10f89cf2e6ca5ab99e1cf80027784c678f otp_src_22.2.tar.gz
sha256 809fa1ed21450f59827d1e9aec720bbc4b687434fa22283c6cb5dd82a47ab9c0 LICENSE.txt

View File

@@ -5,7 +5,7 @@
################################################################################
# See note below when updating Erlang
ERLANG_VERSION = 21.0
ERLANG_VERSION = 22.2
ERLANG_SITE = http://www.erlang.org/download
ERLANG_SOURCE = otp_src_$(ERLANG_VERSION).tar.gz
ERLANG_DEPENDENCIES = host-erlang
@@ -14,12 +14,25 @@ ERLANG_LICENSE = Apache-2.0
ERLANG_LICENSE_FILES = LICENSE.txt
ERLANG_INSTALL_STAGING = YES
# Remove the leftover deps directory from the ssl app
# See https://bugs.erlang.org/browse/ERL-1168
define ERLANG_REMOVE_SSL_DEPS
rm -rf $(@D)/lib/ssl/src/deps
endef
ERLANG_POST_PATCH_HOOKS += ERLANG_REMOVE_SSL_DEPS
# Patched erts/aclocal.m4
ERLANG_AUTORECONF = YES
define ERLANG_RUN_AUTOCONF
cd $(@D) && PATH=$(BR_PATH) ./otp_build autoconf
endef
ERLANG_DEPENDENCIES += host-autoconf
ERLANG_PRE_CONFIGURE_HOOKS += ERLANG_RUN_AUTOCONF
HOST_ERLANG_DEPENDENCIES += host-autoconf
HOST_ERLANG_PRE_CONFIGURE_HOOKS += ERLANG_RUN_AUTOCONF
# Whenever updating Erlang, this value should be updated as well, to the
# value of EI_VSN in the file lib/erl_interface/vsn.mk
ERLANG_EI_VSN = 3.10.3
ERLANG_EI_VSN = 3.13.1
# The configure checks for these functions fail incorrectly
ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes
@@ -38,7 +51,7 @@ HOST_ERLANG_CONF_ENV += ERL_TOP=$(@D)
# erlang uses openssl for all things crypto. Since the host tools (such as
# rebar) uses crypto, we need to build host-erlang with support for openssl.
HOST_ERLANG_DEPENDENCIES = host-openssl
HOST_ERLANG_DEPENDENCIES += host-openssl
HOST_ERLANG_CONF_OPTS = --without-javac --with-ssl=$(HOST_DIR)
HOST_ERLANG_CONF_OPTS += --without-termcap
@@ -65,7 +78,7 @@ ERLANG_CONF_OPTS += --without-odbc
endif
# Always use Buildroot's zlib
ERLANG_CONF_OPTS += --enable-shared-zlib
ERLANG_CONF_OPTS += --disable-builtin-zlib
ERLANG_DEPENDENCIES += zlib
# Remove source, example, gs and wx files from staging and target.