From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id UBm2F5HI6GCqQgEAgWs5BA (envelope-from ) for ; Sat, 10 Jul 2021 00:07:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ID9ME5HI6GDEBQAA1q6Kng (envelope-from ) for ; Fri, 09 Jul 2021 22:07:13 +0000 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 C417710D8F for ; Sat, 10 Jul 2021 00:07:12 +0200 (CEST) Received: from localhost ([::1]:54872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1yeN-0004hO-HC for larch@yhetil.org; Fri, 09 Jul 2021 18:07:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1yeE-0004hE-4A for guix-patches@gnu.org; Fri, 09 Jul 2021 18:07:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48333) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1yeD-0002PB-TU for guix-patches@gnu.org; Fri, 09 Jul 2021 18:07:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1yeD-0004Tr-JP for guix-patches@gnu.org; Fri, 09 Jul 2021 18:07:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49471] [PATCH] gnu: lld: Update to 12.0.0. References: In-Reply-To: Resent-From: Leo Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jul 2021 22:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49471 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49471@debbugs.gnu.org Received: via spool by 49471-submit@debbugs.gnu.org id=B49471.162586838917186 (code B ref 49471); Fri, 09 Jul 2021 22:07:01 +0000 Received: (at 49471) by debbugs.gnu.org; 9 Jul 2021 22:06:29 +0000 Received: from localhost ([127.0.0.1]:59879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1ydh-0004T8-KZ for submit@debbugs.gnu.org; Fri, 09 Jul 2021 18:06:29 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:44571) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1ydd-0004St-DR for 49471@debbugs.gnu.org; Fri, 09 Jul 2021 18:06:29 -0400 Received: from localhost.localdomain (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GM6gf2vV2z3wY2 for <49471@debbugs.gnu.org>; Sat, 10 Jul 2021 00:06:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1625868382; bh=Jnplg6gCgN/56lp4lHzijt9drpq2eCJb4mJUGbxQY10=; h=From:To:Subject:Date; b=HrSXvc2CFzpqmc0A372z5m5e8AlTBgupedMeOYicTIqlGhL0IwGCYiYau+4qedmDA Ld9f0uo3szr3MhqW6/LOW7DMOHoUoiwmdNt0nxEyDqY+B8VyhxIjzzemR/+eo/6WC6 FjRFM1bgr7IzuK84xjFz6Hj345GFmnsr0byf47Zw= From: Leo Prikler Date: Sat, 10 Jul 2021 00:06:06 +0200 Message-Id: <20210709220605.24524-1-leo.prikler@student.tugraz.at> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625868432; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: 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=Jnplg6gCgN/56lp4lHzijt9drpq2eCJb4mJUGbxQY10=; b=IK0tqjDqJL9ODcTcFCuvUhmUJfKCTP1tR331J3JMtlKmefgqPvg7nijMpCDm1e2A1dZXkV rGyc7LnM9NJawO28mT8k1HAFlmdS4QEP6gGzSUcqFB0E2+qddY8CFvamVaqESz+3Uzsmu+ SxkANEX6jte/xTwqcd6URIIb0JhiJNG8r0gqAmHoQwKgQNEZQBh/1pY7LpVWPk6HLEWGYd F6IPtya+e4fR0SCb6XKsXZAPiEwPeBzlhrGQxcl87jG81wDTnL+pFtQl//+VDLpW4drkw5 WBf2Vg4XGyyEfWqEzOKpjBwasSsRYQhOx4wY6N4LSSPMEwl+RxXvQ1zrCpXT7Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625868432; a=rsa-sha256; cv=none; b=Q9TuZrTera3pRinVMI5FGkddtzzrdblgWHENFlGN7K/gisJMXp1XNlnY40ruAysOAXtb53 gJQPACHNlraRYXODmFzIvbu9Z8FgZuJqjYFv+RIIs/5RbG9RRW8l4WkOfjv7OKL+WkBsrZ 5sAABgLbIsbJX0u8jTuKygrnlF4twM4rTLYNy1k3Mu4rFXFmKjEkH9I2Gb3fhmuMcFZfxW OB77fS50ZTh/9Ics4kg8glQ7f+xCN5qj+sBzQ3eausGErR9Bz/YtszSKoYFcQ12SrnBYNP VM15/Ejl43TnY6GADNObLHfeck8KRvVOitrVRntyYsW4AmB4w6GQaQneQfGjoA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=HrSXvc2C; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.70 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=HrSXvc2C; dmarc=fail reason="SPF not aligned (relaxed)" header.from=student.tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C417710D8F X-Spam-Score: 3.70 X-Migadu-Scanner: scn0.migadu.com X-TUID: oYjTw0TmSZxP * gnu/packages/llvm.scm (llvm-subprojects-origin, %llvm-project-12.0.0-hash): New variables. (lld-11, lld-12): New variables. (lld): Point to lld-11. --- This patch is an alternative to the one sent by terramorpha. Supposed advantages of it are: * lld still points to lld-11, not breaking any packages that rely on it * llvm-subprojects-origin can be reused by other LLVM subprojects (think of libcxx and libcxxabi, which both require each other, or libunwind, which requires libcxx) Disadvantages are: * llvm-project is a beefy tarball and somewhat of a pain to unpack * Both this version and the original use an unclean approach to building subprojects, that is propagated by LLVM. Perhaps we ought to instead clean up their mess? Regards, Leo gnu/packages/llvm.scm | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 575c63c713..1ddbd39e59 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -92,6 +92,22 @@ as \"x86_64-linux\"." (string-append "https://github.com/llvm/llvm-project/releases/download" "/llvmorg-" version "/" component "-" version ".src.tar.xz")) +(define* (llvm-subprojects-origin components version hash + #:optional (patches '())) + (origin + (method url-fetch) + (uri (llvm-uri "llvm-project" version)) + (sha256 (base32 hash)) + (patches (map search-patch patches)) + (modules '((guix build utils) + (ice-9 ftw))) + (snippet + `(for-each + (lambda (file) + (unless (member file '("." ".." ,@components)) + (delete-file-recursively file))) + (scandir "."))))) + (define* (clang-runtime-from-llvm llvm hash #:optional (patches '())) (package @@ -882,7 +898,7 @@ of programming tools as well as libraries with equivalent functionality.") (define-public clang clang-9) (define-public clang-toolchain clang-toolchain-9) -(define-public lld +(define-public lld-11 (package (name "lld") (version "11.0.0") @@ -906,6 +922,31 @@ of programming tools as well as libraries with equivalent functionality.") components which highly leverage existing libraries in the larger LLVM Project.") (license license:asl2.0))) ; With LLVM exception +(define %llvm-project-12.0.0-hash "0a1n88dmbwp1ww7h3ykf0s001cndk1bm3i2cj1y2sh548f4nilcy") + +(define-public lld-12 + (package + (inherit lld-11) + (version "12.0.0") + (source (llvm-subprojects-origin '("lld" "libunwind") version + %llvm-project-12.0.0-hash)) + (arguments + `(,@(package-arguments lld-11) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'dissect + (lambda _ + ;; Find libunwind in unpacked sources + (substitute* "lld/MachO/CMakeLists.txt" + (("\\$\\{LLVM_MAIN_SRC_DIR\\}/\\.\\./libunwind") + (string-append (getcwd) "/libunwind"))) + ;; chdir to actual source folder + (chdir "lld")))))) + (inputs + `(("llvm" ,llvm-12))))) + +(define-public lld lld-11) + (define-public lldb (package (name "lldb") -- 2.32.0