This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Committed: fix zlib breakage (was: inflateInit?)


> Date: Thu, 10 Jul 2008 16:12:10 -0400
> From: Daniel Jacobowitz <drow@false.org>

> I think the only thing we can do is add equivalent autoconf tests for
> zlib to other things which link to BFD but do not use libtool.
> Mostly, that means the sim.

Specifically, sim/*.  One might have thought this meant just
sim/common/aclocal.m4 and regenerating each sim/*/configure... except
it has to be done in sim/common/common.m4 (a bit surprisingly, nothing
happens if done in aclocal.m4; but supposedly that's due to the bug
referred to in the comment above each include in sim/*/configure.ac),
and have a separate variant for ppc, which doesn't use
common/common.m4.

Apparently, most sim/*/config.in hadn't been regenerated for a
while and nothing ever set $(LIBS) for ppc.

All sims built through my autotester (builds all sims except sh64,
erc32 and cr16 and runs the testsuites for cris, arm, frv, mips, sh,
v850) and also built sh64, erc32 and cr16 separately.

Committed.

sim/common:
	* common.m4: Add test for libz and zlib.h.
	* configure: Regenerate to track ../common/common.m4 changes.
	* config.in: Ditto.

sim/arm, sim/cr16, sim/d10v, sim/erc32, sim/frv, sim/h8300,
sim/iq2000, sim/m32c, sim/m32r, sim/m68hc11, sim/mcore,
sim/mips, sim/mn10300, sim/sh, sim/sh64, sim/v850:

	* configure: Regenerate to track ../common/common.m4 changes.
	* config.in: Ditto.

sim/ppc:
	* configure.ac: Add test for libz and zlib.h.
	* Makefile.in (LIBS): Set from @LIBS@.
	* configure: Regenerate.
	* config.in: Ditto.

sim:
	* cris/configure: Regenerate to track ../common/common.m4 changes.
	* cris/config.in: Ditto.

Index: common/common.m4
===================================================================
RCS file: /cvs/src/src/sim/common/common.m4,v
retrieving revision 1.5
diff -p -u -r1.5 common.m4
--- common/common.m4	7 Jun 2008 01:31:25 -0000	1.5
+++ common/common.m4	11 Jul 2008 00:22:20 -0000
@@ -54,6 +54,10 @@ AC_CHECK_FUNCS(getrusage time sigaction 
 AC_CHECK_LIB(socket, bind)
 AC_CHECK_LIB(nsl, gethostbyname)
 
+# BFD conditionally uses zlib, so we must link it in if libbfd does, by
+# using the same condition.
+AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+
 . ${srcdir}/../../bfd/configure.host
 
 dnl Standard (and optional) simulator options.

Index: ppc/Makefile.in
===================================================================
RCS file: /cvs/src/src/sim/ppc/Makefile.in,v
retrieving revision 1.23
diff -p -u -r1.23 Makefile.in
--- ppc/Makefile.in	7 Jun 2008 01:31:27 -0000	1.23
+++ ppc/Makefile.in	11 Jul 2008 00:22:35 -0000
@@ -120,6 +120,7 @@ NOWARN_CFLAGS	= $(CFLAGS) $(INLINE_CFLAG
 BUILD_CFLAGS	= $(CFLAGS_FOR_BUILD) $(INCLUDES) $(WARNING_CFLAGS)
 
 BUILD_LDFLAGS	=
+LIBS = @LIBS@
 
 CONFIG_FILE = @sim_config@
 IGEN_OPCODE_RULES = @sim_opcode@
Index: ppc/configure.ac
===================================================================
RCS file: /cvs/src/src/sim/ppc/configure.ac,v
retrieving revision 1.8
diff -p -u -r1.8 configure.ac
--- ppc/configure.ac	7 Jun 2008 01:31:27 -0000	1.8
+++ ppc/configure.ac	11 Jul 2008 00:22:35 -0000
@@ -571,6 +571,10 @@ AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$
 AC_CANONICAL_SYSTEM
 AC_ARG_PROGRAM
 
+# BFD conditionally uses zlib, so we must link it in if libbfd does, by
+# using the same condition.
+AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+
 . ${srcdir}/../../bfd/configure.host
 
 case ${host} in


brgds, H-P


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]