From patchwork Sat Feb 12 21:45:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 37222 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 99B1C27BBEA; Sat, 12 Feb 2022 21:47:10 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 22D0E27BBE9 for ; Sat, 12 Feb 2022 21:47:10 +0000 (GMT) Received: from localhost ([::1]:49234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJ0EW-0005OM-Qi for patchwork@mira.cbaines.net; Sat, 12 Feb 2022 16:47:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52302) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJ0DT-0004Cl-0k for guix-patches@gnu.org; Sat, 12 Feb 2022 16:46:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41934) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJ0DS-0002wz-NC for guix-patches@gnu.org; Sat, 12 Feb 2022 16:46:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJ0DS-0008VM-Mg for guix-patches@gnu.org; Sat, 12 Feb 2022 16:46:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53964] [PATCH 2/4] gnu: gcc: Add 2.95. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 12 Feb 2022 21:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53964 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53964@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 53964-submit@debbugs.gnu.org id=B53964.164470235532251 (code B ref 53964); Sat, 12 Feb 2022 21:46:02 +0000 Received: (at 53964) by debbugs.gnu.org; 12 Feb 2022 21:45:55 +0000 Received: from localhost ([127.0.0.1]:35827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJ0DH-0008Ko-61 for submit@debbugs.gnu.org; Sat, 12 Feb 2022 16:45:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJ0DB-0008AK-BS for 53964@debbugs.gnu.org; Sat, 12 Feb 2022 16:45:47 -0500 Received: from [2001:470:142:3::e] (port=50938 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJ0D5-0002oc-TF; Sat, 12 Feb 2022 16:45:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=0F6AsfuWKEshf8SUXh0k6HJsVrniLTtmAj+LAWPvP94=; b=eNLT9izvGGpbIKC4jMNZ pHz/LwvS0TakC0d3jEx3Vxe+lSLxOx3C23RulpvxjDr9F2dJTG/DHvZcUuuYVX6K7ElIl6uRFwnXj gbTD5sFJ3RZSPRzMm2/5fc8QQBFHYCXbPlEcyfi2ypMB/+3dBIATxBsfppXc6H6UEYvk7n9dcXlm5 GR21luaUij8bLjzCEMggmu/GtfyVvnAgxd4yhU0XU+iFKuWZsoVByG72Havps3JBJe241a80DobWb vAEoaI6v8HNHKj6jW+LNsdu7Y8fJ0Cb6TrSNtM0ql+HLaR+M7SC3ryi/3ZjQQwA2JXHKPwJKFIrRj bUoTOfiU/pu0VQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56748 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJ0D5-00034N-Hd; Sat, 12 Feb 2022 16:45:39 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sat, 12 Feb 2022 22:45:30 +0100 Message-Id: <20220212214532.23087-2-ludo@gnu.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220212214532.23087-1-ludo@gnu.org> References: <20220212214532.23087-1-ludo@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * 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 +;;; Copyright © 2012-2022 Ludovic Courtès ;;; Copyright © 2014, 2015, 2018 Mark H Weaver ;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2021 Ricardo Wurmus ;;; Copyright © 2015 Andreas Enge @@ -641,6 +641,75 @@ (define-public gcc-11 ;; 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")))) + (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"))))))) + + (define-public (make-libstdc++ gcc) "Return a libstdc++ package based on GCC. The primary use case is when using compilers other than GCC."