* [bug#44440] [WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler.
@ 2020-11-04 13:34 Jakub Kądziołka
2020-11-04 13:36 ` [bug#44440] [WIP PATCH 2/2] gnu: bdb: Fix building with GCC 9 Jakub Kądziołka
2020-11-10 22:21 ` [bug#44440] [WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler Ludovic Courtès
0 siblings, 2 replies; 4+ messages in thread
From: Jakub Kądziołka @ 2020-11-04 13:34 UTC (permalink / raw)
To: 44440
* 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 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.
Regards,
Jakub Kądziołka
gnu/packages/commencement.scm | 4 ++--
gnu/packages/gcc.scm | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 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.scm
index 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#44440] [WIP PATCH 2/2] gnu: bdb: Fix building with GCC 9.
2020-11-04 13:34 [bug#44440] [WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler Jakub Kądziołka
@ 2020-11-04 13:36 ` Jakub Kądziołka
2020-12-16 23:19 ` bug#44440: " Marius Bakke
2020-11-10 22:21 ` [bug#44440] [WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler Ludovic Courtès
1 sibling, 1 reply; 4+ messages in thread
From: Jakub Kądziołka @ 2020-11-04 13:36 UTC (permalink / raw)
To: 44440
* 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
diff --git a/gnu/local.mk b/gnu/local.mk
index 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.scm
index 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.patch
new file mode 100644
index 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#44440] [WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler.
2020-11-04 13:34 [bug#44440] [WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler Jakub Kądziołka
2020-11-04 13:36 ` [bug#44440] [WIP PATCH 2/2] gnu: bdb: Fix building with GCC 9 Jakub Kądziołka
@ 2020-11-10 22:21 ` Ludovic Courtès
1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2020-11-10 22:21 UTC (permalink / raw)
To: Jakub Kądziołka; +Cc: 44440
Hi Jakub,
Jakub Kądziołka <kuba@kadziolka.net> skribis:
> 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 if
nobody beats me at it.
Ludo’.
PS: Congrats for getting #44440! :-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#44440: [WIP PATCH 2/2] gnu: bdb: Fix building with GCC 9.
2020-11-04 13:36 ` [bug#44440] [WIP PATCH 2/2] gnu: bdb: Fix building with GCC 9 Jakub Kądziołka
@ 2020-12-16 23:19 ` Marius Bakke
0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2020-12-16 23:19 UTC (permalink / raw)
To: Jakub Kądziołka, 44440-done
[-- Attachment #1: Type: text/plain, Size: 419 bytes --]
Jakub Kądziołka <kuba@kadziolka.net> skriver:
> * 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. The
incomplete GCC 9 patch will be dropped in favor of a switch to GCC 10;
closing this issue.
Thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 507 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-12-16 23:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 13:34 [bug#44440] [WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler Jakub Kądziołka
2020-11-04 13:36 ` [bug#44440] [WIP PATCH 2/2] gnu: bdb: Fix building with GCC 9 Jakub Kądziołka
2020-12-16 23:19 ` bug#44440: " Marius Bakke
2020-11-10 22:21 ` [bug#44440] [WIP PATCH 1/2] gnu: Use GCC 9 as the default compiler Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).