[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
58/58: gnu: commencement: gcc-final: Support the 64bit Hurd.
From: |
guix-commits |
Subject: |
58/58: gnu: commencement: gcc-final: Support the 64bit Hurd. |
Date: |
Sun, 24 Nov 2024 02:50:43 -0500 (EST) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit b51632cfa48c0c2a56030b6459e921070286b1b2
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Nov 20 22:45:09 2024 +0100
gnu: commencement: gcc-final: Support the 64bit Hurd.
* gnu/packages/commencement.scm (gcc-final)[arguments]: When building for
the
64bit Hurd, create a gcc wrapper in phase "create-stage-wrapper", use it
by adding STAGE_CC_WRAPPER to #:make-flags, and CC to #:configure-flags
to convince configure gmp that gcc and g++ work.
Change-Id: I939c03c6c0fd9698efc4b293e59cf576249e3b77
---
gnu/packages/commencement.scm | 37 ++++++++++++++++++++++++++++++++++---
1 file changed, 34 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 3dbd27b660..4368893f4d 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3255,13 +3255,32 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker
-Wl,~a/~a \"$@\"~%"
;; Since $LIBRARY_PATH is not honored, add the relevant flags.
#~(let ((zlib (assoc-ref %build-inputs "zlib")))
(map (lambda (flag)
- (if (string-prefix? "LDFLAGS=" flag)
+ (if #$(if (target-hurd64?)
+ #~(and (string? flag)
+ (string-prefix? "LDFLAGS=" flag))
+ #~(string-prefix? "LDFLAGS=" flag))
(string-append flag " -L"
(assoc-ref %build-inputs "libstdc++")
"/lib -L" zlib "/lib -Wl,-rpath="
zlib "/lib")
flag))
- #$flags)))
+ #$(if (target-hurd64?)
+ `(cons
+ (string-append
+ ;;Convince gmp's configure that gcc works
+ "STAGE_CC_WRAPPER=" (getcwd) "/build/gcc.sh")
+ ,flags)
+ flags))))
+ ((#:configure-flags flags)
+ (if (target-hurd64?)
+ #~(append
+ #$flags
+ (list #$(string-append
+ ;;Convince gmp's configure that gcc works
+ "CC=gcc"
+ " -Wno-implicit-function-declaration")
+ "--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
;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.)
@@ -3306,7 +3325,19 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a
\"$@\"~%"
(getenv "CPLUS_INCLUDE_PATH")
#\:))
":")
- "\nAM_CXXFLAGS = ")))))))))))
+ "\nAM_CXXFLAGS = "))))))
+ #$@(if (target-hurd64?)
+ #~((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))))
+ #~()))))))
;; 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
- 07/58: gnu: elfutils: Fix build for 64bit Hurd., (continued)
- 07/58: gnu: elfutils: Fix build for 64bit Hurd., guix-commits, 2024/11/24
- 08/58: gnu: grep: Fix build for the 64bit Hurd., guix-commits, 2024/11/24
- 09/58: gnu: patch: Fix build for the 64bit Hurd., guix-commits, 2024/11/24
- 04/58: gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd., guix-commits, 2024/11/24
- 23/58: gnu: guile-lzlib: Support [cross-]build with gcc-14 and the 64bit Hurd., guix-commits, 2024/11/24
- 39/58: gnu: inetutils: Fix build for the 64bit Hurd., guix-commits, 2024/11/24
- 41/58: gnu: guile-fibers: Fix build for the 64bit Hurd., guix-commits, 2024/11/24
- 44/58: gnu: commencement: mig-boot0: Update to 1.8+git20231217.., guix-commits, 2024/11/24
- 47/58: gnu: gettext: Fix cross-build shebangs., guix-commits, 2024/11/24
- 50/58: system: examples: Add bare-hurd64.tmpl., guix-commits, 2024/11/24
- 58/58: gnu: commencement: gcc-final: Support the 64bit Hurd.,
guix-commits <=
- 26/58: gnu: glibc/hurd: Add patch for the 64bit Hurd, fixing "raise"., guix-commits, 2024/11/24
- 27/58: gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd., guix-commits, 2024/11/24
- 02/58: gnu: mig: Update to 1.8+git20231217., guix-commits, 2024/11/24
- 14/58: gnu: git-minimal: Support [cross-]build with gcc-14 and the 64bit Hurd., guix-commits, 2024/11/24
- 13/58: gnu: bash: Avoid hang when cross-built for the Hurd., guix-commits, 2024/11/24
- 19/58: gnu: hurd: Fix build with gcc-14., guix-commits, 2024/11/24
- 17/58: gnu: perl: Support [cross-]build with gcc-14 and the 64bit Hurd., guix-commits, 2024/11/24
- 25/58: gnu: gcc-14: Force libdir /lib instead of /lib64 for the 64bit Hurd., guix-commits, 2024/11/24
- 20/58: gnu: netdde: Fix build with gcc-14., guix-commits, 2024/11/24
- 28/58: DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd., guix-commits, 2024/11/24