This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 1/8] Add --with-system-zlib in bfd
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: sellcey at imgtec dot com
- Cc: Binutils <binutils at sourceware dot org>, GDB <gdb-patches at sourceware dot org>
- Date: Mon, 30 Mar 2015 10:20:27 -0700
- Subject: Re: [PATCH 1/8] Add --with-system-zlib in bfd
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOp9RHgjnG3JpfSFXsyT4jwutoC7FWTWFzfoKEnT0GC48Q at mail dot gmail dot com> <1427730751 dot 30498 dot 4 dot camel at ubuntu-sellcey> <CAMe9rOqOPtZ5xD=cP_O-QajKdq8hhgnSFsjFvc+OEyAqrpwoHw at mail dot gmail dot com>
On Mon, Mar 30, 2015 at 9:31 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Mar 30, 2015 at 8:52 AM, Steve Ellcey <sellcey@imgtec.com> wrote:
>> On Sun, 2015-03-29 at 07:10 -0700, H.J. Lu wrote:
>>> On Thu, Mar 26, 2015 at 8:57 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>>> > I imported zlib from GCC. This patch adds --with-system-zlib and remove
>>> > --with-zlib in bfd. OK for master?
>>
>> I think the global binutils-gdb Makefile needs to have a dependency of
>> bfd on zlib. If I build 'all-binutils' (using just the binutils-gdb
>> repository, not a combined tree with GCC) I get a build failure. If I
>> explicitly build all-zlib before building all-binutils it works, but I
>> should not have to do that.
>>
>>
>> /bin/sh ./libtool --tag=CC --mode=link gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I/scratch/sellcey/repos/nightly/src/binutils-gdb/bfd/../zlib -g -O2 -rpath /scratch/sellcey/repos/nightly/install-mips-mti-linux-gnu/x86_64-unknown-linux-gnu/mips-mti-linux-gnu/lib -release `cat libtool-soversion` -static-libstdc++ -static-libgcc -o libbfd.la archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.lo format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo `cat ofiles` -ldl -L../zlib -lz -ldl
>> ./libtool: line 5195: cd: ../zlib: No such file or directory
>> libtool: link: cannot determine absolute directory name of `../zlib'
>> make[3]: *** [libbfd.la] Error 1
>> make[3]: Leaving directory `/scratch/sellcey/repos/nightly/obj-mips-mti-linux-gnu/binutils-gdb/bfd'
>> make[2]: *** [all-recursive] Error 1
>> make[2]: Leaving directory `/scratch/sellcey/repos/nightly/obj-mips-mti-linux-gnu/binutils-gdb/bfd'
>> make[1]: *** [all] Error 2
>> make[1]: Leaving directory `/scratch/sellcey/repos/nightly/obj-mips-mti-linux-gnu/binutils-gdb/bfd'
>> make: *** [all-bfd] Error 2
>> Error: Make command failed, stopping build.
>
> I will take a look.
>
This is the patch I checked in.
--
H.J.
---
From 1ca8e8df45bcdd08b7a8fbb35368478ddbf890bf Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 30 Mar 2015 10:17:40 -0700
Subject: [PATCH] Make all-bfd depend on all-zlib
* Makefile.def (dependencies): Add all-zlib to all-bfd.
* Makefile.in: Regenerated.
---
ChangeLog | 5 +++++
Makefile.def | 1 +
Makefile.in | 8 ++++++++
3 files changed, 14 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index ad04e40..4110c29 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * Makefile.def (dependencies): Add all-zlib to all-bfd.
+ * Makefile.in: Regenerated.
+
2015-03-28 H.J. Lu <hongjiu.lu@intel.com>
* src-release.sh (do_proto_toplev): Configure with --target
diff --git a/Makefile.def b/Makefile.def
index e0ea2fb..4e76450 100644
--- a/Makefile.def
+++ b/Makefile.def
@@ -402,6 +402,7 @@ dependencies = { module=configure-bfd;
on=configure-libiberty; hard=true; };
dependencies = { module=configure-bfd; on=configure-intl; };
dependencies = { module=all-bfd; on=all-libiberty; };
dependencies = { module=all-bfd; on=all-intl; };
+dependencies = { module=all-bfd; on=all-zlib; };
dependencies = { module=configure-opcodes; on=configure-libiberty;
hard=true; };
dependencies = { module=all-opcodes; on=all-libiberty; };
diff --git a/Makefile.in b/Makefile.in
index 6f9dfd4..cc05f7b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -49969,6 +49969,14 @@ all-stage3-bfd: maybe-all-stage3-intl
all-stage4-bfd: maybe-all-stage4-intl
all-stageprofile-bfd: maybe-all-stageprofile-intl
all-stagefeedback-bfd: maybe-all-stagefeedback-intl
+all-bfd: maybe-all-zlib
+
+all-stage1-bfd: maybe-all-stage1-zlib
+all-stage2-bfd: maybe-all-stage2-zlib
+all-stage3-bfd: maybe-all-stage3-zlib
+all-stage4-bfd: maybe-all-stage4-zlib
+all-stageprofile-bfd: maybe-all-stageprofile-zlib
+all-stagefeedback-bfd: maybe-all-stagefeedback-zlib
configure-opcodes: configure-libiberty
configure-stage1-opcodes: configure-stage1-libiberty
--
1.9.3