[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
66/74: gnu: gcc-4.7: Add gcc-wrapper from gcc-final.
From: |
guix-commits |
Subject: |
66/74: gnu: gcc-4.7: Add gcc-wrapper from gcc-final. |
Date: |
Mon, 16 Dec 2024 03:35:02 -0500 (EST) |
janneke pushed a commit to branch core-packages-team
in repository guix.
commit 2d59a20449fbdd0bf27c62882df96fdbabfc2839
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Thu Dec 12 12:34:03 2024 +0100
gnu: gcc-4.7: Add gcc-wrapper from gcc-final.
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: Remove CC_FOR_BUILD
strictness
relaxing from #:make-flags.
(gcc-final)[arguments]: Move stage "create-stage-wrapper" and related
settings
in #:configure-flags and #:make-flags to...
* gnu/packages/gcc.scm (gcc-4.7)[arguments]: ...new
"relax-gcc-14s-strictness
stage here.
Change-Id: I0c372a4f372281b54e44dd446b6e5ddac5841c5a
---
gnu/packages/commencement.scm | 39 +++++----------------------------------
gnu/packages/gcc.scm | 29 +++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 3d35fa04d1..e1c7082753 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2399,13 +2399,7 @@ exec " gcc "/bin/" program
,(glibc-dynamic-linker
(match (%current-system)
("x86_64-linux" "i686-linux")
- (_ (%current-system))))))
- (if (target-hurd64?)
- ;;Convince gmp's configure that gcc works
- (list (string-append
- "CC_FOR_BUILD=gcc"
- " -Wno-implicit-function-declaration"))
- '())))))
+ (_ (%current-system))))))))))
((#:phases phases)
#~(modify-phases #$phases
(add-after 'unpack 'unpack-gmp&co
@@ -3275,24 +3269,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker
-Wl,~a/~a \"$@\"~%"
"/lib -L" zlib "/lib -Wl,-rpath="
zlib "/lib")
flag))
- #$(if (or (target-hurd64?)
- (and (target-x86?) (target-linux?)))
- `(cons
- (string-append
- ;;Convince gmp's configure that gcc works
- "STAGE_CC_WRAPPER=" (getcwd) "/build/gcc.sh")
- ,flags)
- flags))))
+ #$flags)))
((#:configure-flags flags)
+ ;; XXX FIXME: Does this need to stay separate?
(if (or (target-hurd64?)
(and (target-x86?) (target-linux?)))
#~(append
#$flags
- (list #$(string-append
- ;;Convince gmp's configure that gcc works
- "CC=gcc"
- " -Wno-implicit-function-declaration")
- "--disable-plugin"))
+ (list "--disable-plugin"))
flags))
;; Build again GMP & co. within GCC's build process, because it's hard
;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus
@@ -3338,20 +3322,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a
\"$@\"~%"
(getenv "CPLUS_INCLUDE_PATH")
#\:))
":")
- "\nAM_CXXFLAGS = "))))))
- #$@(if (or (target-hurd64?)
- (and (target-x86?) (target-linux?)))
- #~((add-after 'configure 'create-stage-wrapper
- (lambda _
- (with-output-to-file "gcc.sh"
- (lambda _
- (format #t "#! ~a/bin/bash
-exec \"$@\" \
- -Wno-error \
- -Wno-implicit-function-declaration"
- #$static-bash-for-glibc)))
- (chmod "gcc.sh" #o555))))
- #~()))))))
+ "\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
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 6fdc47dc94..35e8264822 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -238,6 +238,35 @@ where the OS part is overloaded to denote a specific
ABI---into GCC
#:phases
(modify-phases %standard-phases
+ (add-before 'configure 'relax-gcc-14s-strictness
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((bash (assoc-ref inputs "bash"))
+ (wrapper (string-append (getcwd) "/gcc.sh"))
+ (stage-wrapper (string-append (getcwd) "/stage-gcc.sh")))
+ (with-output-to-file wrapper
+ (lambda _
+ (format #t "#! ~a/bin/bash
+exec gcc \"$@\" \
+ -Wno-error \
+ -Wno-error=implicit-function-declaration"
+ bash)))
+ (chmod wrapper #o555)
+ (with-output-to-file stage-wrapper
+ (lambda _
+ (format #t "#! ~a/bin/bash
+exec \"$@\" \
+ -Wno-error \
+ -Wno-error=implicit-function-declaration"
+ bash)))
+ (chmod stage-wrapper #o555)
+ ;; Rather than adding CC to #:configure-flags and
+ ;; STAGE_CC_WRAPPER to #:make-flags, we add them to the
+ ;; environment in this easily removable stage.
+ (cond (,(%current-target-system) ;cross-build?
+ (setenv "CC_FOR_BUILD" wrapper))
+ (else
+ (setenv "CC" wrapper)
+ (setenv "STAGE_CC_WRAPPER" stage-wrapper))))))
(add-before 'configure 'pre-configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((libdir ,(libdir))
- 24/74: gnu: go-1.21.5: Skip test failing with gcc-14., (continued)
- 24/74: gnu: go-1.21.5: Skip test failing with gcc-14., guix-commits, 2024/12/16
- 26/74: gnu: xmlto: Fix build with gcc-14., guix-commits, 2024/12/16
- 49/74: gnu: Use cryptsetup-minimal instead of cryptsetup., guix-commits, 2024/12/16
- 35/74: gnu: zziplib: Update to 0.13.78; fixes build with gcc-14., guix-commits, 2024/12/16
- 46/74: gnu: pth: Fix build with gcc-14., guix-commits, 2024/12/16
- 53/74: gnu: slim: Fix build with gcc-14., guix-commits, 2024/12/16
- 52/74: gnu: talloc: Update to 2.4.2; fixes build with gcc-14., guix-commits, 2024/12/16
- 60/74: gnu: m4: Use -Wno-error= for Hurd cross-build., guix-commits, 2024/12/16
- 59/74: gnu: libedit: Use -Wno-error= for cross-build., guix-commits, 2024/12/16
- 73/74: gnu: ath9k-firmware: Remove CMAKE_SYSTEM_NAME override., guix-commits, 2024/12/16
- 66/74: gnu: gcc-4.7: Add gcc-wrapper from gcc-final.,
guix-commits <=
- 65/74: gnu: bootstrap: %bootstrap-glibc: Fix linking on armhf-linux., guix-commits, 2024/12/16
- 69/74: gnu: gcc-4.7: Fix build with gcc-14., guix-commits, 2024/12/16
- 58/74: gnu: netdde: Use -Wno-error=., guix-commits, 2024/12/16
- 72/74: guix: build-system: cmake: Rework cross compilation., guix-commits, 2024/12/16
- 36/74: gnu: texlive-xdvi-bin: Fix build with gcc-14., guix-commits, 2024/12/16
- 64/74: gnu: bootstrap: %bootstrap-glibc: Patch more files., guix-commits, 2024/12/16
- 40/74: gnu: jack-1: Fix build with gcc-14., guix-commits, 2024/12/16
- 63/74: gnu: git: Use -Wno-error= for Hurd cross-build., guix-commits, 2024/12/16
- 74/74: DRAFT gnu: gcc: Update gcc, gcc-toolchain, libgccjit to 14., guix-commits, 2024/12/16
- 20/74: gnu: libstdc++: Fix build for x86-linux with gcc-14., guix-commits, 2024/12/16