From d83c25aec6b3bc2c279608e60ae93efe7ba929bf Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Sun, 8 Oct 2017 22:47:41 +0200 Subject: [PATCH] erlang: fix build. --- dev-lang/erlang/erlang-19.3.recipe | 4 +- dev-lang/erlang/patches/erlang-19.3.patchset | 89 +++++++++++++++----- 2 files changed, 72 insertions(+), 21 deletions(-) diff --git a/dev-lang/erlang/erlang-19.3.recipe b/dev-lang/erlang/erlang-19.3.recipe index 3af1ee1fa..5cd69055f 100644 --- a/dev-lang/erlang/erlang-19.3.recipe +++ b/dev-lang/erlang/erlang-19.3.recipe @@ -7,7 +7,7 @@ concurrency, distribution and fault tolerance." HOMEPAGE="http://www.erlang.org/" COPYRIGHT="1997-2017 Ericsson AB" LICENSE="EPL" -REVISION="2" +REVISION="3" SOURCE_URI="http://www.erlang.org/download/otp_src_$portVersion.tar.gz" CHECKSUM_SHA256="fe4a00651db39b8542b04530a48d24b2f2e7e0b77cbe93d728c9f05325bdfe83" SOURCE_DIR="otp_src_$portVersion" @@ -53,6 +53,7 @@ BUILD_REQUIRES=" BUILD_PREREQUIRES=" cmd:bison + cmd:find cmd:flex cmd:gcc cmd:make @@ -68,7 +69,6 @@ ERLANG_CFLAGS="-DETHR_X86_OUT_OF_ORDER \ -DHAVE_NET_IF_DL_H \ -DETHR_HAVE_ETHREAD_DEFINES \ -DETHR_PTHREADS \ - -DETHR_SIZEOF_PTR=4 \ -DHAVE_CONFIG_H \ -D_BSD_SOURCE=1 \ -I../${effectiveTargetMachineTriple} \ diff --git a/dev-lang/erlang/patches/erlang-19.3.patchset b/dev-lang/erlang/patches/erlang-19.3.patchset index 44e070083..7ccbe8206 100644 --- a/dev-lang/erlang/patches/erlang-19.3.patchset +++ b/dev-lang/erlang/patches/erlang-19.3.patchset @@ -1,25 +1,14 @@ -From c547fa95eaca6428dbd26630c92584834240da82 Mon Sep 17 00:00:00 2001 +From e419ec41c9666dc6b6ef065ea723a491abb8c4fe Mon Sep 17 00:00:00 2001 From: Calvin Hill Date: Mon, 27 Feb 2017 14:21:40 +0000 -Subject: [PATCH] Haiku fixes +Subject: Haiku fixes ---- - erts/configure | 8 +++++--- - erts/emulator/sys/unix/sys.c | 2 +- - erts/epmd/src/Makefile.in | 2 +- - erts/etc/common/Makefile.in | 2 +- - erts/etc/common/erlexec.c | 2 +- - erts/include/internal/ethread.h | 4 +--- - erts/include/internal/i386/ethr_dw_atomic.h | 2 ++ - lib/asn1/c_src/Makefile | 2 +- - lib/erl_interface/src/connect/ei_connect.c | 2 ++ - 9 files changed, 15 insertions(+), 11 deletions(-) diff --git a/erts/configure b/erts/configure -index 88643b7..2d083d3 100755 +index 6704cf0..d506079 100755 --- a/erts/configure +++ b/erts/configure -@@ -6868,7 +6868,7 @@ if test "${ac_cv_lib_m_sin+set}" = set; then +@@ -6871,7 +6871,7 @@ if test "${ac_cv_lib_m_sin+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS @@ -28,7 +17,7 @@ index 88643b7..2d083d3 100755 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF -@@ -6931,7 +6931,7 @@ if test $ac_cv_lib_m_sin = yes; then +@@ -6934,7 +6934,7 @@ if test $ac_cv_lib_m_sin = yes; then #define HAVE_LIBM 1 _ACEOF @@ -37,7 +26,7 @@ index 88643b7..2d083d3 100755 fi -@@ -21553,7 +21553,9 @@ _ACEOF +@@ -21631,7 +21631,9 @@ _ACEOF if test "$gcc_dw_cmpxchg_asm" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -49,7 +38,7 @@ index 88643b7..2d083d3 100755 fi;; diff --git a/erts/emulator/sys/unix/sys.c b/erts/emulator/sys/unix/sys.c -index 4b2edac..07b1582 100644 +index 6459fa0..e3abf72 100644 --- a/erts/emulator/sys/unix/sys.c +++ b/erts/emulator/sys/unix/sys.c @@ -611,7 +611,7 @@ prepare_crash_dump(int secs) @@ -155,5 +144,67 @@ index c193fd8..8c7218b 100644 { struct { -- -2.2.2 +2.14.2 + + +From c1f8ef0ef7004c329a529e9b2709a07dea504c51 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Sun, 8 Oct 2017 22:34:10 +0200 +Subject: avoid using false, which we define. + + +diff --git a/erts/emulator/drivers/unix/ttsl_drv.c b/erts/emulator/drivers/unix/ttsl_drv.c +index e425b99..66af7ae 100644 +--- a/erts/emulator/drivers/unix/ttsl_drv.c ++++ b/erts/emulator/drivers/unix/ttsl_drv.c +@@ -1277,17 +1277,17 @@ static int start_termcap(void) + + capbuf = driver_alloc(1024); + if (!capbuf) +- goto false; ++ goto _false; + eres = erl_drv_getenv("TERM", capbuf, &envsz); + if (eres == 0) + env = capbuf; + else if (eres < 0) { + DEBUGLOG(("start_termcap: failure in erl_drv_getenv(\"TERM\", ..) = %d\n", eres)); +- goto false; ++ goto _false; + } else /* if (eres > 1) */ { + char *envbuf = driver_alloc(envsz); + if (!envbuf) +- goto false; ++ goto _false; + while (1) { + char *newenvbuf; + eres = erl_drv_getenv("TERM", envbuf, &envsz); +@@ -1297,7 +1297,7 @@ static int start_termcap(void) + if (eres < 0 || !newenvbuf) { + DEBUGLOG(("start_termcap: failure in erl_drv_getenv(\"TERM\", ..) = %d or realloc buf == %p\n", eres, newenvbuf)); + env = newenvbuf ? newenvbuf : envbuf; +- goto false; ++ goto _false; + } + envbuf = newenvbuf; + } +@@ -1305,7 +1305,7 @@ static int start_termcap(void) + } + if ((tres = tgetent((char*)lbuf, env)) <= 0) { + DEBUGLOG(("start_termcap: failure in tgetent(..) = %d\n", tres)); +- goto false; ++ goto _false; + } + if (env != capbuf) { + env = NULL; +@@ -1327,7 +1327,7 @@ static int start_termcap(void) + return TRUE; + } + DEBUGLOG(("start_termcap: failed start\n")); +- false: ++ _false: + if (env && env != capbuf) + driver_free(env); + if (capbuf) +-- +2.14.2