All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] lzma: repair build
@ 2014-12-03 21:02 Vincent Stehlé
  2014-12-03 21:22 ` Thomas Petazzoni
  2015-01-10 16:58 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Vincent Stehlé @ 2014-12-03 21:02 UTC (permalink / raw
  To: buildroot

The build of host-lzma is broken since commit 97703978ac870ce2
("support/libtool: make -static behave like -all-static").

Lzma forces '-static' in its LDFLAGS, which contradicts what buildroot tries to
achieve by patching libtool scripts and configuring host packages with
'--disable-static'.

We add a patch to remove lzma's hardcoded LDFLAGS, to fix the build.

Signed-off-by: Vincent Stehl? <vincent.stehle@laposte.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../lzma-0001-Remove-static-from-LDFLAGS.patch     | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 package/lzma/lzma-0001-Remove-static-from-LDFLAGS.patch

diff --git a/package/lzma/lzma-0001-Remove-static-from-LDFLAGS.patch b/package/lzma/lzma-0001-Remove-static-from-LDFLAGS.patch
new file mode 100644
index 0000000..9a33e44
--- /dev/null
+++ b/package/lzma/lzma-0001-Remove-static-from-LDFLAGS.patch
@@ -0,0 +1,68 @@
+From 1b33f6d13e5c25a2500ee312068c08a3d3811a5f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@laposte.net>
+Date: Wed, 3 Dec 2014 21:32:02 +0100
+Subject: [PATCH] Remove -static from LDFLAGS
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Buildroot does not enable static libraries by default for host builds. Having
+-static hardcoded in the LDFLAGS breaks the build, so remove it.
+
+Signed-off-by: Vincent Stehl? <vincent.stehle@laposte.net>
+---
+ src/lzmadec/Makefile.am  | 1 -
+ src/lzmadec/Makefile.in  | 1 -
+ src/lzmainfo/Makefile.am | 1 -
+ src/lzmainfo/Makefile.in | 1 -
+ 4 files changed, 4 deletions(-)
+
+diff --git a/src/lzmadec/Makefile.am b/src/lzmadec/Makefile.am
+index 7322b2a..13edec8 100644
+--- a/src/lzmadec/Makefile.am
++++ b/src/lzmadec/Makefile.am
+@@ -2,6 +2,5 @@ bin_PROGRAMS = lzmadec
+ lzmadec_SOURCES = lzmadec.c
+ lzmadec_LDADD = @top_builddir@/src/liblzmadec/liblzmadec.la
+ AM_CPPFLAGS = -I at top_srcdir@/src/liblzmadec
+-AM_LDFLAGS = -static
+ 
+ dist_man_MANS = lzmadec.1
+diff --git a/src/lzmadec/Makefile.in b/src/lzmadec/Makefile.in
+index 5af9240..4ed1de1 100644
+--- a/src/lzmadec/Makefile.in
++++ b/src/lzmadec/Makefile.in
+@@ -185,7 +185,6 @@ top_srcdir = @top_srcdir@
+ lzmadec_SOURCES = lzmadec.c
+ lzmadec_LDADD = @top_builddir@/src/liblzmadec/liblzmadec.la
+ AM_CPPFLAGS = -I at top_srcdir@/src/liblzmadec
+-AM_LDFLAGS = -static
+ dist_man_MANS = lzmadec.1
+ all: all-am
+ 
+diff --git a/src/lzmainfo/Makefile.am b/src/lzmainfo/Makefile.am
+index b5b01ec..e280bff 100644
+--- a/src/lzmainfo/Makefile.am
++++ b/src/lzmainfo/Makefile.am
+@@ -2,6 +2,5 @@ bin_PROGRAMS = lzmainfo
+ lzmainfo_SOURCES = lzmainfo.c
+ lzmainfo_LDADD = @top_builddir@/src/liblzmadec/liblzmadec.la
+ AM_CPPFLAGS = -I at top_srcdir@/src/liblzmadec
+-AM_LDFLAGS = -static
+ 
+ dist_man_MANS = lzmainfo.1
+diff --git a/src/lzmainfo/Makefile.in b/src/lzmainfo/Makefile.in
+index 6a2127a..f1f3441 100644
+--- a/src/lzmainfo/Makefile.in
++++ b/src/lzmainfo/Makefile.in
+@@ -185,7 +185,6 @@ top_srcdir = @top_srcdir@
+ lzmainfo_SOURCES = lzmainfo.c
+ lzmainfo_LDADD = @top_builddir@/src/liblzmadec/liblzmadec.la
+ AM_CPPFLAGS = -I at top_srcdir@/src/liblzmadec
+-AM_LDFLAGS = -static
+ dist_man_MANS = lzmainfo.1
+ all: all-am
+ 
+-- 
+2.1.3
+
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] lzma: repair build
  2014-12-03 21:02 [Buildroot] [PATCH] lzma: repair build Vincent Stehlé
@ 2014-12-03 21:22 ` Thomas Petazzoni
  2014-12-03 22:14   ` Vincent Stehlé
  2015-01-10 16:58 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2014-12-03 21:22 UTC (permalink / raw
  To: buildroot

Dear Vincent Stehl?,

On Wed,  3 Dec 2014 22:02:29 +0100, Vincent Stehl? wrote:
> The build of host-lzma is broken since commit 97703978ac870ce2
> ("support/libtool: make -static behave like -all-static").
> 
> Lzma forces '-static' in its LDFLAGS, which contradicts what buildroot tries to
> achieve by patching libtool scripts and configuring host packages with
> '--disable-static'.
> 
> We add a patch to remove lzma's hardcoded LDFLAGS, to fix the build.
> 
> Signed-off-by: Vincent Stehl? <vincent.stehle@laposte.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Do you think this patch could be submitted upstream to lzma? It really
doesn't make sense for them to force static linking.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] lzma: repair build
  2014-12-03 21:22 ` Thomas Petazzoni
@ 2014-12-03 22:14   ` Vincent Stehlé
  0 siblings, 0 replies; 4+ messages in thread
From: Vincent Stehlé @ 2014-12-03 22:14 UTC (permalink / raw
  To: buildroot

On 12/03/2014 10:22 PM, Thomas Petazzoni wrote:
(patch lzma to remove -static)
> Do you think this patch could be submitted upstream to lzma? It really
> doesn't make sense for them to force static linking.

I will try, but don't hold your breath: lzma seems to be unmaintained...

Best regards,

V.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] lzma: repair build
  2014-12-03 21:02 [Buildroot] [PATCH] lzma: repair build Vincent Stehlé
  2014-12-03 21:22 ` Thomas Petazzoni
@ 2015-01-10 16:58 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-01-10 16:58 UTC (permalink / raw
  To: buildroot

Dear Vincent Stehl?,

On Wed,  3 Dec 2014 22:02:29 +0100, Vincent Stehl? wrote:
> The build of host-lzma is broken since commit 97703978ac870ce2
> ("support/libtool: make -static behave like -all-static").
> 
> Lzma forces '-static' in its LDFLAGS, which contradicts what buildroot tries to
> achieve by patching libtool scripts and configuring host packages with
> '--disable-static'.
> 
> We add a patch to remove lzma's hardcoded LDFLAGS, to fix the build.
> 
> Signed-off-by: Vincent Stehl? <vincent.stehle@laposte.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  .../lzma-0001-Remove-static-from-LDFLAGS.patch     | 68 ++++++++++++++++++++++
>  1 file changed, 68 insertions(+)
>  create mode 100644 package/lzma/lzma-0001-Remove-static-from-LDFLAGS.patch

Applied, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-01-10 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-03 21:02 [Buildroot] [PATCH] lzma: repair build Vincent Stehlé
2014-12-03 21:22 ` Thomas Petazzoni
2014-12-03 22:14   ` Vincent Stehlé
2015-01-10 16:58 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.