all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: 53609@debbugs.gnu.org
Cc: Ricardo Wurmus <rekado@elephly.net>
Subject: [bug#53609] [PATCH v2 2/4] gnu: Add gcc-2.95-wrapper.
Date: Sat,  5 Feb 2022 01:08:21 +0100	[thread overview]
Message-ID: <20220205000823.2680-2-rekado@elephly.net> (raw)
In-Reply-To: <20220205000823.2680-1-rekado@elephly.net>

* 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





  reply	other threads:[~2022-02-05  0:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28 17:35 [bug#53609] [PATCH] Add GHC 4 for the Haskell bootstrap Ricardo Wurmus
2022-01-28 17:48 ` [bug#53609] [PATCH 1/2] gnu: Add perl-5.14 Ricardo Wurmus
2022-01-28 17:48   ` [bug#53609] [PATCH 2/2] gnu: Add ghc-4 Ricardo Wurmus
2022-01-29 18:56     ` Ricardo Wurmus
2022-02-05  0:08 ` [bug#53609] [PATCH v2 1/4] gnu: Add perl-5.14 Ricardo Wurmus
2022-02-05  0:08   ` Ricardo Wurmus [this message]
2022-02-05  0:08   ` [bug#53609] [PATCH v2 3/4] gnu: Add glibc-2.2.5 Ricardo Wurmus
2022-02-05 14:44     ` Maxime Devos
2022-02-05  0:08   ` [bug#53609] [PATCH v2 4/4] gnu: Add ghc-4 Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220205000823.2680-2-rekado@elephly.net \
    --to=rekado@elephly.net \
    --cc=53609@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.