guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/16: gnu: gcc: Add 2.95.


From: guix-commits
Subject: 02/16: gnu: gcc: Add 2.95.
Date: Mon, 14 Feb 2022 09:53:39 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 66f12401d411d662578ad07387ef027056b8b6df
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat Feb 12 22:28:52 2022 +0100

    gnu: gcc: Add 2.95.
    
    * 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 e0a431a0ff..a330be3336 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>
@@ -670,6 +670,75 @@ It also includes runtime support libraries for these 
languages.")
 ;;       the gcc-toolchain-* definitions.
 (define-public gcc gcc-10)
 
+
+;;;
+;;; 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"))
+              (modules '((guix build utils)))
+              (snippet
+               '(begin
+                  ;; Do not build the bundled Texinfo.
+                  (delete-file-recursively "texinfo")
+                  (substitute* "configure"
+                    (("host_tools=(.*)texinfo" _ before)
+                     (string-append "host_tools=" before)))))))
+    (supported-systems '("i686-linux" "x86_64-linux"))
+    (native-inputs (list texinfo dejagnu))
+    (inputs '())
+    (propagated-inputs '())
+    (outputs '("out"))
+    (arguments
+     (list #:system "i686-linux"                ;x86_64 didn't exist back then
+           #: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.
+                   (setenv "CONFIG_SHELL" (which "sh"))
+                   (apply invoke "./configure"
+                          (string-append "--prefix=" #$output)
+                          (string-append "--build=" build)
+                          (string-append "--host=" build)
+                          configure-flags)))
+               (add-before 'configure 'remove-bundled-texinfo
+                 (lambda _
+                   ;; Go ahead despite the many warnings.
+                   (substitute* '("Makefile.in" "gcc/Makefile.in")
+                     (("^MAKEINFOFLAGS =.*")
+                      "MAKEINFOFLAGS = --force\n")))))))
+    (native-search-paths
+     ;; This package supports nothing but the C language.
+     (list (search-path-specification
+            (variable "C_INCLUDE_PATH")
+            (files '("include")))
+           (search-path-specification
+            (variable "LIBRARY_PATH")
+            (files '("lib")))))))
+
+
 (define-public (make-libstdc++ gcc)
   "Return a libstdc++ package based on GCC.  The primary use case is when
 using compilers other than GCC."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]