From: Jakub Jelinek <jakub@redhat.com>
To: "Дилян Палаузов" <dilyan.palauzov@aegee.org>,
"Paolo Bonzini" <bonzini@gnu.org>,
"Nathanael Nerode" <neroden@gcc.gnu.org>,
"Alexandre Oliva" <aoliva@gcc.gnu.org>,
"Ralf Wildenhues" <Ralf.Wildenhues@gmx.de>,
"Ian Lance Taylor" <iant@golang.org>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: No rule to make target '../libbacktrace/libbacktrace.la', needed by 'libgo.la'. [PR106472]
Date: Wed, 13 Mar 2024 10:13:37 +0100 [thread overview]
Message-ID: <ZfFuQWwhHq0YomkP@tucnak> (raw)
In-Reply-To: <adc06aef094ba077898e05b865bce3d3@aegee.org>
On Wed, Mar 13, 2024 at 07:37:26AM +0100, Дилян Палаузов wrote:
> Non-parallel build can fail, depending on the ./configure parameters -
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106472 .
>
> The change below does fix the problem.
CCing build system maintainers and the Go maintainer.
While the first Makefile.tpl hunk looks obviously ok, the others look
completely wrong to me.
There is nothing special about libgo vs. libbacktrace/libatomic
compared to any other target library which is not bootstrapped vs. any
of its dependencies which are in the bootstrapped set.
So, Makefile.tpl shouldn't hardcode such dependencies.
The
all-target-libgo: maybe-all-target-libbacktrace
all-target-libgo: maybe-all-target-libatomic
dependencies which are in Makefile.in already are I believe intentionally
guarded with
@unless gcc-bootstrap
because when bootstrapping, there are the
all-target-libgo: stage_current
configure-target-libgo: stage_last
dependencies instead plus there is always
all-target-libgo: configure-target-libgo
and stage_last should I believe ensure that everything is bootstrapped,
gcc as well as the bootstrapped target libraries like libbacktrace or
libatomic.
Now, if those are built only sometimes depending on configured languages
- I see
grep 'lib\(backtrace\|atomic\)' gcc/*/config-lang.in gcc/ada/gcc-interface/config-lang.in
gcc/d/config-lang.in:phobos_target_deps="target-zlib target-libbacktrace"
gcc/fortran/config-lang.in:target_libs="target-libgfortran target-libbacktrace"
gcc/go/config-lang.in:target_libs="target-libgo target-libffi target-libbacktrace"
then perhaps Makefile.def should know that it is not a bootstrap=true module
target_modules = { module= libbacktrace; bootstrap=true; };
unconditionally and arrange for the dependencies between non-bootstrap
target modules and these maybe ones to be emitted even if gcc-bootstrap.
> I do not understand the build system to say, that this is the best approach,
> so if there are questions I might or might not be able to answer them.
>
> I tried different things, this worked on the releases/gcc-13 branch. On the
> master branch last weekend the problem was that stage2 and stage3 results
> are not equal, so I have not verified this change there. depend= in
> Makefile.def seem to have only effect if bootstrapping is involved and
> gcc/go/config-lang.in does not have boot_language=yes . The lines below are
> present in the Makefile.in:@unless gcc-bootstrap snippet. Actually I think
> ./configure --enable-languages=all and then serial build work, because this
> implied D and it does imply bootstrapping for libbacktrace and libatomic. I
> also do not want to invest much more time on this.
>
> I do not know, if 2×`maybe-` is necessary.
>
>
> diff --git a/Makefile.in b/Makefile.in
> index 06a9398e172..236e5cda942 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -66481,6 +66481,7 @@ configure-target-libgfortran:
> maybe-all-target-libquadmath
>
>
> @if gcc-bootstrap
> +all-target-libgo: maybe-all-target-libbacktrace maybe-all-target-libatomic
> configure-gnattools: stage_last
> configure-libcc1: stage_last
> configure-c++tools: stage_last
> diff --git a/Makefile.tpl b/Makefile.tpl
> index dfbd74b68f8..98160c7626b 100644
> --- a/Makefile.tpl
> +++ b/Makefile.tpl
> @@ -1952,7 +1952,7 @@ configure-target-[+module+]: maybe-all-gcc[+
> (define dep-maybe (lambda ()
> (if (exist? "hard") "" "maybe-")))
>
> - ;; dep-kind returns returns "prebootstrap" for configure or build
> + ;; dep-kind returns "prebootstrap" for configure or build
> ;; dependencies of bootstrapped modules on a build module
> ;; (e.g. all-gcc on all-build-bison); "normal" if the dependency is
> ;; on an "install" target, or if the dependence module is not
> @@ -2017,6 +2017,7 @@ configure-target-[+module+]: maybe-all-gcc[+
> [+ ESAC +][+ ENDFOR dependencies +]
>
> @if gcc-bootstrap
> +all-target-libgo: maybe-all-target-libbacktrace maybe-all-target-libatomic
> [+ FOR dependencies +][+ CASE (dep-kind) +]
> [+ == "postbootstrap" +][+ (make-postboot-dep) +][+ ESAC +][+
> ENDFOR dependencies +]@endif gcc-bootstrap
>
Jakub
next prev parent reply other threads:[~2024-03-13 9:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 6:37 Дилян Палаузов
2024-03-13 9:13 ` Jakub Jelinek [this message]
2024-03-23 11:31 ` Дилян Палаузов
2024-03-25 23:59 ` Ian Lance Taylor
2024-03-26 16:32 ` Дилян Палаузов
2024-03-26 16:37 ` Ian Lance Taylor
2024-03-28 22:14 ` Дилян Палаузов
2024-03-28 22:24 ` Andrew Pinski
2024-04-02 7:39 ` [PATCH] Fix up postboot dependencies [PR106472] Jakub Jelinek
2024-04-02 11:21 ` Richard Biener
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=ZfFuQWwhHq0YomkP@tucnak \
--to=jakub@redhat.com \
--cc=Ralf.Wildenhues@gmx.de \
--cc=aoliva@gcc.gnu.org \
--cc=bonzini@gnu.org \
--cc=dilyan.palauzov@aegee.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=iant@golang.org \
--cc=neroden@gcc.gnu.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).