[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
73/74: REMOVEME gnu: Add gcc-11-fixed, enhancing `relax-gcc-14s-strictne
From: |
guix-commits |
Subject: |
73/74: REMOVEME gnu: Add gcc-11-fixed, enhancing `relax-gcc-14s-strictness' stage. |
Date: |
Sun, 15 Dec 2024 10:03:30 -0500 (EST) |
janneke pushed a commit to branch core-packages-team
in repository guix.
commit 24e85f006d2b0a58738948ac882635e294dd2c31
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sun Dec 15 14:12:12 2024 +0100
REMOVEME gnu: Add gcc-11-fixed, enhancing `relax-gcc-14s-strictness' stage.
We (most probably) want to move this enhanced stage to gcc-4.7 (or else
another gcc version gcc-8? that needs this).
Sadly, this still fails with the same error as gcc-13
<https://dezyne.org/janneke/hurd/nyxp2g2il9bg1p3aw72hk1d788xqxf-gcc-13.3.0.drv.gz>
../../../../gcc-11.4.0/libstdc++-v3/src/c++98/compatibility.cc:392:4:
error: ‘void
{anonymous}::_Y_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEi(...)’ aliased
to undefined symbol ‘_ZNSt13basic_istreamIwSt11char_traitsIwEE8ignoreXXEi’
392 | _Y##name(...) \
| ^~
../../../../gcc-11.4.0/libstdc++-v3/src/c++98/compatibility.cc:403:31:
note: in expansion of macro ‘_GLIBCXX_3_4_5_SYMVER’
403 | #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_5_SYMVER
| ^~~~~~~~~~~~~~~~~~~~~
/tmp/guix-build-gcc-fixed-11.4.0.drv-0/build/x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu/bits/compatibility.h:196:1:
note: in expansion of macro ‘_GLIBCXX_APPLY_SYMVER’
196 |
_GLIBCXX_APPLY_SYMVER(_ZNSt13basic_istreamIwSt11char_traitsIwEE8ignoreXXEi,
| ^~~~~~~~~~~~~~~~~~~~~
* gnu/packages/gcc.scm (gcc-11-fixed): New variable.
Change-Id: Ic8ff548834589eb32b774380964fa542029476d1
---
gnu/packages/gcc.scm | 58 ++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 50 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 76e8418445..51e5184daf 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -794,6 +794,48 @@ It also includes runtime support libraries for these
languages.")
("x86_64" ,@%gcc-11-x86_64-micro-architectures))
,@(package-properties gcc-8)))))
+(define-public gcc-11-fixed
+ (package
+ (inherit gcc-11)
+ (name "gcc-fixed")
+ (arguments
+ (substitute-keyword-arguments (package-arguments gcc-8)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (replace '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 _
+ ;; implicit-function-declaration: for gmp
+ ;; incompatible-pointer-types: for gcc-11
+ (format #t "#! ~a/bin/bash
+exec gcc \"$@\" \
+ -Wno-error \
+ -Wno-error=implicit-function-declaration \
+ -Wno-error=incompatible-pointer-types"
+ bash)))
+ (chmod wrapper #o555)
+ (with-output-to-file stage-wrapper
+ (lambda _
+ (format #t "#! ~a/bin/bash
+exec \"$@\" \
+ -Wno-error \
+ -Wno-error=implicit-function-declaration \
+ -Wno-error=incompatible-pointer-types"
+ 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))))))))))))
+
(define-public gcc-12
(package
(inherit gcc-11)
@@ -811,14 +853,14 @@ It also includes runtime support libraries for these
languages.")
"gcc-11-libstdc++-hurd-libpthread.patch"))
(modules '((guix build utils)))
(snippet gcc-canadian-cross-objdump-snippet)))
- (properties
- `((compiler-cpu-architectures
- ("aarch64" ,@%gcc-12-aarch64-micro-architectures)
- ("armhf" ,@%gcc-12-armhf-micro-architectures)
- ("i686" ,@%gcc-12-x86_64-micro-architectures)
- ("powerpc64le" ,@%gcc-10-ppc64le-micro-architectures)
- ("x86_64" ,@%gcc-12-x86_64-micro-architectures))
- ,@(package-properties gcc-11)))))
+ (properties
+ `((compiler-cpu-architectures
+ ("aarch64" ,@%gcc-12-aarch64-micro-architectures)
+ ("armhf" ,@%gcc-12-armhf-micro-architectures)
+ ("i686" ,@%gcc-12-x86_64-micro-architectures)
+ ("powerpc64le" ,@%gcc-10-ppc64le-micro-architectures)
+ ("x86_64" ,@%gcc-12-x86_64-micro-architectures))
+ ,@(package-properties gcc-11)))))
(define-public gcc-13
(package
- 61/74: gnu: libssh: Use -Wno-error= for Hurd cross-build., (continued)
- 61/74: gnu: libssh: Use -Wno-error= for Hurd cross-build., guix-commits, 2024/12/15
- 59/74: gnu: libedit: Use -Wno-error= for cross-build., guix-commits, 2024/12/15
- 64/74: gnu: bootstrap: %bootstrap-glibc: Patch more files., guix-commits, 2024/12/15
- 68/74: gnu: clang-runtime: Remove gcc-12,13,14 from native-ipnuts., guix-commits, 2024/12/15
- 66/74: gnu: gcc-4.7: Add gcc-wrapper from gcc-final., guix-commits, 2024/12/15
- 69/74: guix: build-system: cmake: Rework cross compilation., guix-commits, 2024/12/15
- 67/74: bash-minimal: Use gcc-14 hurd/x86-linux build fix for all platforms., guix-commits, 2024/12/15
- 70/74: gnu: ath9k-firmware: Remove CMAKE_SYSTEM_NAME override., guix-commits, 2024/12/15
- 71/74: DRAFT gnu: gcc: Update gcc, gcc-toolchain, libgccjit to 14., guix-commits, 2024/12/15
- 74/74: squash! REMOVEME gnu: Add gcc-11-fixed, enhancing `relax-gcc-14s-strictness' stage., guix-commits, 2024/12/15
- 73/74: REMOVEME gnu: Add gcc-11-fixed, enhancing `relax-gcc-14s-strictness' stage.,
guix-commits <=