public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
To: crossgcc@sourceware.org
Cc: Michael Hope <michael.hope@linaro.org>,
	Khem Raj <raj.khem@gmail.com>,
	Zhenqiang Chen <zhenqiang.chen@linaro.org>
Subject: Re: [zlib PATCH 1 of 3] complibs/zlib: Add zlib support for binutils and gdb
Date: Wed, 23 Nov 2011 22:00:00 -0000	[thread overview]
Message-ID: <201111232300.20715.yann.morin.1998@anciens.enib.fr> (raw)
In-Reply-To: <CANLjY-=2vcmLU=cA5PyjSwgAn4XAtW_xEAJhRfMiS5TgFxJ=WA@mail.gmail.com>

Michael, Khem, Zhenqiang, All,

On Wednesday 23 November 2011 21:54:05 Michael Hope wrote:
> On Thu, Nov 24, 2011 at 9:16 AM, Khem Raj <raj.khem@gmail.com> wrote:
> > On Tue, Nov 22, 2011 at 9:38 AM, Yann E. MORIN
> > <yann.morin.1998@anciens.enib.fr> wrote:
> >> Why don't you want to use the system zlib? What's the use-case? zlib has
> >> a history of many security holes, and using static means you won't get
> >> bug-fixes.
> >
> > I guess if you are building on systems which has either no zlib or
> > different version of zlib
> > but I am looking for better use case from Zhenqiang here
> 
> Hi all.  Our goal is to have a generic Linux binary build of the
> Linaro toolchain but, on reflection, I wonder if we're doing it the
> wrong way.
> 
> The requirement is to have the same binary build work on RHEL 5,
> long-term supported releases like Ubuntu LTS, and the latest release
> of the most popular distros such as Debian, Ubuntu, Fedora, and
> openSUSE.  The plain is to statically link everything except libc and
> libm which is why Zhenquiang proposed this patch.

OK, then I think it would make more sense to the gcc/binutils/gdb to
statically link against zlib, and it will use the available one: for
gcc, its bundled version; for glibc/gdb, the system static lib.

Originally, the companion libraries are here to workaround missing or
too old libraries on the system. This made (and still makes) sense, as
those libraries are only available in recent distros, and older ones
are still, and will always be, lacking those. But as they are needed
by gcc, and not yet widely available, crosstool-NG has to build its
owns.

But for more traditional libraries, I would highly prefer that crosstool-NG
uses the system libraries, even if it requires the user to install extra
packages.

zlib, expat and ncurses are surely widely available nowadays, and it does
not make much sense in duplicating the effort to build them.

So, I would suggest that we look at making the affected components link
statically (but optionally) against the host libraries, rather than
building our owns...

> I'm wondering if we should target the LSB[1] instead.  The build tools
> are a bit clunky but we gain standardised versions of libc, libm,
> libz, libncurses, and others.
> 
> I've prototyped it up and the build works OK.  Thoughts?  Has anyone
> worked with the LSB before?

Never worked with LSB, so I'm curious to see what you mean by "I've
prototyped it up". ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq

  parent reply	other threads:[~2011-11-23 22:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-22 12:04 Zhenqiang Chen
2011-11-22 17:38 ` Yann E. MORIN
2011-11-23 20:17   ` Khem Raj
2011-11-23 20:54     ` Michael Hope
2011-11-23 21:01       ` Khem Raj
2011-11-23 22:00       ` Yann E. MORIN [this message]
2011-11-23 22:20         ` Khem Raj
2011-11-23 22:53         ` Michael Hope
2011-11-24  5:31         ` Zhenqiang Chen
2011-11-24  5:47           ` Ralf Corsepius
2011-11-24  6:59             ` Zhenqiang Chen
2011-11-24  7:13               ` Ralf Corsepius
2011-11-24  7:21                 ` Zhenqiang Chen
2011-11-24 15:41                   ` Ralf Corsepius
2011-11-24 20:35                     ` Michael Hope
2011-11-22 17:50 ` Yann E. MORIN
     [not found]   ` <CACgzC7AnOW+umLpoD+Hwv1i1z_WF=rD2hJ7AJkWO-x86fHVMFg@mail.gmail.com>
2011-11-23  7:40     ` Yann E. MORIN
2011-11-23  8:23       ` Zhenqiang Chen

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=201111232300.20715.yann.morin.1998@anciens.enib.fr \
    --to=yann.morin.1998@anciens.enib.fr \
    --cc=crossgcc@sourceware.org \
    --cc=michael.hope@linaro.org \
    --cc=raj.khem@gmail.com \
    --cc=zhenqiang.chen@linaro.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).