public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* RFC: Add zlib source to src CVS resposity
@ 2010-10-30 21:12 H.J. Lu
  2010-10-30 22:19 ` John Reiser
  0 siblings, 1 reply; 18+ messages in thread
From: H.J. Lu @ 2010-10-30 21:12 UTC (permalink / raw)
  To: Binutils, GCC Development, GDB

Hi,

Binutils can compress/decompress debug sections if zlib is available.
I imported zlib from gcc source tree to binutils source tree. I changed
binutils to use zlib unconditionally. By default, the in-tree zlib is used.
If you configure binutis using --with-system-zlib, system zlib will be used.
My zlib changes are on hjl/zlib branch at

http://git.kernel.org/?p=devel/binutils/hjl/x86.git;a=summary

Any comments?

Thanks.

-- 
H.J.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-10-30 21:12 RFC: Add zlib source to src CVS resposity H.J. Lu
@ 2010-10-30 22:19 ` John Reiser
  2010-11-01 17:21   ` Nick Clifton
  0 siblings, 1 reply; 18+ messages in thread
From: John Reiser @ 2010-10-30 22:19 UTC (permalink / raw)
  To: binutils

On 10/30/2010, H.J. Lu wrote:
> Binutils can compress/decompress debug sections if zlib is available.
> I imported zlib from gcc source tree to binutils source tree. ...

Please consider using -DNO_GZIP in zlib version 1.2.5 (April 19, 2010)
from  http://zlib.net/ .  Compiling zlib with -DNO_GZIP forces adler32
as the checksum algorithm instead of crc32, and zlib streams for the
data format instead of gzip streams.  adler32 is significantly faster,
less energy intensive, and several kilobytes smaller in static size
because it uses no CRC table. The cost is a loss of at most 0.023%
in detecting corruption.

-- 
John Reiser, jreiser@BitWagon.com

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-10-30 22:19 ` John Reiser
@ 2010-11-01 17:21   ` Nick Clifton
  2010-11-01 17:23     ` Nathan Froyd
  0 siblings, 1 reply; 18+ messages in thread
From: Nick Clifton @ 2010-11-01 17:21 UTC (permalink / raw)
  To: H.J. Lu; +Cc: binutils

Hi H.J.

 > On 30/10/10 23:19, John Reiser wrote:
> Please consider using -DNO_GZIP in zlib version 1.2.5 (April 19, 2010)
> from  http://zlib.net/.

I think that this sounds like a good idea.  What do you think ?

Cheers
   Nick


^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-11-01 17:21   ` Nick Clifton
@ 2010-11-01 17:23     ` Nathan Froyd
  0 siblings, 0 replies; 18+ messages in thread
From: Nathan Froyd @ 2010-11-01 17:23 UTC (permalink / raw)
  To: Nick Clifton; +Cc: H.J. Lu, binutils

On Mon, Nov 01, 2010 at 04:49:15PM +0000, Nick Clifton wrote:
> > On 30/10/10 23:19, John Reiser wrote:
> >Please consider using -DNO_GZIP in zlib version 1.2.5 (April 19, 2010)
> >from  http://zlib.net/.
> 
> I think that this sounds like a good idea.  What do you think ?

Will that cause an incompatibility with existing objects?  (i.e. if the
zlib binutils was using was compiled without -DNO_GZIP)

-Nathan

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-11-02 13:22                 ` Ian Lance Taylor
@ 2010-11-09 14:19                   ` Mike Frysinger
  0 siblings, 0 replies; 18+ messages in thread
From: Mike Frysinger @ 2010-11-09 14:19 UTC (permalink / raw)
  To: binutils; +Cc: Ian Lance Taylor, Nick Clifton, H.J. Lu, GCC Development, GDB

[-- Attachment #1: Type: Text/Plain, Size: 630 bytes --]

On Tuesday, November 02, 2010 09:22:24 Ian Lance Taylor wrote:
> Nick Clifton <nickc@redhat.com> writes:
> >   Right - this decision has been made.  We are not going to include
> > 
> > zlib the in the binutils sources.
> > 
> >   Thanks for suggesting the idea and working on the patch, but in the
> > 
> > end it was just not a path we wanted to go down.
> 
> I think the next decision is whether to require the host system to have
> zlib, much as gcc requires the host system to have gmp, mpfr, and mpc.

since the functionality in binutils is minor and optional, i dont think 
requiring zlib makes sense
-mike

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-11-02  8:19               ` Nick Clifton
@ 2010-11-02 13:22                 ` Ian Lance Taylor
  2010-11-09 14:19                   ` Mike Frysinger
  0 siblings, 1 reply; 18+ messages in thread
From: Ian Lance Taylor @ 2010-11-02 13:22 UTC (permalink / raw)
  To: Nick Clifton; +Cc: H.J. Lu, GCC Development, Binutils, GDB

Nick Clifton <nickc@redhat.com> writes:

>   Right - this decision has been made.  We are not going to include
> zlib the in the binutils sources.
>
>   Thanks for suggesting the idea and working on the patch, but in the
> end it was just not a path we wanted to go down.

I think the next decision is whether to require the host system to have
zlib, much as gcc requires the host system to have gmp, mpfr, and mpc.

Ian

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-10-31 19:13       ` Ian Lance Taylor
  2010-11-01 17:13         ` Nick Clifton
@ 2010-11-02 10:46         ` Paolo Bonzini
  1 sibling, 0 replies; 18+ messages in thread
From: Paolo Bonzini @ 2010-11-02 10:46 UTC (permalink / raw)
  To: Ian Lance Taylor
  Cc: H.J. Lu, Frank Ch. Eigler, Binutils, GCC Development, GDB

On 10/31/2010 08:12 PM, Ian Lance Taylor wrote:
> I assume that the reason we do that for intl is because it has complex
> interactions with the rest of the C library, so using the wrong intl
> library will cause confusing behaviour when the LC_ environment
> variables are set.  That case does not arise for zlib.  I think that if
> we do ship zlib with the binutils, we might as well always build it
> rather than using complex configure tests.

I think it's also for historical reasons.  Nowadays most GNU utilities 
are not shipping with a copy intl anymore.

Paolo

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-11-02  1:03             ` Christopher Faylor
@ 2010-11-02  8:19               ` Nick Clifton
  2010-11-02 13:22                 ` Ian Lance Taylor
  0 siblings, 1 reply; 18+ messages in thread
From: Nick Clifton @ 2010-11-02  8:19 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GCC Development, Binutils, GDB

Hi H.J.

   Right - this decision has been made.  We are not going to include 
zlib the in the binutils sources.

   Thanks for suggesting the idea and working on the patch, but in the 
end it was just not a path we wanted to go down.

Cheers
   Nick Clifton

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-11-01 23:56           ` Alan Modra
@ 2010-11-02  1:03             ` Christopher Faylor
  2010-11-02  8:19               ` Nick Clifton
  0 siblings, 1 reply; 18+ messages in thread
From: Christopher Faylor @ 2010-11-02  1:03 UTC (permalink / raw)
  To: GCC Development, Nick Clifton, Binutils, GDB

On Tue, Nov 02, 2010 at 10:25:50AM +1030, Alan Modra wrote:
>On Mon, Nov 01, 2010 at 05:13:44PM +0000, Nick Clifton wrote:
>>   * We have to make sure that zlib will build on all of the
>>     hosts that we care about.  Should the situation arise
>>     where the zlib does not build on a particular host, and
>>     the zlib maintainers are not interested in making it
>>     build there, then it will be down to us to fix it.  Or
>>     else abandon compression support on that host.
>
>This would mean we need to keep machinery to conditionally compile
>in compressed debug support, removal of said support being HJ's stated
>reason for importing zlib.
>
>I'm against importing zlib into binutils, and I think we should keep
>support of compressed debug sections conditional, to avoid potential
>bootstrap problems or circular dependencies.

FWIW, I agree.  I think that having to keep zlib up-to-date wrt
potential security issues or other serious bugs is a burden that we
shouldn't take on.  Shouldn't we be trying to use any system shared
libraries for these types of things specifically so that the vendor
can handle problems for us?

cgf

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-11-01 17:13         ` Nick Clifton
  2010-11-01 17:19           ` Daniel Jacobowitz
@ 2010-11-01 23:56           ` Alan Modra
  2010-11-02  1:03             ` Christopher Faylor
  1 sibling, 1 reply; 18+ messages in thread
From: Alan Modra @ 2010-11-01 23:56 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Binutils, GCC Development, GDB

On Mon, Nov 01, 2010 at 05:13:44PM +0000, Nick Clifton wrote:
>   * We have to make sure that zlib will build on all of the
>     hosts that we care about.  Should the situation arise
>     where the zlib does not build on a particular host, and
>     the zlib maintainers are not interested in making it
>     build there, then it will be down to us to fix it.  Or
>     else abandon compression support on that host.

This would mean we need to keep machinery to conditionally compile
in compressed debug support, removal of said support being HJ's stated
reason for importing zlib.

I'm against importing zlib into binutils, and I think we should keep
support of compressed debug sections conditional, to avoid potential
bootstrap problems or circular dependencies.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-11-01 17:13         ` Nick Clifton
@ 2010-11-01 17:19           ` Daniel Jacobowitz
  2010-11-01 23:56           ` Alan Modra
  1 sibling, 0 replies; 18+ messages in thread
From: Daniel Jacobowitz @ 2010-11-01 17:19 UTC (permalink / raw)
  To: Nick Clifton; +Cc: Binutils, GCC Development, GDB

On Mon, Nov 01, 2010 at 05:13:44PM +0000, Nick Clifton wrote:
> At the moment I feel that the pros outweigh the cons.  What do other
> people think ?

I was asked not to include expat in GDB, which was a similar
situation.  I don't remember if this was an FSF issue; I know that the
FSF, in general, dislikes duplicated source code in packages, but I
don't know if they care when the duplicated bits are non-GNU.  There
were definitely GDB developers that disliked bundling expat, so
perhaps you can find the reasons in the archives.

-- 
Daniel Jacobowitz
CodeSourcery

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-10-31 19:13       ` Ian Lance Taylor
@ 2010-11-01 17:13         ` Nick Clifton
  2010-11-01 17:19           ` Daniel Jacobowitz
  2010-11-01 23:56           ` Alan Modra
  2010-11-02 10:46         ` Paolo Bonzini
  1 sibling, 2 replies; 18+ messages in thread
From: Nick Clifton @ 2010-11-01 17:13 UTC (permalink / raw)
  To: Binutils; +Cc: GCC Development, GDB

Hi Guys,

 >>> So this becomes a question for the binutils maintainers: do
>>> the binutils want to be self-contained, or do they want to follow the
>>> path of gcc and require additional libraries to be installed before a
>>> build can succeed?

As I see it the pros of having a copy of the zlib sources in the 
binutils tree are that:

   * The tools can be built on a host that does not have
     zlib installed.

   * We can be sure exactly which version of zlib is being
     used.

   * It simplifies our configure scripts and sources.  We
     always know that zlib is present and the API to use.

Whereas the cons of having our own copy of zlib are that:

   * We have to manually import any bug-fixes or enhancements
     to the official zlib sources.  Which means that we have
     to watch the zlib sources and be ready to evaluate any
     changes.

   * We have to make sure that zlib will build on all of the
     hosts that we care about.  Should the situation arise
     where the zlib does not build on a particular host, and
     the zlib maintainers are not interested in making it
     build there, then it will be down to us to fix it.  Or
     else abandon compression support on that host.

   * It is essentially a waste of space on hosts that already
     have zlib installed.

At the moment I feel that the pros outweigh the cons.  What do other 
people think ?

Cheers
   Nick

^ permalink raw reply	[flat|nested] 18+ messages in thread

* RE: RFC: Add zlib source to src CVS resposity
  2010-10-31 18:42   ` Ian Lance Taylor
  2010-10-31 18:58     ` H.J. Lu
@ 2010-10-31 19:54     ` Weddington, Eric
  1 sibling, 0 replies; 18+ messages in thread
From: Weddington, Eric @ 2010-10-31 19:54 UTC (permalink / raw)
  To: Ian Lance Taylor, Frank Ch. Eigler
  Cc: H.J. Lu, Binutils, GCC Development, GDB

 

> -----Original Message-----
> From: Ian Lance Taylor [mailto:iant@google.com] 
> Sent: Sunday, October 31, 2010 12:42 PM
> To: Frank Ch. Eigler
> Cc: H.J. Lu; Binutils; GCC Development; GDB
> Subject: Re: RFC: Add zlib source to src CVS resposity
> 
> fche@redhat.com (Frank Ch. Eigler) writes:
> 
> > "H.J. Lu" <hjl.tools@gmail.com> writes:
> >
> >> [...]  By default, the in-tree zlib is used.  If you configure
> >> binutis using --with-system-zlib, system zlib will be used.  [...]
> >
> > Can you summarize what modern platforms lack a system zlib, and what
> > justifies using the proposed in-tree copy by default?
> 
> This is a good point.  We need zlib in the gcc repository because we
> build it for the target, but this issue does not arise in the src
> repository.  So this becomes a question for the binutils 
> maintainers: do
> the binutils want to be self-contained, or do they want to follow the
> path of gcc and require additional libraries to be installed before a
> build can succeed?

Typically, building for host=mingw runs into all sorts of non-standard stuff. I don't know for sure, but I highly doubt that there is a system zlib on that platform. For gcc dependencies, it just so happens that gmp, mpfr, and mpc build just fine for mingw.

Eric Weddington

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-10-31 18:58     ` H.J. Lu
@ 2010-10-31 19:13       ` Ian Lance Taylor
  2010-11-01 17:13         ` Nick Clifton
  2010-11-02 10:46         ` Paolo Bonzini
  0 siblings, 2 replies; 18+ messages in thread
From: Ian Lance Taylor @ 2010-10-31 19:13 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Frank Ch. Eigler, Binutils, GCC Development, GDB

"H.J. Lu" <hjl.tools@gmail.com> writes:

> On Sun, Oct 31, 2010 at 11:42 AM, Ian Lance Taylor <iant@google.com> wrote:
>> fche@redhat.com (Frank Ch. Eigler) writes:
>>
>>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>>
>>>> [...]  By default, the in-tree zlib is used.  If you configure
>>>> binutis using --with-system-zlib, system zlib will be used.  [...]
>>>
>>> Can you summarize what modern platforms lack a system zlib, and what
>>> justifies using the proposed in-tree copy by default?
>>
>> This is a good point.  We need zlib in the gcc repository because we
>> build it for the target, but this issue does not arise in the src
>> repository.  So this becomes a question for the binutils maintainers: do
>> the binutils want to be self-contained, or do they want to follow the
>> path of gcc and require additional libraries to be installed before a
>> build can succeed?
>
> zlib is in similar situation as intl. We include intl in binutils src and
> it can be disabled at configure time. For host zlib, should we check if
> it is available and fail back to in-tree zlib if there is no suitable host
> zlib?

I assume that the reason we do that for intl is because it has complex
interactions with the rest of the C library, so using the wrong intl
library will cause confusing behaviour when the LC_ environment
variables are set.  That case does not arise for zlib.  I think that if
we do ship zlib with the binutils, we might as well always build it
rather than using complex configure tests.

This is just my opinion, and really I think the more active binutils and
gdb maintainers should decide what to do here.

Ian

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-10-31 18:42   ` Ian Lance Taylor
@ 2010-10-31 18:58     ` H.J. Lu
  2010-10-31 19:13       ` Ian Lance Taylor
  2010-10-31 19:54     ` Weddington, Eric
  1 sibling, 1 reply; 18+ messages in thread
From: H.J. Lu @ 2010-10-31 18:58 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Frank Ch. Eigler, Binutils, GCC Development, GDB

On Sun, Oct 31, 2010 at 11:42 AM, Ian Lance Taylor <iant@google.com> wrote:
> fche@redhat.com (Frank Ch. Eigler) writes:
>
>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>
>>> [...]  By default, the in-tree zlib is used.  If you configure
>>> binutis using --with-system-zlib, system zlib will be used.  [...]
>>
>> Can you summarize what modern platforms lack a system zlib, and what
>> justifies using the proposed in-tree copy by default?
>
> This is a good point.  We need zlib in the gcc repository because we
> build it for the target, but this issue does not arise in the src
> repository.  So this becomes a question for the binutils maintainers: do
> the binutils want to be self-contained, or do they want to follow the
> path of gcc and require additional libraries to be installed before a
> build can succeed?

zlib is in similar situation as intl. We include intl in binutils src and
it can be disabled at configure time. For host zlib, should we check if
it is available and fail back to in-tree zlib if there is no suitable host
zlib?


-- 
H.J.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-10-30 21:37 ` Frank Ch. Eigler
  2010-10-30 22:28   ` H.J. Lu
@ 2010-10-31 18:42   ` Ian Lance Taylor
  2010-10-31 18:58     ` H.J. Lu
  2010-10-31 19:54     ` Weddington, Eric
  1 sibling, 2 replies; 18+ messages in thread
From: Ian Lance Taylor @ 2010-10-31 18:42 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: H.J. Lu, Binutils, GCC Development, GDB

fche@redhat.com (Frank Ch. Eigler) writes:

> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> [...]  By default, the in-tree zlib is used.  If you configure
>> binutis using --with-system-zlib, system zlib will be used.  [...]
>
> Can you summarize what modern platforms lack a system zlib, and what
> justifies using the proposed in-tree copy by default?

This is a good point.  We need zlib in the gcc repository because we
build it for the target, but this issue does not arise in the src
repository.  So this becomes a question for the binutils maintainers: do
the binutils want to be self-contained, or do they want to follow the
path of gcc and require additional libraries to be installed before a
build can succeed?

Ian

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
  2010-10-30 21:37 ` Frank Ch. Eigler
@ 2010-10-30 22:28   ` H.J. Lu
  2010-10-31 18:42   ` Ian Lance Taylor
  1 sibling, 0 replies; 18+ messages in thread
From: H.J. Lu @ 2010-10-30 22:28 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: Binutils, GCC Development, GDB

On Sat, Oct 30, 2010 at 2:37 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> [...]  By default, the in-tree zlib is used.  If you configure
>> binutis using --with-system-zlib, system zlib will be used.  [...]
>
> Can you summarize what modern platforms lack a system zlib, and what
> justifies using the proposed in-tree copy by default?
>

I don't know. I just want to remove those zlib checks.


-- 
H.J.

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: RFC: Add zlib source to src CVS resposity
       [not found] <AANLkTikYSxV51_452Wuqox6mQ3_QwNjzNkBgV=NzKk4f__16997.3676828251$1288473196$gmane$org@mail.gmail.com>
@ 2010-10-30 21:37 ` Frank Ch. Eigler
  2010-10-30 22:28   ` H.J. Lu
  2010-10-31 18:42   ` Ian Lance Taylor
  0 siblings, 2 replies; 18+ messages in thread
From: Frank Ch. Eigler @ 2010-10-30 21:37 UTC (permalink / raw)
  To: H.J. Lu; +Cc: Binutils, GCC Development, GDB

"H.J. Lu" <hjl.tools@gmail.com> writes:

> [...]  By default, the in-tree zlib is used.  If you configure
> binutis using --with-system-zlib, system zlib will be used.  [...]

Can you summarize what modern platforms lack a system zlib, and what
justifies using the proposed in-tree copy by default?

- FChE

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-11-09 14:19 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-30 21:12 RFC: Add zlib source to src CVS resposity H.J. Lu
2010-10-30 22:19 ` John Reiser
2010-11-01 17:21   ` Nick Clifton
2010-11-01 17:23     ` Nathan Froyd
     [not found] <AANLkTikYSxV51_452Wuqox6mQ3_QwNjzNkBgV=NzKk4f__16997.3676828251$1288473196$gmane$org@mail.gmail.com>
2010-10-30 21:37 ` Frank Ch. Eigler
2010-10-30 22:28   ` H.J. Lu
2010-10-31 18:42   ` Ian Lance Taylor
2010-10-31 18:58     ` H.J. Lu
2010-10-31 19:13       ` Ian Lance Taylor
2010-11-01 17:13         ` Nick Clifton
2010-11-01 17:19           ` Daniel Jacobowitz
2010-11-01 23:56           ` Alan Modra
2010-11-02  1:03             ` Christopher Faylor
2010-11-02  8:19               ` Nick Clifton
2010-11-02 13:22                 ` Ian Lance Taylor
2010-11-09 14:19                   ` Mike Frysinger
2010-11-02 10:46         ` Paolo Bonzini
2010-10-31 19:54     ` Weddington, Eric

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).