aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/gcc.scm
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2023-04-13 11:46:47 +0200
committerChristopher Baines <mail@cbaines.net>2023-04-14 11:14:47 +0100
commit31dd526e1cfc3a70c72c8906bef8f26b91f39ce4 (patch)
treec4049f9c9332c9d91fbd3fe424c6992cf8131c8e /gnu/packages/gcc.scm
parent66b5d33c4ff8d146fa7f0e6e642008ac7e8cfb9d (diff)
downloadguix-31dd526e1cfc3a70c72c8906bef8f26b91f39ce4.tar
guix-31dd526e1cfc3a70c72c8906bef8f26b91f39ce4.tar.gz
gnu: gcc-11: Fix build on powerpc64le.
* gnu/packages/patches/gcc-11-libstdc++-powerpc.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/gcc.scm (make-libstdc++): Apply patch for gcc versions >= 11 and < 12 on ppc64le. Co-authored-by: Christopher Baines <mail@cbaines.net> Signed-off-by: Christopher Baines <mail@cbaines.net>
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r--gnu/packages/gcc.scm20
1 files changed, 18 insertions, 2 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index a511cdbc45..5b1ef83ce6 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2012-2023 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
-;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
+;;; Copyright © 2015, 2023 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015-2018, 2020-2023 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
@@ -889,6 +889,15 @@ using compilers other than GCC."
":")
"\nAM_CXXFLAGS = ")))))))
'())
+ ,@(let ((version (package-version gcc)))
+ (if (and (target-ppc64le?)
+ (version>=? version "11")
+ (not (version>=? version "12")))
+ `((add-after 'unpack 'patch-powerpc
+ (lambda* (#:key inputs #:allow-other-keys)
+ (invoke "patch" "--force" "-p1" "-i"
+ (assoc-ref inputs "powerpc64le-patch")))))
+ '()))
;; Force rs6000 (i.e., powerpc) libdir to be /lib and not /lib64.
(add-before 'chdir 'fix-rs6000-libdir
(lambda _
@@ -905,7 +914,14 @@ using compilers other than GCC."
"/include"))))
(outputs '("out" "debug"))
(inputs '())
- (native-inputs '())
+ (native-inputs
+ `(,@(if (and (target-ppc64le?)
+ (let ((version (package-version gcc)))
+ (and
+ (version>=? version "11")
+ (not (version>=? version "12")))))
+ `(("powerpc64le-patch" ,(search-patch "gcc-11-libstdc++-powerpc.patch")))
+ '())))
(propagated-inputs '())
(synopsis "GNU C++ standard library")))