From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KJTeBeEkSWQgQwAASxT56A (envelope-from ) for ; Wed, 26 Apr 2023 15:19:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KO3qBOEkSWQTogAAG6o9tA (envelope-from ) for ; Wed, 26 Apr 2023 15:19:29 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id AA49B5F3F for ; Wed, 26 Apr 2023 15:19:28 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1prf31-0006A9-MG; Wed, 26 Apr 2023 09:19:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prf30-00069L-2T for guix-patches@gnu.org; Wed, 26 Apr 2023 09:19:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1prf2z-0002OF-Qq for guix-patches@gnu.org; Wed, 26 Apr 2023 09:19:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1prf2z-0002pn-MF for guix-patches@gnu.org; Wed, 26 Apr 2023 09:19:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63088] [PATCH 1/3] gnu: Add ISPC. * gnu/packages/c.scm (ispc): New variable. Resent-From: zamfofex Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 26 Apr 2023 13:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63088 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63088@debbugs.gnu.org Cc: zamfofex Received: via spool by 63088-submit@debbugs.gnu.org id=B63088.168251508410803 (code B ref 63088); Wed, 26 Apr 2023 13:19:01 +0000 Received: (at 63088) by debbugs.gnu.org; 26 Apr 2023 13:18:04 +0000 Received: from localhost ([127.0.0.1]:54589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prf23-0002oB-RR for submit@debbugs.gnu.org; Wed, 26 Apr 2023 09:18:04 -0400 Received: from mta-10-3.privateemail.com ([198.54.127.62]:13206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prf20-0002nb-55 for 63088@debbugs.gnu.org; Wed, 26 Apr 2023 09:18:02 -0400 Received: from mta-10.privateemail.com (localhost [127.0.0.1]) by mta-10.privateemail.com (Postfix) with ESMTP id 424DF18000A7; Wed, 26 Apr 2023 09:17:54 -0400 (EDT) Received: from localhost.localdomain (unknown [187.66.116.196]) by mta-10.privateemail.com (Postfix) with ESMTPA id 5F6FA18000A1; Wed, 26 Apr 2023 09:17:52 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=twdb.moe; s=default; t=1682515074; bh=6wZNPgMdOFJvFyyDeoucBEQnMDClA6WO0xKmhiMHcHQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GtTe3ic5ei3+mTmzp/pGWPVa3Fzi8kot+wX4R0heG7D/FxHpkPDnU7idQrCtBrh/8 6z10NmaAcj4dkClgl6doODAzvnZb1chZhwqGodz6D/LR+UPvAjyFrSzsV1GxFTt/TY osxVANszl6gxdtph/+cmoG/BCbdJ1qy9ZtfFBf5w0i748oAtGYr+Mpd+hs1Lz6Q1VC QCU2JISKeOB3pKoMuw0t/k9NRVWydRN4RaqxAX88z2+aL2nLQXnuthuSpx2ziCtz6L 5JrHasDvU2X+TCuSnDpZshfJpQhqbWeMj18h4gU+/dvhm3h/O4LaXxeiTCTHURV6pm un27sw8PfiP/A== From: zamfofex Date: Wed, 26 Apr 2023 10:17:37 -0300 Message-Id: <7ad5f28721fe957a4863500b29e31a1191166041.1682514072.git.zamfofex@twdb.moe> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682515168; a=rsa-sha256; cv=none; b=pEChNI7/vWQGneOu8P4n5yREIQLnKXSEP31MvMRF72e5cCO/rbpC7l1Rd4yeCbsrxDUMZ/ FStlc6Z443RVRUspyyBAw8RPIfy1qTolqFID3jKSGAhJxi+X7yo3+mC0fhlTpetqKRG9vp xSzCCyI/oWCzsOe+ub4V0XRMssvJlHw3WG+IcfSaz/+d6lhsEDypzNR17PhMFI1GZaGDpj cEjW22vfmE7TPL+A0tLeSyiBE7+eDg/4uSOlsnEzlMF4hwcLxd+98p0dTR1Wi/kBzYHWZr k8Q8MzFJ1gaWZYnPbmXQCh7YxyjwcGfyig5qjy1WggQogu1b41r/6h3gFWerrA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=twdb.moe header.s=default header.b=GtTe3ic5; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682515168; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=j+0WDN5K5oQB3xYgIJV2JrwPsoQkM4XUplLh2Rb3I6Y=; b=biEoH4QT0nlcD96+/M75eqMX/lrHkBYUp3BHGOzv5i5E1S52EaudIxO2VXjivX/BPmsEfq a5lWZYI1Z1aFfSKILYFc+X42iijLMJeMzHyoRKhORC7rOp8QVU9/Ws97qHdygks/Vjgi0V 3HVoffhn9vUhJRyrVTyieM3RZHnBjt7ekvEcXUX+SWjHrK1NOKHZiSI2aKxTWwWMuSoAzt 53J4LRduqKUs56rJY7dNbe8t5TB7TSlC1hUUAQA5raLlILzy7XXwmrwLfrpnPli9xyjKEw Rk6pEM1oVYCMrmQ27YbAj/F/Qfdty8kNMJ/Kqsnbd9iRKOYEizDh0hTMXgwgzQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=twdb.moe header.s=default header.b=GtTe3ic5; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -0.71 X-Spam-Score: -0.71 X-Migadu-Queue-Id: AA49B5F3F X-TUID: byCPiIvgImwl --- gnu/packages/c.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index b2f16613dd..28438f56c8 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2022 Artyom V. Poptsov ;;; Copyright © 2022 Ekaitz Zarraga ;;; Copyright © 2022 ( +;;; Copyright © 2023 zamfofex ;;; ;;; This file is part of GNU Guix. ;;; @@ -57,7 +58,9 @@ (define-module (gnu packages c) #:use-module (gnu packages guile) #:use-module (gnu packages llvm) #:use-module (gnu packages lua) + #:use-module (gnu packages m4) #:use-module (gnu packages multiprecision) + #:use-module (gnu packages ncurses) #:use-module (gnu packages pcre) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) @@ -1375,3 +1378,63 @@ (define-public utest-h (description "This package provides a header-only unit testing library for C/C++.") (license license:unlicense)))) + +(define-public ispc + (package + (name "ispc") + (version "1.19.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ispc/ispc") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0yhcgyzjlrgs920lm0l6kygj2skanfb6qkxbdgm69r8c2xkzkaa3")))) + (inputs (list ncurses)) + (native-inputs (list bison clang flex m4 python)) + (build-system cmake-build-system) + (supported-systems '("x86_64-linux" "i686-linux" "aarch64-linux" "armhf-linux")) + (arguments `(#:tests? #f + #:configure-flags + `(,,(string-append "-DCMAKE_C_COMPILER=" (cc-for-target)) + ,,(string-append "-DCMAKE_CXX_COMPILER=" (cxx-for-target)) + ,(string-append "-DCLANG_EXECUTABLE=" + (assoc-ref %build-inputs "clang") + "/bin/clang") + ,(string-append "-DCLANGPP_EXECUTABLE=" + (assoc-ref %build-inputs "clang") + "/bin/clang++")) + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-curses-requirement + (lambda _ + (substitute* "CMakeLists.txt" + (("\\bCURSES_CURSES_LIBRARY\\b") + "CURSES_LIBRARY")))) + ; Note: This works around the following issue: + ; + ; Because GCC in Guix does not have multilib support. + (add-before 'configure 'patch-target-archs + (lambda _ + (substitute* "cmake/GenerateBuiltins.cmake" + (("\\bforeach \\(bit 32 64\\)") + ,(if (target-64bit?) + "foreach (bit 64)" + "foreach (bit 32)")) + (("\\bforeach \\(arch .*?\\)") + ,(if (target-x86?) + "foreach (arch \"x86\")" + "foreach (arch \"arm\")")) + (("\\bforeach \\(os_name \"windows\" .*?\\)") + "foreach (os_name \"linux\")"))))))) + (synopsis "Implicit SPMD Program Compiler") + (description + "ISPC is a compiler for a variant of the C programming language, with +extensions for single program, multiple data programming. Under the SPMD +model, the programmer writes a program that generally appears to be a regular +serial program, though the execution model is actually that a number of program +instances execute in parallel on the hardware.") + (home-page "https://github.com/ispc/ispc") + (license license:bsd-3))) -- 2.39.2