GNU bug report logs -
#53609
[PATCH] Add GHC 4 for the Haskell bootstrap
Previous Next
Reported by: Ricardo Wurmus <rekado <at> elephly.net>
Date: Fri, 28 Jan 2022 17:44:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 53609 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/commencement.scm (gcc-2.95-wrapper): New variable.
---
gnu/packages/commencement.scm | 57 +++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 3fb4b2054f..6bbadff796 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2254,6 +2254,63 @@ (define gcc-mesboot1-wrapper
(program (string-append bin "/gcc")))
(invoke program "--help")))))))))
+(define gcc-2.95-wrapper
+ ;; We need this so gcc-mesboot0 can be used to create shared binaries that
+ ;; have the correct interpreter, otherwise configuring gcc-mesboot using
+ ;; --enable-shared will fail.
+ (package
+ (inherit gcc-mesboot0)
+ (name "gcc-2.95-wrapper")
+ (source #f)
+ (inputs '())
+ (native-inputs `(("bash" ,bash-mesboot)
+ ("coreutils" ,coreutils-mesboot0)
+ ("libc" ,glibc-2.2.5)
+ ("gcc" ,gcc-mesboot0)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'unpack)
+ (delete 'configure)
+ (delete 'install)
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (for-each
+ (lambda (program)
+ (let ((wrapper (string-append bin "/" program)))
+ (with-output-to-file wrapper
+ (lambda _
+ (display (string-append "#! " bash "/bin/bash
+exec " gcc "/bin/" program
+" -Wl,--dynamic-linker"
+;; also for x86_64-linux, we are still on i686-linux
+" -Wl," libc ,(glibc-dynamic-linker "i686-linux")
+" -Wl,--rpath"
+" -Wl," libc "/lib"
+" \"$@\"
+"))
+ (chmod wrapper #o555)))))
+ '("cpp"
+ "gcc"
+ "g++"
+ "i686-unknown-linux-gnu-cpp"
+ "i686-unknown-linux-gnu-gcc"
+ "i686-unknown-linux-gnu-g++")))))
+ (replace 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (program (string-append bin "/gcc")))
+ (invoke program "--help")))))))))
+
(define gcc-mesboot
(package
(inherit gcc-mesboot1)
--
2.34.0
This bug report was last modified 3 years and 194 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.