Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Oudinet <johan.oudinet@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] erlang: Add a patch for hosts without libz
Date: Wed,  6 Dec 2017 15:40:06 +0100	[thread overview]
Message-ID: <20171206144006.3282-1-johan.oudinet@gmail.com> (raw)

Since commit 640c988fd4, erts/configure adds -lz to LIBS but
this variable is also used in some Dynamic Erlang drivers. Fix
Makefiles in such drivers to use the LDLIBS variable instead.

This patch has been reported upstream (see ERL-529) and should fix
http://autobuild.buildroot.net/results/3a3/3a3b9a4568c706bd6caad3c63d356680c8405ac5/

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
---
 ...-Link-with-LDLIBS-instead-of-LIBS-for-DED.patch | 42 ++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 package/erlang/0004-Link-with-LDLIBS-instead-of-LIBS-for-DED.patch

diff --git a/package/erlang/0004-Link-with-LDLIBS-instead-of-LIBS-for-DED.patch b/package/erlang/0004-Link-with-LDLIBS-instead-of-LIBS-for-DED.patch
new file mode 100644
index 0000000000..ad0bb6b453
--- /dev/null
+++ b/package/erlang/0004-Link-with-LDLIBS-instead-of-LIBS-for-DED.patch
@@ -0,0 +1,42 @@
+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
+
-- 
2.14.1

             reply	other threads:[~2017-12-06 14:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-06 14:40 Johan Oudinet [this message]
2017-12-06 18:50 ` [Buildroot] [PATCH 1/1] erlang: Add a patch for hosts without libz Bernd Kuhls
2017-12-06 22:40 ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171206144006.3282-1-johan.oudinet@gmail.com \
    --to=johan.oudinet@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox