unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: 69394@debbugs.gnu.org
Cc: ekaitz@elenq.tech, jean@foundationdevices.com
Subject: bug#69394: cross-gcc-toolchain for riscv64 doesn't search crt1.o properly
Date: Tue, 09 Apr 2024 19:33:26 -0300	[thread overview]
Message-ID: <87sezu88uh.fsf@linaro.org> (raw)
In-Reply-To: <CAG1gdUqip+HzcsMrqHXi7xQH1yzzrSxuGqCkKxpyY9aGDWZ9KA@mail.gmail.com> (Jean-Pierre De Jesus Diaz via Bug reports for's message of "Thu, 29 Feb 2024 13:59:35 +0000")


Hello Jean-Pierre,

Today I ran into the issue reported in this bug with a custom toolchain
package for aarch64-linux-gnu. I applied your patch from issue 68058 and
that solved the problem!

Thank you very much for your insights and proposed solutions. A couple
of comments below:

Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

> 2. The other solution is to use NATIVE-SEARCH-PATHS but when using
> mixed toolchains
> in a single environment all of the cross compilers will share this
> environment variable.
>
> For example:
>
> guix shell gcc-cross-avr-toolchain gcc-cross-i686-w64-mingw32-toolchain
>
> Would have the same CROSS_* environment variables and could mix things up.
>
> Ideally one should have per target cross variables, like, CROSS_AVR_*
> CROSS_I686_W64_MINGW32_*, but this is not done right now.
>
> Another option is to wrap every binary of the toolchain and set the
> CROSS_* variables
> so that they can find the C standard library includes and binaries
> without adding
> search paths to avoid collisions with other toolchains for the moment and since
> profiles don't support cross-packages yet I think it is a fair trade-off.
>
> I think I could update https://issues.guix.gnu.org/68058 to use the
> latter method.

That would be awesome.

If I understand correctly what you wrote, as things stand today many
cross toolchains are unusable because of this problem (but not all? IIUC
bare-metal cross toolchains aren't affected because they don't use
crt*.o files, right?)

So even your patch as it is currently proposed in issue 68058 would be
an improvement over the status quo.

IMHO, supporting more than one cross toolchain installed in the same
profile would be interesting (I for one would find it useful to have
both aarch64-linux-gnu and arm-linux-gnueabihf cross toolchains
installed at the same time) but even if that is not possible yet,
supporting just one cross toolchain installed in a profile would be an
important improvement. :-)

All this to say: unless there are other downsides to the patch in 68058,
I think it should be committed.

--
Thiago




      reply	other threads:[~2024-04-10 19:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-25 20:07 bug#69394: cross-gcc-toolchain for riscv64 doesn't search crt1.o properly Ekaitz Zarraga
2024-02-29 13:59 ` Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix
2024-04-09 22:33   ` Thiago Jung Bauermann [this message]

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sezu88uh.fsf@linaro.org \
    --to=thiago.bauermann@linaro.org \
    --cc=69394@debbugs.gnu.org \
    --cc=ekaitz@elenq.tech \
    --cc=jean@foundationdevices.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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