All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 03/20] elf2flt: fix build when zlib is not installed on the host
Date: Mon, 27 May 2013 00:08:13 +0200	[thread overview]
Message-ID: <1369606110-8088-4-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <1369606110-8088-1-git-send-email-thomas.petazzoni@free-electrons.com>

For a reason that's fairly unclear to me, Peter added a '-lz' link
flag to the elf2flt.mk build in d5664ee99 ("elf2flt: fix link").

However, the zlib library may not necessarily be installed on the host
machine, so we should depend on host-zlib, and pass the appropriate
LDFLAGS. This is what this patch does.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
Note: I already have a patch that converts elf2flt to the package
infrastructure, but I am waiting to have the patches to make the
entire internal toolchain logic use the package infrastructure to send
them.
---
 toolchain/elf2flt/elf2flt.mk |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/elf2flt/elf2flt.mk b/toolchain/elf2flt/elf2flt.mk
index 134034b..52e199c 100644
--- a/toolchain/elf2flt/elf2flt.mk
+++ b/toolchain/elf2flt/elf2flt.mk
@@ -19,7 +19,7 @@ $(ELF2FLT_DIR)/.patched: $(ELF2FLT_DIR)/.unpacked
 
 $(ELF2FLT_DIR)/.configured: $(ELF2FLT_DIR)/.patched
 	(cd $(ELF2FLT_DIR); rm -rf config.cache; \
-		LDFLAGS=-lz \
+		LDFLAGS="$(HOST_LDFLAGS) -lz" \
 		$(ELF2FLT_DIR)/configure $(QUIET) \
 		--with-bfd-include-dir=$(HOST_BINUTILS_DIR)/bfd/ \
 		--with-binutils-include-dir=$(HOST_BINUTILS_DIR)/include/ \
@@ -33,7 +33,7 @@ $(ELF2FLT_DIR)/$(ELF2FLT_BINARY): $(ELF2FLT_DIR)/.configured
 	$(MAKE) -C $(ELF2FLT_DIR) all
 	$(MAKE) -C $(ELF2FLT_DIR) install
 
-elf2flt: uclibc_target uclibc-configured binutils gcc $(ELF2FLT_DIR)/$(ELF2FLT_BINARY)
+elf2flt: uclibc_target uclibc-configured binutils gcc host-zlib $(ELF2FLT_DIR)/$(ELF2FLT_BINARY)
 
 elf2flt-clean:
 	rm -rf $(ELF2FLT_SOURCE)
-- 
1.7.9.5

  parent reply	other threads:[~2013-05-26 22:08 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-26 22:08 [Buildroot] [PATCH 00/20] Patches from the Patchwork Day Thomas Petazzoni
2013-05-26 22:08 ` [Buildroot] [PATCH 01/20] numactl: new package Thomas Petazzoni
2013-05-27  8:42   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 02/20] dropbear: factorize the 'depends on BR2_PACKAGE_DROPBEAR' Thomas Petazzoni
2013-05-27 11:11   ` Peter Korsgaard
2013-05-26 22:08 ` Thomas Petazzoni [this message]
2013-05-27 11:13   ` [Buildroot] [PATCH 03/20] elf2flt: fix build when zlib is not installed on the host Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 04/20] gcc: fix gcc 4.8 build when thread support is disabled Thomas Petazzoni
2013-05-27 11:36   ` Peter Korsgaard
2013-05-27 21:55   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 05/20] toolchain: blackfin: Remove Blackfin toolchain 2011R1 release Thomas Petazzoni
2013-05-27 11:36   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 06/20] poco: Add upstream patch to add support for aarch64 Thomas Petazzoni
2013-06-09 20:14   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 07/20] flex: needs M4 at runtime Thomas Petazzoni
2013-05-27 21:55   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 08/20] Remove useless CVS related files Thomas Petazzoni
2013-05-27 21:59   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 09/20] toolchain-external: add support for 'Sourcery CodeBench ARM 2013.05' Thomas Petazzoni
2013-05-27 22:03   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 10/20] toolchain-external: remove support for 'Sourcery CodeBench ARM 2011.03' Thomas Petazzoni
2013-05-27 22:03   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 11/20] sunxi-tools: new host/target package Thomas Petazzoni
2013-05-27 22:09   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 12/20] sunxi-boards: new package Thomas Petazzoni
2013-05-28 21:29   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 13/20] cubieboard: add support Thomas Petazzoni
2013-05-29 10:54   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 14/20] freescale-imx: new package directory Thomas Petazzoni
2013-05-29 12:24   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 15/20] imx-lib: move to the freescale-imx directory Thomas Petazzoni
2013-05-29 12:28   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 16/20] firmware-imx: " Thomas Petazzoni
2013-05-29 12:31   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 17/20] freescale-imx: bump to 1.1.0 Thomas Petazzoni
2013-05-29 13:19   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 18/20] gpu-viv-bin-mx6q: new package Thomas Petazzoni
2013-05-29 13:39   ` Peter Korsgaard
2013-05-29 13:48     ` Thomas Petazzoni
2013-05-29 13:54       ` Peter Korsgaard
2013-06-01 18:14       ` Arnout Vandecappelle
2013-05-26 22:08 ` [Buildroot] [PATCH 19/20] network-manager: use a <pkg>_VERSION_MAJOR variable Thomas Petazzoni
2013-05-29 13:45   ` Peter Korsgaard
2013-05-26 22:08 ` [Buildroot] [PATCH 20/20] network-manager: bump to 0.9.8.0 Thomas Petazzoni
2013-05-29 14:09   ` Peter Korsgaard

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=1369606110-8088-4-git-send-email-thomas.petazzoni@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.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 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.