From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [RFA/commit] Add support for --disable-zlib
Date: Fri, 30 Oct 2009 18:30:00 -0000 [thread overview]
Message-ID: <20091030183018.GT24532@adacore.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
Hello,
As mentioned on the binutils list, we'd like to add support for
--disable-zlib, in order to be able to build a GDB that does not
have a dependency on that library:
http://www.sourceware.org/ml/binutils/2009-10/msg00600.html
This is the sim and gdb part, which needs to be checked in at the same
time as the binutils part.
sim/
* common/aclocal.m4: Add include of ../../config/zlib.m4.
* common/common.m4: Use AM_ZLIB to check for zlib support.
* ppc/configure.ac: Likewise.
* arm/configure, avr/configure, common/configure, cr16/configure,
cris/configure, d10v/configure, erc32/configure, frv/configure,
h8300/configure, iq2000/configure, lm32/configure, m32c/configure,
m32r/configure, m68hc11/configure, mcore/configure,
microblaze/configure, mips/configure, mn10300/configure,
moxie/configure, ppc/configure, sh/configure, sh64/configure,
v850/configure: Regenerate.
gdb/
* acinclude.m4: Include ../config/zlib.m4.
* configure.ac: Use AM_ZLIB to check for zlib support.
* configure: Regenerate.
I tested these changes by building GDB with and without --disable-zlib,
and verified that the dependency on libz disappeared in the second case.
I'd like to commit in a few days unless there are some objections.
Thanks,
--
Joel
[-- Attachment #2: zlib-sim.diff --]
[-- Type: text/x-diff, Size: 1878 bytes --]
commit 04d98981bf0f628379cd63f084e695dc76a44889
Author: Joel Brobecker <brobecker@adacore.com>
Date: Fri Oct 30 10:17:36 2009 -0700
* common/aclocal.m4: Add include of ../../config/zlib.m4.
* common/common.m4: Use AM_ZLIB to check for zlib support.
* ppc/configure.ac: Likewise.
* arm/configure, avr/configure, common/configure, cr16/configure,
cris/configure, d10v/configure, erc32/configure, frv/configure,
h8300/configure, iq2000/configure, lm32/configure, m32c/configure,
m32r/configure, m68hc11/configure, mcore/configure,
microblaze/configure, mips/configure, mn10300/configure,
moxie/configure, ppc/configure, sh/configure, sh64/configure,
v850/configure: Regenerate.
diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4
index 7beaebd..9a6a4c8 100644
--- a/sim/common/aclocal.m4
+++ b/sim/common/aclocal.m4
@@ -20,6 +20,7 @@
# Include global overrides and fixes for Autoconf.
m4_include(../../config/override.m4)
+sinclude([../../config/zlib.m4])
AC_DEFUN([SIM_AC_COMMON],
[
diff --git a/sim/common/common.m4 b/sim/common/common.m4
index 215208d..97a2c61 100644
--- a/sim/common/common.m4
+++ b/sim/common/common.m4
@@ -56,7 +56,7 @@ 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)])
+AM_ZLIB
. ${srcdir}/../../bfd/configure.host
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index e8ccfe9..ae26d54 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -668,7 +668,7 @@ 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)])
+AM_ZLIB
. ${srcdir}/../../bfd/configure.host
[-- Attachment #3: zlib-gdb.diff --]
[-- Type: text/x-diff, Size: 1199 bytes --]
commit cb233de5d67031f414582794cb1b2ef3386b4b4d
Author: Joel Brobecker <brobecker@adacore.com>
Date: Fri Oct 30 10:22:55 2009 -0700
* acinclude.m4: Include ../config/zlib.m4.
* configure.ac: Use AM_ZLIB to check for zlib support.
* configure: Regenerate.
diff --git a/gdb/acinclude.m4 b/gdb/acinclude.m4
index c32e1ea..af4639b 100644
--- a/gdb/acinclude.m4
+++ b/gdb/acinclude.m4
@@ -32,6 +32,8 @@ sinclude([../config/lcmessage.m4])
dnl For AM_LANGINFO_CODESET.
sinclude([../config/codeset.m4])
+sinclude([../config/zlib.m4])
+
#
# Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
# makes configure think it's cross compiling. If --target wasn't used, then
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b96caef..d3d4f1f 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -422,7 +422,7 @@ AC_SEARCH_LIBS(gethostbyname, nsl)
AC_SEARCH_LIBS(socketpair, socket)
# Link in zlib if we can. This allows us to read compressed debug sections.
-AC_SEARCH_LIBS(zlibVersion, z, [AC_CHECK_HEADERS(zlib.h)])
+AM_ZLIB
# On HP/UX we may need libxpdl for dlgetmodinfo (used by solib-pa64.c).
AC_SEARCH_LIBS(dlgetmodinfo, [dl xpdl])
next reply other threads:[~2009-10-30 18:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-30 18:30 Joel Brobecker [this message]
2009-10-30 20:38 ` Eli Zaretskii
2009-10-30 20:38 ` Eli Zaretskii
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=20091030183018.GT24532@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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