[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/06: gnu: commencement: gcc-boot0: Support gcc-14 and the 64bit Hurd.
From: |
guix-commits |
Subject: |
04/06: gnu: commencement: gcc-boot0: Support gcc-14 and the 64bit Hurd. |
Date: |
Wed, 20 Nov 2024 17:06:48 -0500 (EST) |
janneke pushed a commit to branch hurd-team
in repository guix.
commit c352d4906f55b5c1034c9424e6cf119988fdc19b
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue Nov 19 19:10:47 2024 +0100
gnu: commencement: gcc-boot0: Support gcc-14 and the 64bit Hurd.
Asking gcc to "--disable-shared" is overridden for libcc1 by the build
system,
which lateron fails with
install: cannot stat '.libs/libcc1.so.0.0.0': No such file or directory
because no shared libcc1.so.0.0.0 could actually be built.
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: When building using
gcc >= 14, add CC_FOR_BUILD to #:make-flags to convince gmp's configure that
gcc works. Also, add phase "patch-libcc1-static" to avoid attempting a
shared
libcc1.
Change-Id: I18b8dc8849d0d00f1fdce27c1459ee76d0fa7984
---
gnu/packages/commencement.scm | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 13761c0f6c..1b0b06935d 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2391,13 +2391,20 @@ exec " gcc "/bin/" program
`(let* ((libc (assoc-ref %build-inputs "libc"))
(libc-native (or (assoc-ref %build-inputs "libc-native")
libc)))
- `(,(string-append "LDFLAGS="
- "-Wl,-rpath=" libc-native "/lib "
- "-Wl,-dynamic-linker "
- "-Wl," libc-native ,(glibc-dynamic-linker
- (match (%current-system)
- ("x86_64-linux"
"i686-linux")
- (_
(%current-system))))))))
+ `(,,@(append
+ `((string-append "LDFLAGS="
+ "-Wl,-rpath=" libc-native "/lib "
+ "-Wl,-dynamic-linker "
+ "-Wl," libc-native
+ ,(glibc-dynamic-linker
+ (match (%current-system)
+ ("x86_64-linux" "i686-linux")
+ (_ (%current-system))))))
+ (if (version>=? (package-version gcc) "14")
+ ;;Convince gmp's configure that gcc works
+ (list (string-append "CC_FOR_BUILD=gcc"
+ "
-Wno-implicit-function-declaration"))
+ '())))))
((#:phases phases)
#~(modify-phases #$phases
(add-after 'unpack 'unpack-gmp&co
@@ -2421,6 +2428,20 @@ exec " gcc "/bin/" program
char-set:letter)
#$(package-name lib)))
(list gmp-6.0 mpfr mpc)))))
+ #$@(if (version>=? (package-version gcc) "14")
+ #~((add-after 'unpack 'patch-libcc1-static
+ (lambda _
+ ;;Attempting to build libcc1 shared gives:
+ ;; install: cannot stat '.libs/libcc1.so.0.0.0':
+ ;; No such file or directory
+ ;;convince gcc harder to not build a shared libcc1
+ (substitute* "Makefile.def"
+ (("module= libcc1; [^;]*;") "module= libcc1;"))
+ (substitute* "Makefile.in"
+ (("(--target=[$][{]target_alias[}])
--enable-shared \\\\"
+ all target)
+ (string-append target " \\"))))))
+ #~())
#$(match (%current-system)
((or "i686-linux" "x86_64-linux")
#~(add-before 'configure 'fix-libcc1
- branch hurd-team updated (ced6999bb0 -> 0cac719afd), guix-commits, 2024/11/20
- 04/06: gnu: commencement: gcc-boot0: Support gcc-14 and the 64bit Hurd.,
guix-commits <=
- 06/06: gnu: commencement: gcc-final: Support gcc-14 and the 64bit Hurd., guix-commits, 2024/11/20
- 01/06: gnu: hurd: Add refcounts-assert patch., guix-commits, 2024/11/20
- 02/06: gnu: bootstrap: %bootstrap-gcc: Also wrap g++., guix-commits, 2024/11/20
- 05/06: gnu: gcc-14: Patch lib64 also for the 64bit Hurd., guix-commits, 2024/11/20
- 03/06: gnu: commencement: libstdc++-boot0: Fix build with gcc-14., guix-commits, 2024/11/20