From 6e98e9ca9237eb6a9830e9c65006a3ca534c94d0 Mon Sep 17 00:00:00 2001 From: Leo Le Bouter Date: Sat, 6 Feb 2021 20:02:31 +0100 Subject: gnu: glibc: Fix ldd path on powerpc*. This should avoid some problems, such as "not a dynamic executable" errors. * gnu/packages/patches/glibc-ldd-powerpc.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/base.scm: (glibc)[native-inputs]: Add it. [arguments]: When building for powerpc* apply it. * gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash, glibc-final)[native-inputs]: Add patch conditionally. This patch has been adjusted to apply to master. Signed-off-by: Chris Marusich Signed-off-by: Efraim Flashner --- gnu/packages/commencement.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 432910d7a3..93b0c50882 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3313,7 +3313,11 @@ memoized as a function of '%current-system'." `(("bison" ,bison-boot0) ("texinfo" ,texinfo-boot0) ("perl" ,perl-boot0) - ("python" ,python-boot0))) + ("python" ,python-boot0) + ,@(if (target-powerpc?) + `(("powerpc64le-patch" ,@(search-patches + "glibc-ldd-powerpc.patch"))) + '()))) (inputs `( ;; The boot inputs. That includes the bootstrap libc. We don't want ;; it in $CPATH, hence the 'pre-configure' phase above. @@ -3464,6 +3468,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ;; This time we need 'msgfmt' to install all the libc.mo files. (native-inputs `(,@(package-native-inputs glibc-final-with-bootstrap-bash) + ,@(if (target-powerpc?) + `(("powerpc64le-patch" ,@(search-patches + "glibc-ldd-powerpc.patch"))) + '()) ("gettext" ,gettext-boot0))) (propagated-inputs -- cgit v1.2.3 From b2135b5d576573115c1db9bc6b54d52452d44bee Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Sun, 31 Jan 2021 18:45:24 -0800 Subject: gnu: gcc-boot0: Enable 128-bit long double for POWER9. * gnu/packages/commencement.scm (gcc-boot0) [#:configure-flags]: Add --with-long-double-128 when the boot triplet is "powerpc64le-guix-linux-gnu", instead of "powerpc64le-linux-gnu", which is incorrect. The actual triplet used during bootstrapping is "powerpc64le-guix-linux-gnu". --- gnu/packages/commencement.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 93b0c50882..86bc7a602d 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2019, 2020 Marius Bakke ;;; Copyright © 2020 Timothy Sample ;;; Copyright © 2020 Guy Fleury Iteriteka +;;; Copyright © 2021 Chris Marusich ;;; ;;; This file is part of GNU Guix. ;;; @@ -2818,7 +2819,8 @@ exec " gcc "/bin/" program "--disable-shared" "--enable-languages=c,c++" - ,@(if (equal? "powerpc64le-linux-gnu" (boot-triplet)) + ;; boot-triplet inserts "guix" in the triplet. + ,@(if (equal? "powerpc64le-guix-linux-gnu" (boot-triplet)) ;; On POWER9 (little endian) glibc needs the ;; 128-bit long double type. '("--with-long-double-128") -- cgit v1.2.3 From 060478c32c9c548254fe3649426453b50c86a84f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 19 Apr 2020 18:55:57 +0300 Subject: gnu: binutils-final: Provide bash for binary on powerpc-linux. * gnu/packages/commencement.scm (binutils-final)[arguments]: On powerpc-linux allow a reference to static-bash-for-glibc. [inputs]: On powerpc-linux add static-bash-for-glibc. --- gnu/packages/commencement.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 86bc7a602d..c0732bbf62 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3514,9 +3514,19 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (arguments `(#:guile ,%bootstrap-guile #:implicit-inputs? #f - #:allowed-references ("out" ,glibc-final) + #:allowed-references + ,@(match (%current-system) + ("powerpc-linux" + `(("out" ,glibc-final ,static-bash-for-glibc))) + (_ + `(("out" ,glibc-final)))) ,@(package-arguments binutils))) - (inputs (%boot2-inputs)))) + (inputs + (match (%current-system) + ("powerpc-linux" + `(("bash" ,static-bash-for-glibc) + ,@(%boot2-inputs))) + (_ (%boot2-inputs)))))) (define libstdc++ ;; Intermediate libstdc++ that will allow us to build the final GCC -- cgit v1.2.3 From be4b1cf53bdcdc5d60d21075d668d944c11e0598 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Tue, 2 Feb 2021 00:13:48 -0800 Subject: gnu: binutils-final: Support more Power architectures. * 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(-) (limited to 'gnu/packages/commencement.scm') diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index c0732bbf62..d4511ed914 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?) `(("out" ,glibc-final ,static-bash-for-glibc))) (_ `(("out" ,glibc-final)))) ,@(package-arguments binutils))) (inputs (match (%current-system) - ("powerpc-linux" + ((? target-powerpc?) `(("bash" ,static-bash-for-glibc) ,@(%boot2-inputs))) (_ (%boot2-inputs)))))) -- cgit v1.2.3