On Wed, Mar 17, 2021 at 11:10:23PM -0700, Chris Marusich wrote: > Efraim Flashner writes: > > > On Mon, Mar 15, 2021 at 11:45:00PM -0700, Chris Marusich wrote: > >> * gnu/packages/commencement.scm (binutils-final)[arguments]: When checking if > >> the system is a Power architecture, instead of hard-coding "powerpc-linux", > >> use the target-powerpc? procedure so it works on more Power architectures. > >> [inputs]: Likewise. > >> --- > >> gnu/packages/commencement.scm | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm > >> index c0732bbf62d..d4511ed9148 100644 > >> --- a/gnu/packages/commencement.scm > >> +++ b/gnu/packages/commencement.scm > >> @@ -3516,14 +3516,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" > >> #:implicit-inputs? #f > >> #:allowed-references > >> ,@(match (%current-system) > >> - ("powerpc-linux" > >> + ((? target-powerpc?) > > > > I wonder if this would be better as ,@(if target-powerpc? > > I didn't test to see how it would work with cross compiling, I don't > > know if binutils-final gets built in that case. > > Are the final inputs ever cross-compiled? I'm having trouble thinking > of a case when binutils-final would ever be cross-compiled. The package > (like all the final inputs) exist specifically to provide the native GCC > used for building the rest of the things in the system. In a case where > you want to cross-compile e.g. GNU Hello, Guix first uses these final > inputs to (natively) build a cross compilation toolchain, and then it > will use that one to cross-compile GNU Hello. > > I don't think we need to account for cross-compliation of the final > inputs, but please correct me if I'm wrong. > I first tried to cross compile binutils-final from x86_64 but it failed because all the mes packages don't support powerpc yet. Then I tried emulating an aarch64 machine to cross compile binutils-final and that failed at make-boot0. I think we can assume that binutils-final (and the other -final packages) aren't going to be cross compiled. ,@(if might be cleaner to look at, but ,@(match makes it easier to make change later without worrying about nested if statements. Which hopefully shouldn't be an issue anyway for binutils-final. -- Efraim Flashner אפרים פלשנר GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted