From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109265 invoked by alias); 31 Mar 2015 10:46:42 -0000 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 Received: (qmail 109243 invoked by uid 89); 31 Mar 2015 10:46:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ob0-f175.google.com Received: from mail-ob0-f175.google.com (HELO mail-ob0-f175.google.com) (209.85.214.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 31 Mar 2015 10:46:39 +0000 Received: by obvd1 with SMTP id d1so20171603obv.0; Tue, 31 Mar 2015 03:46:37 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.28.39 with SMTP id y7mr31912077obg.11.1427798797734; Tue, 31 Mar 2015 03:46:37 -0700 (PDT) Received: by 10.76.134.102 with HTTP; Tue, 31 Mar 2015 03:46:37 -0700 (PDT) In-Reply-To: <551A78D4.7050804@redhat.com> References: <20150326155711.GA10088@gmail.com> <20150331061337.GA30996@vapier> <551A78D4.7050804@redhat.com> Date: Tue, 31 Mar 2015 10:46:00 -0000 Message-ID: Subject: Re: [PATCH 1/8] Add --with-system-zlib in bfd From: "H.J. Lu" To: Pedro Alves Cc: Binutils , GDB Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg01026.txt.bz2 On Tue, Mar 31, 2015 at 3:37 AM, Pedro Alves wrote: > On 03/31/2015 11:10 AM, H.J. Lu wrote: >> On Mon, Mar 30, 2015 at 11:13 PM, Mike Frysinger wrote: >>> On 26 Mar 2015 08:57, H.J. Lu wrote: >>>> --- a/bfd/configure.ac >>>> +++ b/bfd/configure.ac >>>> >>>> -# Link in zlib if we can. This allows us to read compressed debug sections. >>>> -# This is used only by compress.c. >>>> -AM_ZLIB >>>> +# Use the system's zlib library. >>>> +zlibdir=-L../zlib >>>> +zlibinc="-I\$(srcdir)/../zlib" >>>> +AC_ARG_WITH(system-zlib, >>>> +[AS_HELP_STRING([--with-system-zlib], [use installed libz])], >>>> +zlibdir= >>>> +zlibinc= >>>> +) >>> >>> this is wrong. the 3rd arg is whether the option was specified, not that the >>> option was disabled. you need to check $withval is equal to "no" (or not equal >>> to "yes"). >>> -mike >> >> That is what gcc/configure.ac has and it works for me. >> >> > > Why are we patching every tool's configury instead of tweaking > config/zlib.m4 (where AM_ZLIB is from)? We go from a single > place to edit, to the same configure bits spread around the > tree. Seems like a step backwards. > Replace AM_ZLIB in configure.ac isn't complete. I also needed to change * Makefile.am (ZLIB): New. (ZLIBINC): Likewise. (AM_CFLAGS): Add $(ZLIBINC). (libbfd_la_LIBADD): Add $(ZLIB). It is better for Makefile.am to use what configure.ac defines -- H.J.