* [bug#57533] [PATCH core-updates 2/5] syscalls: Adjust for glibc 2.34 and later.
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 1/5] gnu: glibc: Update to 2.35 Marius Bakke
@ 2022-09-01 22:29 ` Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 3/5] gnu: Switch to GCC 11 Marius Bakke
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Marius Bakke @ 2022-09-01 22:29 UTC (permalink / raw)
To: 57533
* guix/build/syscalls.scm (openpty, login-tty): Remove #:library argument, as
these functions have been moved to libc.so.
---
guix/build/syscalls.scm | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index eda487f52e..7c88ccdd5a 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -2319,8 +2319,7 @@ (define* (terminal-rows #:optional (port (current-output-port)))
(terminal-dimension window-size-rows port (const 25)))
(define openpty
- (let ((proc (syscall->procedure int "openpty" '(* * * * *)
- #:library "libutil")))
+ (let ((proc (syscall->procedure int "openpty" '(* * * * *))))
(lambda ()
"Return two file descriptors: one for the pseudo-terminal control side,
and one for the controlled side."
@@ -2341,8 +2340,7 @@ (define openpty
(values (* head) (* inferior)))))))
(define login-tty
- (let* ((proc (syscall->procedure int "login_tty" (list int)
- #:library "libutil")))
+ (let* ((proc (syscall->procedure int "login_tty" (list int))))
(lambda (fd)
"Make FD the controlling terminal of the current process (with the
TIOCSCTTY ioctl), redirect standard input, standard output and standard error
--
2.37.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#57533] [PATCH core-updates 3/5] gnu: Switch to GCC 11.
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 1/5] gnu: glibc: Update to 2.35 Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 2/5] syscalls: Adjust for glibc 2.34 and later Marius Bakke
@ 2022-09-01 22:29 ` Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 4/5] gnu: glm: Fix build with " Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 5/5] gnu: clang-runtime: Remove obsolete workaround Marius Bakke
3 siblings, 0 replies; 7+ messages in thread
From: Marius Bakke @ 2022-09-01 22:29 UTC (permalink / raw)
To: 57533
* gnu/packages/commencement.scm (gcc-boot0)[source]: Delete offending files
from GCC.
(libstdc++-boot0)[arguments]: Add #:modules.
(libstdc++): Inherit from from GCC-BOOT0 rather than GCC.
(gcc-final)[arguments]: Add phase to workaround libstdc++ build system issue.
Add #:modules.
* gnu/packages/gcc.scm (make-libstdc++): Likewise.
---
gnu/packages/commencement.scm | 55 ++++++++++++++++++++++++++++++-----
gnu/packages/gcc.scm | 33 ++++++++++++++++++---
2 files changed, 77 insertions(+), 11 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 0dbd39382e..a27340c14d 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2213,7 +2213,13 @@ (define libstdc++-boot0
(lambda _
(substitute* "libstdc++-v3/configure"
(("g\\+\\+ -v") "true"))))))))
- (_ (package-arguments lib)))))
+ (_ (package-arguments lib)))
+
+ ;; Explicitly add #:modules so MAKE-LIBSTDC++ can be changed
+ ;; without a full bootstrap.
+ #:modules ((guix build gnu-build-system)
+ (guix build utils))))
+
(inputs (%boot0-inputs))
(native-inputs '()))))
@@ -2266,7 +2272,18 @@ (define gcc-boot0
(inherit gcc)
(name "gcc-cross-boot0")
(outputs (delete "debug" (package-outputs gcc)))
- (source (bootstrap-origin (package-source gcc)))
+ (source
+ (bootstrap-origin
+ (origin
+ (inherit (package-source gcc))
+ (snippet
+ #~(begin
+ ;; XXX: The GCC test suite contains files with non-ASCII file
+ ;; names, which cannot be repacked by BOOTSTRAP-ORIGIN. Nor
+ ;; can it be deleted from Guile, so resort to this evil hack.
+ #$(origin-snippet (package-source gcc))
+ (system* #$(file-append coreutils-boot0 "/bin/rm") "-rf"
+ "gcc/testsuite/go.test/test/fixedbugs/issue27836.dir"))))))
(arguments
`(#:guile ,%bootstrap-guile
#:implicit-inputs? #f
@@ -2991,7 +3008,7 @@ (define binutils-final
(define libstdc++
;; Intermediate libstdc++ that will allow us to build the final GCC
;; (remember that GCC-BOOT0 cannot build libstdc++.)
- (let ((lib (make-libstdc++ gcc)))
+ (let ((lib (make-libstdc++ gcc-boot0)))
(package
(inherit lib)
(source (bootstrap-origin (package-source lib)))
@@ -3059,6 +3076,11 @@ (define gcc-final
;; positive, so turn it off.
#:validate-runpath? #f
+ ;; Additional modules for the libstdc++ phase below.
+ #:modules ((srfi srfi-1)
+ (srfi srfi-26)
+ ,@%gnu-build-system-modules)
+
,@(substitute-keyword-arguments (package-arguments gcc)
((#:make-flags flags)
;; Since $LIBRARY_PATH is not honored, add the relevant flags.
@@ -3096,7 +3118,26 @@ (define gcc-final
(package-full-name lib "-")
char-set:letter)
,(package-name lib)))
- (list gmp-6.0 mpfr mpc))))))))))
+ (list gmp-6.0 mpfr mpc)))))
+ (add-after 'unpack 'fix-build-with-external-libstdc++
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libstdc++ (assoc-ref inputs "libstdc++")))
+ ;; Fix a regression in GCC 11 where the libstc++ input
+ ;; shadows glibc headers when building libstdc++. An
+ ;; upstream fix was added in GCC 11.3.0, but it only
+ ;; hides system include directories, not those on
+ ;; CPLUS_INCLUDE_PATH. See discussion at
+ ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017>.
+ (substitute* "libstdc++-v3/src/c++17/Makefile.in"
+ (("AM_CXXFLAGS = ")
+ (string-append "CPLUS_INCLUDE_PATH = "
+ (string-join
+ (remove (cut string-prefix? libstdc++ <>)
+ (string-split
+ (getenv "CPLUS_INCLUDE_PATH")
+ #\:))
+ ":")
+ "\nAM_CXXFLAGS = ")))))))))))
;; This time we want Texinfo, so we get the manual. Add
;; STATIC-BASH-FOR-GLIBC so that it's used in the final shebangs of
@@ -3407,10 +3448,10 @@ (define-public gcc-toolchain-9
(make-gcc-toolchain gcc-9))
(define-public gcc-toolchain-10
- gcc-toolchain)
+ (make-gcc-toolchain gcc-10))
(define-public gcc-toolchain-11
- (make-gcc-toolchain gcc-11))
+ gcc-toolchain)
(define-public gcc-toolchain-12
(make-gcc-toolchain gcc-12))
@@ -3418,7 +3459,7 @@ (define-public gcc-toolchain-12
(define-public gcc-toolchain-aka-gcc
;; It's natural for users to try "guix install gcc". This package
;; automatically "redirects" them to 'gcc-toolchain'.
- (deprecated-package "gcc" gcc-toolchain-10))
+ (deprecated-package "gcc" gcc-toolchain-11))
(define-public gdc-toolchain-10
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index b6854813d7..80eaec722a 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -6,7 +6,7 @@
;;; Copyright © 2015, 2016, 2017, 2018, 2020, 2021, 2022 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>
-;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2020, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
;;; Copyright © 2020 Simon Tournier <zimon.toutoune@gmail.com>
@@ -718,7 +718,7 @@ (define-public gcc-12
;; Note: When changing the default gcc version, update
;; the gcc-toolchain-* definitions.
-(define-public gcc gcc-10)
+(define-public gcc gcc-11)
\f
;;;
@@ -821,8 +821,33 @@ (define-public (make-libstdc++ gcc)
(name "libstdc++")
(arguments
`(#:out-of-source? #t
+ #:modules ((srfi srfi-1)
+ (srfi srfi-26)
+ ,@%gnu-build-system-modules)
#:phases
(modify-phases %standard-phases
+ ,@(if (version>=? (package-version gcc) "11")
+ '((add-after 'unpack 'hide-gcc-headers
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (let ((gcc (assoc-ref (or native-inputs inputs) "gcc")))
+ ;; Fix a regression in GCC 11 where the GCC headers
+ ;; shadows glibc headers when building libstdc++. An
+ ;; upstream fix was added in GCC 11.3.0, but it only
+ ;; hides system include directories, not those on
+ ;; CPLUS_INCLUDE_PATH. See discussion at
+ ;; <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017>
+ ;; and the similar adjustment in GCC-FINAL.
+ (substitute* "libstdc++-v3/src/c++17/Makefile.in"
+ (("AM_CXXFLAGS = ")
+ (string-append "CPLUS_INCLUDE_PATH = "
+ (string-join
+ (remove (cut string-prefix? gcc <>)
+ (string-split
+ (getenv "CPLUS_INCLUDE_PATH")
+ #\:))
+ ":")
+ "\nAM_CXXFLAGS = ")))))))
+ '())
;; Force rs6000 (i.e., powerpc) libdir to be /lib and not /lib64.
(add-before 'chdir 'fix-rs6000-libdir
(lambda _
@@ -1109,7 +1134,7 @@ (define-public gcc-objc-12
(custom-gcc gcc-12 "gcc-objc" '("objc")
%objc-search-paths))
-(define-public gcc-objc gcc-objc-10)
+(define-public gcc-objc gcc-objc-11)
(define %objc++-search-paths
(list (search-path-specification
@@ -1159,7 +1184,7 @@ (define-public gcc-objc++-12
(custom-gcc gcc-12 "gcc-objc++" '("obj-c++")
%objc++-search-paths))
-(define-public gcc-objc++ gcc-objc++-10)
+(define-public gcc-objc++ gcc-objc++-11)
(define (make-libstdc++-doc gcc)
"Return a package with the libstdc++ documentation for GCC."
--
2.37.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [bug#57533] [PATCH core-updates 4/5] gnu: glm: Fix build with GCC 11.
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 1/5] gnu: glibc: Update to 2.35 Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 2/5] syscalls: Adjust for glibc 2.34 and later Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 3/5] gnu: Switch to GCC 11 Marius Bakke
@ 2022-09-01 22:29 ` Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 5/5] gnu: clang-runtime: Remove obsolete workaround Marius Bakke
3 siblings, 0 replies; 7+ messages in thread
From: Marius Bakke @ 2022-09-01 22:29 UTC (permalink / raw)
To: 57533
* gnu/packages/maths.scm (glm)[arguments]: Add phase set-environment.
---
gnu/packages/maths.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 6e9786a474..aa15666a5c 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -26,7 +26,7 @@
;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
;;; Copyright © 2018 Nadya Voronova <voronovank@gmail.com>
;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
-;;; Copyright © 2018, 2020, 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2018, 2020-2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
;;; Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
@@ -5111,6 +5111,13 @@ (define-public glm
(build-system cmake-build-system)
(arguments
`(#:phases (modify-phases %standard-phases
+ (add-before 'configure 'set-environment
+ (lambda _
+ ;; Pass "-fno-ipa-modref" flag to the compiler to work
+ ;; around a test failure with GCC 11. This is a
+ ;; header-only library so these flags only affect tests.
+ ;; See <https://github.com/g-truc/glm/pull/1087>.
+ (setenv "CXXFLAGS" "-O2 -g -fno-ipa-modref")))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
;; Since version 0.9.9.6, 'make install' is not supported
--
2.37.2
^ permalink raw reply related [flat|nested] 7+ messages in thread