public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: Binutils <binutils@sourceware.org>, GDB <gdb-patches@sourceware.org>
Subject: Re: [PATCH 1/8] Add --with-system-zlib in bfd
Date: Tue, 31 Mar 2015 12:01:00 -0000	[thread overview]
Message-ID: <CAMe9rOrnBFYcD_gmJ4EveCV57gfHFq=fEbfb0zYRQ6+NssrByQ@mail.gmail.com> (raw)
In-Reply-To: <551A8907.6070309@redhat.com>

On Tue, Mar 31, 2015 at 4:46 AM, Pedro Alves <palves@redhat.com> wrote:
> On 03/31/2015 12:33 PM, H.J. Lu wrote:
>> On Tue, Mar 31, 2015 at 3:53 AM, Pedro Alves <palves@redhat.com> wrote:
>>> On 03/31/2015 11:46 AM, H.J. Lu wrote:
>
>>>> It is better for Makefile.am to use what configure.ac defines
>>>
>>> That's orthogonal.  How configure.ac defines what Makefile.am
>>> consumes is the issue.  That can either be through a shared macro,
>>> which makes sure all tools have the exact same command line option
>>> (like AM_ZLIB), or you manually put the same configure.ac bits
>>> everywhere.
>>
>> They aren't the same.  Some tools like ld, which use zlib implicitly
>> via libfd and libtool, don't need to reference zlib.
>
> Sure, that one just drops AM_ZLIB.
>
>> Some only need
>> to reference zlib library.  Some only need to reference header.
>>
>
> And?  If you replace AM_ZLIB's body with:
>
> # 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=
> )
> AC_SUBST(zlibdir)
> AC_SUBST(zlibinc)
>
> then it'll work for those too.  They just won't use zlibinc
> or zlibinc if they don't need it.  Currently you have:
>
> bfd:
>
>> +# 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=
>> +)
>> +AC_SUBST(zlibdir)
>> +AC_SUBST(zlibinc)
>
> gold:
>
> +# 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=
> +)
> +AC_SUBST(zlibdir)
> +AC_SUBST(zlibinc)
>
> gas:
>
> +# Use the system's zlib library.
> +zlibinc="-I\$(srcdir)/../zlib"
> +AC_ARG_WITH(system-zlib,
> +[AS_HELP_STRING([--with-system-zlib], [use installed libz])],
> +zlibinc=
> +)
> +AC_SUBST(zlibinc)
>
> binutils:
>
> +# 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=
> +)
> +AC_SUBST(zlibdir)
> +AC_SUBST(zlibinc)
>
> gdb:
>
> +# Use the system's zlib library.
> +zlibdir=-L../zlib
> +AC_ARG_WITH(system-zlib,
> +[AS_HELP_STRING([--with-system-zlib], [use installed libz])],
> +zlibdir=
> +)
> +AC_SUBST(zlibdir)
>
> and gcc has:
>
> # 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=
> )
> AC_SUBST(zlibdir)
> AC_SUBST(zlibinc)
>
>
>
> They're all the same.  Just a couple doesn't define zlibdir or zlibinc.

If zlib.m4 is changed, I will use it and GCC can also use it. But I
don't know if other packages use zlib.m4.

-- 
H.J.

  reply	other threads:[~2015-03-31 12:01 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26 15:57 H.J. Lu
2015-03-29 14:10 ` H.J. Lu
2015-03-30 15:52   ` Steve Ellcey
2015-03-30 16:32     ` H.J. Lu
2015-03-30 16:45       ` Luis Machado
2015-03-30 16:51         ` H.J. Lu
2015-03-30 17:13           ` Steve Ellcey
2015-03-30 17:21             ` H.J. Lu
2015-03-30 17:36               ` Steve Ellcey
2015-03-30 19:33                 ` Antoine Tremblay
2015-03-30 19:37                   ` Antoine Tremblay
2015-03-31 17:13                     ` Antoine Tremblay
2015-03-31 17:16                       ` H.J. Lu
2015-03-31 17:18                         ` Antoine Tremblay
2015-03-31 18:55                           ` H.J. Lu
2015-03-31 20:16                           ` H.J. Lu
2015-04-01 12:18                             ` Antoine Tremblay
2015-04-02  3:22                             ` Bin.Cheng
2015-04-02  3:53                               ` Bin.Cheng
2015-03-30 20:19                   ` H.J. Lu
2015-03-31 12:08                     ` Antoine Tremblay
2015-03-30 18:18           ` Luis Machado
2015-03-30 17:20       ` H.J. Lu
2015-03-31  6:13 ` Mike Frysinger
2015-03-31 10:10   ` H.J. Lu
2015-03-31 10:37     ` Pedro Alves
2015-03-31 10:46       ` H.J. Lu
2015-03-31 10:53         ` Pedro Alves
2015-03-31 11:33           ` H.J. Lu
2015-03-31 11:46             ` Pedro Alves
2015-03-31 12:01               ` H.J. Lu [this message]
2015-03-31 12:15                 ` Pedro Alves
2015-03-31 13:43                   ` H.J. Lu
2015-03-31 13:46                     ` Pedro Alves
2015-03-31 16:41     ` Mike Frysinger
2015-03-31 16:56       ` H.J. Lu
2015-03-31 17:01         ` Mike Frysinger
2015-03-31 17:04           ` H.J. Lu

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='CAMe9rOrnBFYcD_gmJ4EveCV57gfHFq=fEbfb0zYRQ6+NssrByQ@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).