GNU bug report logs - #69394
cross-gcc-toolchain for riscv64 doesn't search crt1.o properly

Previous Next

Package: guix;

Reported by: Ekaitz Zarraga <ekaitz <at> elenq.tech>

Date: Sun, 25 Feb 2024 20:11:01 UTC

Severity: normal

Full log


Message #8 received at 69394 <at> debbugs.gnu.org (full text, mbox):

From: Jean-Pierre De Jesus Diaz <jean <at> foundationdevices.com>
To: 69394 <at> debbugs.gnu.org
Cc: ekaitz <at> elenq.tech
Subject: Re: cross-gcc-toolchain for riscv64 doesn't search crt1.o properly
Date: Thu, 29 Feb 2024 13:59:35 +0000
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.




This bug report was last modified 1 year and 67 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.