From patchwork Sat Feb 5 00:08:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Wurmus X-Patchwork-Id: 37005 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 DC94327BBEB; Sat, 5 Feb 2022 00:09:15 +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 6F51D27BBEA for ; Sat, 5 Feb 2022 00:09:15 +0000 (GMT) Received: from localhost ([::1]:57206 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nG8de-00056Z-IZ for patchwork@mira.cbaines.net; Fri, 04 Feb 2022 19:09:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37804) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nG8dT-00056A-9K for guix-patches@gnu.org; Fri, 04 Feb 2022 19:09:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:39352) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nG8dS-0005qE-Vb for guix-patches@gnu.org; Fri, 04 Feb 2022 19:09:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nG8dS-00087f-S2 for guix-patches@gnu.org; Fri, 04 Feb 2022 19:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53609] [PATCH v2 2/4] gnu: Add gcc-2.95-wrapper. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 05 Feb 2022 00:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53609 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53609@debbugs.gnu.org Cc: Ricardo Wurmus Received: via spool by 53609-submit@debbugs.gnu.org id=B53609.164401971831164 (code B ref 53609); Sat, 05 Feb 2022 00:09:02 +0000 Received: (at 53609) by debbugs.gnu.org; 5 Feb 2022 00:08:38 +0000 Received: from localhost ([127.0.0.1]:33242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nG8d4-00086V-21 for submit@debbugs.gnu.org; Fri, 04 Feb 2022 19:08:38 -0500 Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nG8d2-00086L-Sx for 53609@debbugs.gnu.org; Fri, 04 Feb 2022 19:08:37 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1644019714; cv=none; d=zohomail.com; s=zohoarc; b=bF96o/NCLr6/j7co4cjxCVWmFPYjwQBQHYRAeoKcMLWMZWsDi0PQ6OB/eR/O9pHSGCwEOkjVB6EQk251ncRr0KfPFI8tAWxbG+Buxm5Rs5O69LIh6iYpDa6Lu7G33nTB5XDOfIyAGNLo8qvCHmdo4jxwsnVou+Aj4PbEExig9b8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644019714; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=sk7jDn/quwbUrg2CgjFygChAzjbYrp0uLrinhSYCg0E=; b=TCrYw/qJKa5cY4uDE8EZahcyyq2aY1X0Ru4aZT6gpqQEQ6SgjFhMKMkfXBMlIViLlBF9iT+HLhTawi+JHR4NJsY+zSqzOSOqeJXNUEp0yatj4I2lJkLzht1Y/2bcv6iRYE74OVJPdpv/+QXqjQzrvDTjRHctKRho3/P9+QKvGOw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1644019714; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding; bh=sk7jDn/quwbUrg2CgjFygChAzjbYrp0uLrinhSYCg0E=; b=XLz7O51LLwR5hMZ7bdo38hKUa4lxf4nEKa+03byy7jy8HTNPjyXZLun09vHZwQzN g4OUjp58SjtwdzzN2Rwg3l4cNA3WG3fLN2fD/LRosvT2/Skg7UG3TFqb97UrJevaicd 3heWxvGoC8mikYvaNcpuSvusiycbX8aK5X9FK9VE= Received: from localhost (p54ad4dac.dip0.t-ipconnect.de [84.173.77.172]) by mx.zohomail.com with SMTPS id 1644019712364348.5284699529093; Fri, 4 Feb 2022 16:08:32 -0800 (PST) From: Ricardo Wurmus Date: Sat, 5 Feb 2022 01:08:21 +0100 Message-Id: <20220205000823.2680-2-rekado@elephly.net> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20220205000823.2680-1-rekado@elephly.net> References: <20220205000823.2680-1-rekado@elephly.net> MIME-Version: 1.0 X-ZohoMailClient: External 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/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)