all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: 53964@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95.
Date: Sat, 12 Feb 2022 22:45:30 +0100	[thread overview]
Message-ID: <20220212214532.23087-2-ludo@gnu.org> (raw)
In-Reply-To: <20220212214532.23087-1-ludo@gnu.org>

* gnu/packages/gcc.scm (gcc-2.95): New variable.
---
 gnu/packages/gcc.scm | 71 +++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 70 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index efa0baeaa1..2f947e4322 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2022 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
@@ -641,6 +641,75 @@ (define-public gcc-11
 ;;       the gcc-toolchain-* definitions.
 (define-public gcc gcc-10)
 
+\f
+;;;
+;;; Historical version.
+;;;
+
+(define-public gcc-2.95
+  ;; Note: 'gcc-core-mesboot0' in commencement.scm provides 2.95 as well, but
+  ;; with additional tricks to support compilation with TinyCC and Mes-libc.
+  (package
+    (inherit gcc)
+    (version "2.95.3")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
+    (supported-systems '("i686-linux" "x86_64-linux"))
+    (native-inputs (list texinfo))
+    (inputs '())
+    (propagated-inputs '())
+    (outputs '("out"))
+    (arguments
+     (list #:system "i686-linux"                ;x86_64 didn't exist back then
+           #:tests? #f
+           #:parallel-build? #f
+           #:configure-flags #~'("--disable-werror")
+
+           #:phases
+           #~(modify-phases %standard-phases
+               (add-before 'configure 'set-dynamic-linker-file-name
+                 (lambda* (#:key inputs #:allow-other-keys)
+                   ;; Tell GCC what the real loader file name is.
+                   (substitute* "gcc/config/i386/linux.h"
+                     (("/lib/ld-linux\\.so\\.[12]")
+                      (search-input-file inputs "/lib/ld-linux.so.2")))))
+               (replace 'configure
+                 (lambda* (#:key outputs build configure-flags
+                           #:allow-other-keys)
+                   ;; It's an old 'configure' script so it needs some help.
+                   (let ((out (assoc-ref outputs "out")))
+                     (setenv "CONFIG_SHELL" (which "sh"))
+                     (apply invoke "./configure"
+                            (string-append "--prefix=" out)
+                            (string-append "--build=" build)
+                            (string-append "--host=" build)
+                            configure-flags))))
+               (add-before 'configure 'remove-bundled-texinfo
+                 (lambda _
+                   ;; Do not build the bundled Texinfo.
+                   (delete-file-recursively "texinfo")
+                   (substitute* "configure"
+                     (("host_tools=(.*)texinfo" _ before)
+                      (string-append "host_tools=" before)))
+
+                   ;; Go ahead despite the many warnings.
+                   (substitute* '("Makefile.in" "gcc/Makefile.in")
+                     (("^MAKEINFOFLAGS =.*")
+                      "MAKEINFOFLAGS = --force\n")))))))
+    (native-search-paths
+     (list (search-path-specification
+            (variable "C_INCLUDE_PATH")
+            (files '("include")))
+           (search-path-specification
+            (variable "LIBRARY_PATH")
+            (files '("lib")))))))
+
+\f
 (define-public (make-libstdc++ gcc)
   "Return a libstdc++ package based on GCC.  The primary use case is when
 using compilers other than GCC."
-- 
2.34.0





  reply	other threads:[~2022-02-12 21:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12 21:43 [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ludovic Courtès
2022-02-12 21:45 ` [bug#53964] [PATCH 1/4] gnu: nhc98: Build with the current tool chain Ludovic Courtès
2022-02-12 21:45   ` Ludovic Courtès [this message]
2022-02-12 22:35     ` [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95 Maxime Devos
2022-02-12 22:37     ` Maxime Devos
2022-02-14  9:23       ` Ludovic Courtès
2022-02-12 22:40     ` Maxime Devos
2022-02-14  9:25       ` Ludovic Courtès
2022-02-12 22:43     ` Maxime Devos
2022-02-12 22:45     ` Maxime Devos
2022-02-14  9:26       ` Ludovic Courtès
2022-02-12 22:47     ` Maxime Devos
2022-02-14  9:33       ` Ludovic Courtès
2022-02-14 11:22         ` [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ludovic Courtès
2022-02-12 21:45   ` [bug#53964] [PATCH 3/4] gnu: ghc@4: Build without referring to packages in commencement.scm Ludovic Courtès
2022-02-12 22:49     ` Maxime Devos
2022-02-14  9:35       ` Ludovic Courtès
2022-02-12 22:52     ` Maxime Devos
2022-02-14  9:36       ` Ludovic Courtès
2022-02-12 21:45   ` [bug#53964] [PATCH 4/4] gnu: Remove glibc@2.2.5 and gcc-2.95-wrapper Ludovic Courtès
2022-02-12 22:14 ` [bug#53964] [PATCH 0/4] Build nhc98 and ghc@4 with regular dependencies Ricardo Wurmus
2022-02-14 14:58   ` bug#53964: " Ludovic Courtès

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=20220212214532.23087-2-ludo@gnu.org \
    --to=ludo@gnu.org \
    --cc=53964@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.