Reproducible binary builds [was: complibs/zlib: Add zlib support for binutils and gdb]

Yann E. MORIN yann.morin.1998@anciens.enib.fr
Mon Nov 28 18:26:00 GMT 2011


Michael, Zhenqiang, All,

On Monday 28 November 2011 03:05:18 Michael Hope wrote:
> On Mon, Nov 28, 2011 at 2:50 PM, Zhenqiang Chen
> <zhenqiang.chen@linaro.org> wrote:
> >> OK, that all makes a lot of sense! So, here is the list of the required
> >> dependencies (that I know of) for each component:
> >>
> >>   library   | binutils | gcc | gdb |
> >>   ----------+----------+-----+-----+
> >>   expat     |          |     |  Y  |
> >>   ncurses   |          |     |  Y  |
> >> -> zlib      |    Y     |  Y  |  Y  |
> >> -> libiconv  |    Y     |  Y  |  Y  |
> >>   gmp       |          |  Y  |     |
> >>   mpfr      |          |  Y  |     |
> >>   ppl       |          |  Y  |     |
> >>   cloog/ppl |          |  Y  |     |
> >>   mpc       |          |  Y  |     |
> >>   libelf    |          |  Y  |     |
> >>
> >
> > Both gdb native and cross need expat, ncurses, zlib and libiconv.

Yes, the table above does not differentiate the type of build; it only
lists the dependencies.

> > Currently gdb will build fail due to depend on expat for canadian build.

That happens only for the cross gdb. The native gdb already builds expat
and ncurses (but not zlib).

> The GDB build script scripts/build/debug/300-gdb.sh has support for
> building expat and ncurses as part of the GDB build itself.  It's
> currently only turned on for native though - perhaps it should be
> turned on for Canadian cross as well?

If we build zlib, expat and ncurses for the host, it does not mind what
type of build this is: canadian or not.

But, if we use LSB, I understand that the 'base' dependencies will get
pulled in automaticcally, and those three libs are in LSB. I have to admit
that I am not really up to speed wrt LSB. I'll read it carefully soonish...

> I'm not fond of having it hidden like that but that's how things are.

Basically, I'm not fond about having to handle such dependencies at all;
I see these as a necessary evil.

For GMP, MPFR et al. we have the choice of version, because they are 'new'
libraries, and it can make sense to use the exact version recommended by
each version of gcc. So we need to have that choice selection.

But for more traditional libraries (zlib, ncurses and expat), it's only a
matter of making it easier to build a toolchain that is portable. So, these
libraries will be blindly built: no version choice.

Now, that the build procedure is hidden inside the gdb build is historical.
At the time they were added, there was no need to add them for the host,
only for the target. So it made sense to hide them in the gdb build. Now,
these two libs should be extracted, of course.


But globally, about companion libraries, here's what I'd like we support:
 - by default, use the libs availble on the host:
   - the libs provided by the build distro for cross builds
   - the libs already built by another buildsystem, in case of canadian
 - at the user's request, build our own libs


And speaking about canadian-cross: I'm doing a lot of rework to make it
more streamlined than it is now. It takes time, but the current state of
the MQ is visible (and has been visible for the past 11+ months) there:
    http://crosstool-ng.org/hg/crosstool-ng/ct-ng.canadian/

Use with:
    hg qclone -p http://crosstool-ng.org/hg/crosstool-ng/ct-ng.canadian \
              http://crosstool-ng.org/hg/crosstool-ng                   \
              ctng.canadian
    cd ctng.canadian
    hg up -r 986e1c75432a
    hg qseries
    hg qpush -a

(It is needed to update to #986e1c75432a because I did not rebase the MQ
ontop the latest changesets, yet).

This MQ is now rather mature, but is not yet ready to be 'qfinish'ed, and
needs much testing. Hopefully, I'll be able to finish this before the next
release (end January 2012).

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



More information about the crossgcc mailing list