public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: "R. Diez" <rdiezmail-newlib@yahoo.de>
To: joel@rtems.org
Cc: Mike Frysinger <vapier@gentoo.org>,
	Newlib <newlib@sourceware.org>,
	Matthew Joyce <matthew.joyce@embedded-brains.de>
Subject: Re: Question about autoreconf to regenerate configuration files
Date: Sun, 23 Jan 2022 17:57:35 +0100	[thread overview]
Message-ID: <e89b5887-b1e9-372f-a266-68e2ea5bf5ba@yahoo.de> (raw)
In-Reply-To: <CAF9ehCVJPqt-t8jAmPGaKAm6p3NKA=ytHAzjNtYkmxm_p2UgWA@mail.gmail.com>


> [...]
> We do thia one tree style.

Combining the repositories has drawbacks. Mixing things at least increases chances for confusion.

What are the advantages of using the "combined tree" versus separate directories?

With a "combined tree", do you still need to build GCC in 2 phases, or can you do it in one pass?

My first thought is that a "combined tree" may allow for more parallelism when building, but my makefile already builds all components in parallel too. The components of the toolchain I am building are:

Binutils
GMP
MPFR
MPC
GCC
Newlib
GDB

Binutils, GMP, MPFR and MPC probably need to be completely built before the GCC cross-compiler, so the "combined tree" is not going to paralellise that.

GDB needs MPFR and GMP, but does not need the GCC cross-compiler, for it is a host-based tool.

Therefore, at first sight, it looks like a "combined tree" may only increase parallelism when building GCC with an integrated Newlib, as opposed to building Newlib completely before building GCC. But I wonder if the "combined tree" build system serialises those steps (building GCC and building its Newlib) anyway.

In any case, there may be an advantage of combining the GCC and Newlib source trees, but I cannot see yet how that could benefit the other components.


> [...]
> We move or symlink the newlib/ directory under the top GCC directory.

Just the newlib/ directory? That means that top-level files in the Newlib Git repository, like 'configure' next to newlib/ and libgloss/ , are not used at all for your builds.

Consider top-level file README, which starts like this:

"This directory contains various GNU compilers, assemblers, linkers,
  debuggers, etc., plus their support routines, definitions, and documentation."

This file does not seem to come from Newlib. Why do we need it in Newlib?

The "combined tree" instructions on this page:

https://gcc.gnu.org/wiki/Building_Cross_Toolchains_with_gcc

state the following:

"with the GCC files overriding the binutils/gdb/newlib files when there's a conflict."

But the way you are symlinking just "newlib/" does not create any conflicts, does it?

By the way, are you aware of any public full example (a script or makefile) somewhere which I could use as a reference for creating and building with a combined tree?


> Mike Frysinger wrote:
> [...]
> there is only one set of top-level files.  they get manually synced from
> gcc to the other projects by devs who notice & need the fixes.

OK, I gather that copying those files across from GCC is the standard practice. But why do we need to keep doing that in Newlib? According to the (outdated) cross toolchain build instructions, when combining the tree the GCC versions should prevail.

It is not like anybody would take Newlib without GCC and use those top-level files (the 'configure' script) to build say just Newlib and Binutils, is it?


>> My guess is that GCC's build system is calling 'configure',
>> 'make' etc. inside newlib/, and it does not really matter
>> if the versions are a little different.
>> Or is a lot of the build system really shared?

> Joel Sherrill wrote:
> Based on how we always build, I'd say it is just invocation.

> Mike Frysinger wrote:
> the contract at build time is `./configure`, and even if newlib had its script
> generated with an old version of autoconf, it doesn't really change the API.
> the top-level Makefile knows to `cd newlib && ./configure ...` and that will
> work regardless of the autoconf version.

There seems to be consensus that the Autoconf version in Newlib does not matter, and that the "combined tree" building system interface is just invoking 'configure' and 'make' under newlib/.

Why do we need to fix the Autoconf version to 2.69 then? We could use the newer 2.71 for Newlib.

How about the Automake version? The Automake version is not checked like the Autoconf version is, isn't it? The checked-in "Makefile.in" files were generated with Automake 1.15.1 from 2017-06-19, and the latest is 1.16.5 from 2021-10-03.

If we want to strictly keep in sync with GCC, shouldn't we check the exact Automake version too?


> Mike Frysinger wrote:
> the multilib multiplexing logic with libraries makes things a bit messier too.

Does the multilib multiplexing logic affect the interface between the combined tree build system and Newlib? Or does it require something special inside newlib/ that would conflict with newer Autotools versions?


Thanks for the information,
   rdiez

-- 
rdiez

  reply	other threads:[~2022-01-23 16:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 12:32 Matthew Joyce
2022-01-21 13:44 ` Corinna Vinschen
2022-01-21 15:02 ` R. Diez
2022-01-21 15:37   ` Joel Sherrill
2022-01-21 16:09     ` R. Diez
2022-01-21 22:09       ` Mike Frysinger
2022-01-21 23:08         ` Joel Sherrill
2022-01-22 21:20         ` R. Diez
2022-01-23  0:17           ` Joel Sherrill
2022-01-23 16:57             ` R. Diez [this message]
2022-01-26 10:19               ` Mike Frysinger
2022-01-30 22:22                 ` R. Diez
2022-01-23  7:29           ` Mike Frysinger
2022-01-26 10:02         ` Mike Frysinger
2022-02-17  5:18           ` Mike Frysinger
2022-02-17  6:56             ` Sebastian Huber
2022-02-20  9:51             ` R. Diez

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=e89b5887-b1e9-372f-a266-68e2ea5bf5ba@yahoo.de \
    --to=rdiezmail-newlib@yahoo.de \
    --cc=joel@rtems.org \
    --cc=matthew.joyce@embedded-brains.de \
    --cc=newlib@sourceware.org \
    --cc=vapier@gentoo.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).