From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id kJdPKcIoeGJESwEAbAwnHQ (envelope-from ) for ; Sun, 08 May 2022 22:32:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0O4cKcIoeGJxRQEAauVa8A (envelope-from ) for ; Sun, 08 May 2022 22:32:02 +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 0AAA4157AC for ; Sun, 8 May 2022 22:32:02 +0200 (CEST) Received: from localhost ([::1]:38084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nnnZR-0006Ov-7H for larch@yhetil.org; Sun, 08 May 2022 16:32:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nnnQk-0005g5-B7 for guix-patches@gnu.org; Sun, 08 May 2022 16:23:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33183) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nnnQk-00022l-1c for guix-patches@gnu.org; Sun, 08 May 2022 16:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nnnQj-0002iT-Td for guix-patches@gnu.org; Sun, 08 May 2022 16:23:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#53833] [PATCH v2] gnu: Add qbe. References: <20220207011332.27844-1-jgart@dismail.de> In-Reply-To: <20220207011332.27844-1-jgart@dismail.de> Resent-From: "(unmatched-parenthesis" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 08 May 2022 20:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53833 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53833@debbugs.gnu.org Cc: "\(unmatched-parenthesis" Received: via spool by 53833-submit@debbugs.gnu.org id=B53833.165204134510397 (code B ref 53833); Sun, 08 May 2022 20:23:01 +0000 Received: (at 53833) by debbugs.gnu.org; 8 May 2022 20:22:25 +0000 Received: from localhost ([127.0.0.1]:55313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnnQ3-0002hV-Is for submit@debbugs.gnu.org; Sun, 08 May 2022 16:22:25 -0400 Received: from knopi.disroot.org ([178.21.23.139]:46158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nnnQ1-0002hM-7S for 53833@debbugs.gnu.org; Sun, 08 May 2022 16:22:18 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 97A1E435E9; Sun, 8 May 2022 22:22:15 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W9U_BMJuB_0X; Sun, 8 May 2022 22:22:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1652041333; bh=DRJOqEsD0A0uXEgGIucVwq9KSafRhsRAQIb3XPKzT4Y=; h=From:To:Cc:Subject:Date; b=AozXMSfiqGDSHOGM8+IK/qeaGQKBLQRutquP9PAOEQOleBKHnF44TEQ8q2DCj7Gql 54rqn1FNjgRB0oub/5wKGhAsQhPIX0CsUjvLQihqY2Hb5SxvVXGS7dywJ9Iiscy3Wm izYQaPaL6TvY+ag7yhLhKw7/cRE/CdA2B1eWICIcDjGZOszHzFCQzxPJ/BwtL6nyaS hbDR7uq2VqBgEhDTRP1WMBVwxHqRhtvxmWl7eGKhO4IyHZs9+saVQJULIJQfz+dkKZ FB/R5/j1UZrSWdL5dnTqoiSYpv41tdprRNj9kZ8rTsEnc5LKvcNWfnGjHoqoReUxqx KWufRH2bbF09A== Date: Sun, 8 May 2022 21:21:55 +0100 Message-Id: <20220508202154.9648-1-paren@disroot.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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" Reply-to: "\(unmatched-parenthesis" X-ACL-Warn: , "\(unmatched-parenthesis via Guix-patches" From: "\(unmatched-parenthesis via Guix-patches" via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652041922; h=from:from:sender:sender:reply-to: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=j8qv5ob8iBNIisoWei3Qs6h55iZFCFeaw8LCoWxZ4eU=; b=ez8S98utLbMgKFAi/Um6Sygusyk0mFojavZWov1PNWOx5/sWl5V7RWXKfBdPfd23wxQxYu tnsucpTolIk0LOePHPjgTphZHsjxBLxGRxNaIyV1bOcwaMQDziM+hNfeGFzL9znaT6Q/R2 uvTkUBZNEVTDw6pbjX1OLqTmjx3VGVWuFZLKEZqisAMcbjexvpOFYweR/QoJ+KgEO1VVNc 00xJa+UlyqezzGo24PhE+KTf1YCujaj83WYigGRh/QF1r3v+pP+tiwIBsEK53d8mfkpxF2 5rnBeBxwDWgOPxjY/2hffCJvB0YfVftZW9SmJ+kB8iJYPRdtyob3rmia9kUiJQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652041922; a=rsa-sha256; cv=none; b=dIif/1wSHDhMRwg6TW64k35Nq+ZRrwe471EGkrABj23BcL4b2FEPorOE6TwbtFyQEHXzWj dbP1/8MAkEzsDSEibNlK1XfirfrTVh4fwYc3qoN09nG+Zv0hl25t4ZTQvYy9V2R8+00PiC 6F7R0hZAlY4JN/1Z8KtlCerjq2/fOqEWFMW+Z+GBLh17OH5T+j8+h4Ib4/87Y2LVPmGrew AGxVpzs/H1UjTRKb89HhKr1Jm12fx9K+FJ/u/dTPZ9k/CrxwA7cEJS+BRChE+fJqbehOX9 cQlLxZEfuJbWUA4KAy2UPxbx+Q8NLUL6/H0EIMStAgaOmsKFaaU2qzfb6mZ8tw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=AozXMSfi; dmarc=pass (policy=none) header.from=gnu.org; 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: -3.61 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=disroot.org header.s=mail header.b=AozXMSfi; dmarc=pass (policy=none) header.from=gnu.org; 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-Queue-Id: 0AAA4157AC X-Spam-Score: -3.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: Sb/6km5EIp/3 * gnu/packages/c.scm (qbe): New variable. Signed-off-by: (unmatched-parenthesis --- This improved patch (1) squashes the three commits together, (2) enables tests for QBE, and (3) fixes some style nits. Thanks to lilyp for feedback on #guix! gnu/packages/c.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index da034d5fd9..c9a25eb801 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -13,6 +13,7 @@ ;;; Copyright © 2020, 2021 Greg Hogan ;;; Copyright © 2021 David Dashyan ;;; Copyright © 2021 Foo Chuan Wei +;;; Copyright © 2022 (unmatched parenthesis ;;; ;;; This file is part of GNU Guix. ;;; @@ -1064,3 +1065,46 @@ (define-public utf8-h C and C++. The functions it provides are like those from the C header string.h, but with a utf8* prefix instead of the str* prefix.") (license license:unlicense)))) + +(define-public qbe + (let ((commit "2caa26e388b1c904d2f12fb09f84df7e761d8331") + (revision "1")) + (package + (name "qbe") + (version (git-version "0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "git://c9x.me/qbe") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1gv03ym0gqrl4wkbhysa82025xwrkr1fg44z814b6vnggwlqgljc")))) + (build-system gnu-build-system) + (arguments + (list #:make-flags + #~(list (string-append "CC=" #$(cc-for-target)) + (string-append "PREFIX=" #$output) + ;; `GUIXTARGET` is used instead of `TARGET` to avoid changing + ;; the meaning of tools/test.sh (which uses `TARGET` too). + (string-append "GUIXTARGET=" #$(or (%current-target-system) + (%current-system)))) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'allow-cross-compilation + (lambda _ + (substitute* "Makefile" + (("`uname -m`") "$(GUIXTARGET)")))) + (add-after 'allow-cross-compilation 'use-gcc-for-tests + (lambda _ + (substitute* "tools/test.sh" + (("cc=\"cc -no-pie\"") + (string-append "cc=\"${CC} -no-pie\""))))) + (delete 'configure)))) + (supported-systems (list "x86_64-linux" "aarch64-linux" "riscv64-linux")) + (synopsis "Simple compiler backend") + (description "QBE is a small compiler backend using an SSA-based intermediate +language as input.") + (home-page "https://c9x.me/compile/") + (license license:expat)))) -- 2.36.0