[WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler.

DoneSubmitted by Jakub Kądziołka.
Details
3 participants
  • Jakub Kądziołka
  • Ludovic Courtès
  • Marius Bakke
Owner
unassigned
Severity
normal
J
J
Jakub Kądziołka wrote on 4 Nov 2020 14:34
(address . guix-patches@gnu.org)
20201104133427.4120918-1-kuba@kadziolka.net
* gnu/packages/commencement.scm(gcc-toolchain-7): Use MAKE-GCC-TOOLCHAIN.(gcc-toolchain-9): Change to GCC-TOOLCHAIN.* gnu/packages/gcc (gcc): Change from GCC-7 to GCC-9.(gcc-objc): Change to GCC-OBJC-9.(gcc-objc++): Change to GCC-OBJC++-9.---
Dear Guix,
this short patchstack switches the default toolchain to GCC 9 and fixesenough to get hello to compile.
If my memory is correct, one of the cross-compiling target still breaks.I'm not interested in trying to figure out why, so I'm sending the WIPpatches your way.
Regards,Jakub Kądziołka
gnu/packages/commencement.scm | 4 ++-- gnu/packages/gcc.scm | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-)
Toggle diff (66 lines)diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scmindex 1e1c370aa8..6347dd2e1d 100644--- a/gnu/packages/commencement.scm+++ b/gnu/packages/commencement.scm@@ -3868,13 +3868,13 @@ is the GNU Compiler Collection.") (make-gcc-toolchain gcc-6)) (define-public gcc-toolchain-7- gcc-toolchain)+ (make-gcc-toolchain gcc-7)) (define-public gcc-toolchain-8 (make-gcc-toolchain gcc-8)) (define-public gcc-toolchain-9- (make-gcc-toolchain gcc-9))+ gcc-toolchain) (define-public gcc-toolchain-10 (make-gcc-toolchain gcc-10))diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scmindex 4d5aaa7070..ea576dfb8d 100644--- a/gnu/packages/gcc.scm+++ b/gnu/packages/gcc.scm@@ -10,6 +10,7 @@ ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz> ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org> ;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; ;;; This file is part of GNU Guix. ;;;@@ -585,10 +586,9 @@ It also includes runtime support libraries for these languages."))) (patches (search-patches "gcc-9-strmov-store-file-names.patch" "gcc-5.0-libvtv-runpath.patch")))))) -;; Note: When changing the default gcc version, update-;; the gcc-toolchain-* definitions and the gfortran definition-;; accordingly.-(define-public gcc gcc-7)+;; Note: When changing the default gcc version, update the definitions+;; for gcc-toolchain-{old,new}, gcc-objc and gcc-objc++.+(define-public gcc gcc-9) (define-public (make-libstdc++ gcc) "Return a libstdc++ package based on GCC. The primary use case is when@@ -826,7 +826,7 @@ provides the GNU compiler for the Go programming language.")) (custom-gcc gcc-10 "gcc-objc" '("objc") %objc-search-paths)) -(define-public gcc-objc gcc-objc-7)+(define-public gcc-objc gcc-objc-9) (define %objc++-search-paths (list (search-path-specification@@ -868,7 +868,7 @@ provides the GNU compiler for the Go programming language.")) (custom-gcc gcc-10 "gcc-objc++" '("obj-c++") %objc++-search-paths)) -(define-public gcc-objc++ gcc-objc++-7)+(define-public gcc-objc++ gcc-objc++-9) (define (make-libstdc++-doc gcc) "Return a package with the libstdc++ documentation for GCC."-- 2.29.1
J
J
Jakub Kądziołka wrote on 4 Nov 2020 14:36
[WIP PATCH 2/2] gnu: bdb: Fix building with GCC 9.
(address . 44440@debbugs.gnu.org)
20201104133630.4121575-1-kuba@kadziolka.net
* gnu/packages/dbm.scm (bdb-4.8, bdb-5.3)[source]: Apply patch.* gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch: New file.* gnu/local.mk (dist_patch_DATA): Register new file.--- gnu/local.mk | 1 + gnu/packages/dbm.scm | 8 +++++-- .../patches/bdb-5.3-atomics-on-gcc-9.patch | 22 +++++++++++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch
Toggle diff (75 lines)diff --git a/gnu/local.mk b/gnu/local.mkindex 8c93e19b72..5bcb39dc9a 100644--- a/gnu/local.mk+++ b/gnu/local.mk@@ -817,6 +817,7 @@ dist_patch_DATA = \ %D%/packages/patches/bastet-change-source-of-unordered_set.patch \ %D%/packages/patches/bazaar-CVE-2017-14176.patch \ %D%/packages/patches/bc-fix-cross-compilation.patch \+ %D%/packages/patches/bdb-5.3-atomics-on-gcc-9.patch \ %D%/packages/patches/beancount-disable-googleapis-fonts.patch \ %D%/packages/patches/beets-werkzeug-compat.patch \ %D%/packages/patches/behave-skip-a-couple-of-tests.patch \diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scmindex ea812c9715..a1df028d02 100644--- a/gnu/packages/dbm.scm+++ b/gnu/packages/dbm.scm@@ -4,6 +4,7 @@ ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>+;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> ;;; ;;; This file is part of GNU Guix. ;;;@@ -45,7 +46,8 @@ version ".tar.gz")) (sha256 (base32- "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"))))+ "0ampbl2f0hb1nix195kz1syrqqxpmvnvnfvphambj7xjrl3iljg0"))+ (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch")))) (build-system gnu-build-system) (outputs '("out" ; programs, libraries, headers "doc")) ; 94 MiB of HTML docs@@ -108,7 +110,9 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") version ".tar.gz")) (sha256 (base32- "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))))))+ "0a1n5hbl7027fbz5lm0vp0zzfp1hmxnz14wx3zl9563h83br5ag0"))+ (patch-flags '("-p0"))+ (patches (search-patches "bdb-5.3-atomics-on-gcc-9.patch")))))) (define-public bdb-6 (package (inherit bdb-4.8)diff --git a/gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch b/gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patchnew file mode 100644index 0000000000..56d404da15--- /dev/null+++ b/gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch@@ -0,0 +1,22 @@+Patch borrowed from Arch Linux. Allows compiling bdb 5.3 and earlier with GCC newer than 7.++--- src/dbinc/atomic.h 2013-03-12 14:07:22.000000000 -0400++++ src/dbinc/atomic.h.change 2013-03-12 14:06:35.000000000 -0400+@@ -144,7 +144,7 @@+ #define atomic_inc(env, p) __atomic_inc(p)+ #define atomic_dec(env, p) __atomic_dec(p)+ #define atomic_compare_exchange(env, p, o, n) \+- __atomic_compare_exchange((p), (o), (n))++ __atomic_compare_exchange_db((p), (o), (n))+ static inline int __atomic_inc(db_atomic_t *p)+ {+ int temp;+@@ -176,7 +176,7 @@+ * http://gcc.gnu.org/onlinedocs/gcc-4.1.0/gcc/Atomic-Builtins.html+ * which configure could be changed to use.+ */+-static inline int __atomic_compare_exchange(++static inline int __atomic_compare_exchange_db(+ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval)+ {+ atomic_value_t was;-- 2.29.1
L
L
Ludovic Courtès wrote on 10 Nov 2020 23:21
Re: [bug#44440] [WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler.
(name . Jakub Kądziołka)(address . kuba@kadziolka.net)(address . 44440@debbugs.gnu.org)
87ft5gn99i.fsf@gnu.org
Hi Jakub,
Jakub Kądziołka <kuba@kadziolka.net> skribis:
Toggle quote (7 lines)> this short patchstack switches the default toolchain to GCC 9 and fixes> enough to get hello to compile.>> If my memory is correct, one of the cross-compiling target still breaks.> I'm not interested in trying to figure out why, so I'm sending the WIP> patches your way.
Thanks for sharing! I’ll give it a spin on ‘core-updates’ soonish ifnobody beats me at it.
Ludo’.
PS: Congrats for getting #44440! :-)
M
M
Marius Bakke wrote on 17 Dec 2020 00:19
Re: [bug#44440] [WIP PATCH 2/2] gnu: bdb: Fix building with GCC 9.
87eejp8hl6.fsf@gnu.org
Jakub Kądziołka <kuba@kadziolka.net> skriver:
Toggle quote (4 lines)> * gnu/packages/dbm.scm (bdb-4.8, bdb-5.3)[source]: Apply patch.> * gnu/packages/patches/bdb-5.3-atomics-on-gcc-9.patch: New file.> * gnu/local.mk (dist_patch_DATA): Register new file.
I pushed this patch in 04496dc5743d54134405c604ca863ce913283a0e. Theincomplete GCC 9 patch will be dropped in favor of a switch to GCC 10;closing this issue.
Thanks!
-----BEGIN PGP SIGNATURE-----
iQFDBAEBCgAtFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl/alfUPHG1hcml1c0BnbnUub3JnAAoJEKKgbfKjOlT6G2cH/RkznBED9tInnvk6vuS2zjh/d4fU23NRxiIo/XfCcF02gbn84adbr10fiZykTncMb2AxRv/BihDfS/nEvvsEResqVuYAvZzvO0FrREk5fu1tNBNZVweBlHDF0I4/DjZKciM86x17CnytH/kHzJC5cxLs/5boB8Zw34Hg35rUmcD2F1px5UssVZkNRuwlMOfrPodFehEenow1Eo1u1j0/I9q8g5vZ+rBQ2DqkquvnN/UP7iXLq2k7Z67IAr7C/mT5iO+Tn+YJ8vwKdC+drxjHHRS6CFocW1FuYo0f5eA38cDQwKNs5wgmsOsWVyB7b2839VA0/Bg7aR0Ql5DXfvrEhNw==UJLs-----END PGP SIGNATURE-----
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 44440@debbugs.gnu.org