From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15089 invoked by alias); 30 Oct 2009 18:30:36 -0000 Received: (qmail 15080 invoked by uid 22791); 30 Oct 2009 18:30:35 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 30 Oct 2009 18:30:31 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B95D72BAC47 for ; Fri, 30 Oct 2009 14:30:28 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zeEHcO0s487I for ; Fri, 30 Oct 2009 14:30:28 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 760E72BAAEE for ; Fri, 30 Oct 2009 14:30:28 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id CB599F5921; Fri, 30 Oct 2009 19:30:18 +0100 (CET) Date: Fri, 30 Oct 2009 18:30:00 -0000 From: Joel Brobecker To: gdb-patches@sourceware.org Subject: [RFA/commit] Add support for --disable-zlib Message-ID: <20091030183018.GT24532@adacore.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8X7/QrJGcKSMr1RN" Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00697.txt.bz2 --8X7/QrJGcKSMr1RN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1351 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 --8X7/QrJGcKSMr1RN Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="zlib-sim.diff" Content-length: 1878 commit 04d98981bf0f628379cd63f084e695dc76a44889 Author: Joel Brobecker 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 --8X7/QrJGcKSMr1RN Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="zlib-gdb.diff" Content-length: 1199 commit cb233de5d67031f414582794cb1b2ef3386b4b4d Author: Joel Brobecker 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]) --8X7/QrJGcKSMr1RN--