all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean-Pierre De Jesus Diaz via Bug reports for GNU Guix <bug-guix@gnu.org>
To: 69394@debbugs.gnu.org
Cc: ekaitz@elenq.tech
Subject: bug#69394: cross-gcc-toolchain for riscv64 doesn't search crt1.o properly
Date: Thu, 29 Feb 2024 13:59:35 +0000	[thread overview]
Message-ID: <CAG1gdUqip+HzcsMrqHXi7xQH1yzzrSxuGqCkKxpyY9aGDWZ9KA@mail.gmail.com> (raw)
In-Reply-To: <35296725-34bd-074f-0582-b066c11b06dc@elenq.tech>

Hello Ekaitz,

This problem is also present for other targets such as AVR[1] as when
I introduced
the cross-gcc-toolchain procedure I didn't add the NATIVE-SEARCH-PATHS and
SEARCH-PATHS fields for the toolchains as:

1. SEARCH-PATHS doesn't quite work with shells right now, as it is
impossible to create
a profile with cross packages. E.g. trying to use
gcc-cross-avr-toolchain and unity
built for AVR. So it is a bit useless, unless the toolchain is used
inside of GNU Guix as
a NATIVE-INPUT, but STANDARD-CROSS-PACKAGES takes care of this in
GNU-BUILD-SYSTEM by adding cross-gcc and cross-libc as inputs.

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.

[1]: https://www.reddit.com/r/GUIX/comments/18rj84f/arduino_avr_compilation_help/

-- 
Jean-Pierre De Jesus DIAZ
Foundation Devices, Inc.




  reply	other threads:[~2024-02-29 14:01 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 [this message]
2024-04-09 22:33   ` Thiago Jung Bauermann

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=CAG1gdUqip+HzcsMrqHXi7xQH1yzzrSxuGqCkKxpyY9aGDWZ9KA@mail.gmail.com \
    --to=bug-guix@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.