From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:41518) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCVpA-0006XT-VA for guix-patches@gnu.org; Thu, 12 Mar 2020 17:57:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCVp9-0001sh-KM for guix-patches@gnu.org; Thu, 12 Mar 2020 17:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51930) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jCVp9-0001s6-GM for guix-patches@gnu.org; Thu, 12 Mar 2020 17:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jCVp8-0003uW-Fb for guix-patches@gnu.org; Thu, 12 Mar 2020 17:57:02 -0400 Subject: [bug#40045] [PATCH] gnu: Add libgccjit. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:41371) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jCVow-000658-SV for guix-patches@gnu.org; Thu, 12 Mar 2020 17:56:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jCVot-0001da-Q7 for guix-patches@gnu.org; Thu, 12 Mar 2020 17:56:50 -0400 Received: from mx.kolabnow.com ([95.128.36.41]:10278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jCVot-0001bS-4W for guix-patches@gnu.org; Thu, 12 Mar 2020 17:56:47 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out002.mykolab.com (Postfix) with ESMTP id BE0DCC09 for ; Thu, 12 Mar 2020 22:56:43 +0100 (CET) Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OhmhzfXHX8TD for ; Thu, 12 Mar 2020 22:56:40 +0100 (CET) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id 9EFE455A for ; Thu, 12 Mar 2020 22:56:40 +0100 (CET) Received: from ext-subm003.mykolab.com (unknown [10.9.6.3]) by int-mx003.mykolab.com (Postfix) with ESMTPS id 61C93B0F for ; Thu, 12 Mar 2020 22:56:40 +0100 (CET) From: "LaFreniere, Joseph" Date: Thu, 12 Mar 2020 16:56:33 -0500 Message-ID: <87tv2tnsoe.fsf@lafreniere.xyz> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40045@debbugs.gnu.org --=-=-= Content-Type: text/plain; format=flowed Patch file is attached. I have no experience building or packaging GCC, so any feedback is appreciated. That being said, I _believe_ this recipe follows the build instructions at https://gcc.gnu.org/onlinedocs/jit/internals/index.html#packaging-notes correctly. This is toward the eventual goal of packaging gccemacs (https://akrl.sdf.org/gccemacs.html). -- Joseph LaFreniere --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-gnu-Add-libgccjit.patch >From 8b08b302f6bf601f5c95513a56b7b0b54b0dc95c Mon Sep 17 00:00:00 2001 From: Joseph LaFreniere Date: Wed, 11 Mar 2020 21:48:59 -0500 Subject: [PATCH] gnu: Add libgccjit. * gnu/packages/gcc.scm (libgccjit): New variable. --- gnu/packages/gcc.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index ead50bb1dc..03fdeb02e1 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -690,6 +690,34 @@ as the 'native-search-paths' field." ;; report two gfortran@5 that are in fact identical. gfortran-7) +(define-public libgccjit + (package + (inherit gcc-9) + (name "libgccjit") + (outputs (delete "lib" (package-outputs gcc))) + (properties (alist-delete 'hidden? (package-properties gcc))) + (arguments + (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system) + (guix build utils) + (ice-9 regex) + (srfi srfi-1) + (srfi srfi-26)) + ,@(package-arguments gcc)) + ((#:configure-flags flags) + `(append `("--enable-host-shared" + ,(string-append "--enable-languages=jit")) + (remove (cut string-match "--enable-languages.*" <>) + ,flags))) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'install 'remove-broken-or-conflicting-files + (lambda* (#:key outputs #:allow-other-keys) + (for-each delete-file + (find-files (string-append (assoc-ref outputs "out") "/bin") + ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc|gcc-.*)")) + #t)))))))) + + (define-public gccgo-4.9 (custom-gcc gcc-4.9 "gccgo" '("go") %generic-search-paths -- 2.25.1 --=-=-=--