From patchwork Thu Jul 8 21:45:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Veilleux X-Patchwork-Id: 31241 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 6D89927BC81; Thu, 8 Jul 2021 22:46:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3593827BC78 for ; Thu, 8 Jul 2021 22:46:14 +0100 (BST) Received: from localhost ([::1]:56770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1bqX-0007rq-A5 for patchwork@mira.cbaines.net; Thu, 08 Jul 2021 17:46:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56478) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1bqM-0007rh-Gf for guix-patches@gnu.org; Thu, 08 Jul 2021 17:46:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46246) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1bqM-0002Hm-8p for guix-patches@gnu.org; Thu, 08 Jul 2021 17:46:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1bqM-0008Iv-8R for guix-patches@gnu.org; Thu, 08 Jul 2021 17:46:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49471] the actual patch References: In-Reply-To: Resent-From: terramorpha@cock.li Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Jul 2021 21:46:02 +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.162578074531879 (code B ref 49471); Thu, 08 Jul 2021 21:46:02 +0000 Received: (at 49471) by debbugs.gnu.org; 8 Jul 2021 21:45:45 +0000 Received: from localhost ([127.0.0.1]:57788 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1bq4-0008I6-My for submit@debbugs.gnu.org; Thu, 08 Jul 2021 17:45:44 -0400 Received: from mail.cock.li ([37.120.193.124]:35420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1bq2-0008Hm-9f for 49471@debbugs.gnu.org; Thu, 08 Jul 2021 17:45:43 -0400 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cock.li; s=mail; t=1625780735; bh=b57zR9IfurR+VLFaJ0G6I9u/DMz5Hfs6d/s1jkebk2M=; h=Date:From:To:Subject:From; b=mzrwb/cu3a6LOuW1R/2UcvKRp1924Pf7yxx2abIR95gIzNZQs2b6O8ugGfvmN6pSj Ywm82bDGErNODa1GEOGHysje5TxHAfOFSuV4Uf2PtzSc2PTQwiBW+ONj5FtbeW2D4y ihD6o/ru7XTkNT5kgLo1W+JhrzSzkfqc3FlGJ94WSQO+uvuiucNaHmXkkGoNRYeLO9 bUupDM1jXs/Okvhyi6DYEbL1gJMbj1Z6rHgJRil/pDkUgkuyPhPEkOlpkM4YRyaA5x HKT5Y3XULmwwfOoyzrIoeUmlXGRAUDxKl8n6b6nBCvQJSmxF11qwm8hslOVIQt+QbM I2hOvfY5USjmA== Date: Thu, 08 Jul 2021 17:45:34 -0400 From: terramorpha@cock.li Message-ID: <144970c00db4527f3e64c1a74466286d@cock.li> X-Sender: terramorpha@cock.li User-Agent: Roundcube Webmail/1.3.15 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 "include_directories\\(\\$\\{LLVM_MAIN_SRC_DIR\\}\\/\\.\\.\\/libunwind\\/include)" + (const (string-append "include_directories(" (getcwd) "/libunwind-12.0.0.src" "/include)"))))) + #t))) + #:build-type "Release" ;; TODO: Tests require the lit tool, which isn't installed by the LLVM ;; package. #:tests? #f)) @@ -904,7 +923,7 @@ of programming tools as well as libraries with equivalent functionality.") (synopsis "Linker from the LLVM project") (description "LLD is a high-performance linker, built as a set of reusable components which highly leverage existing libraries in the larger LLVM Project.") - (license license:asl2.0))) ; With LLVM exception + (license license:asl2.0))) ; With LLVM exceptions (define-public lldb (package diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 575c63c713..b3c1c943f7 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -882,21 +882,40 @@ 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 libunwind-12-source + (origin (method url-fetch) + (uri (llvm-uri "libunwind" "12.0.0")) + (sha256 (base32 "1x8wpmsrsgnwj2v5ih52ylni7r6n8gzkcj6hx65zbxski2rablly")))) + +(define-public lld-12 (package (name "lld") - (version "11.0.0") + (version "12.0.0") (source (origin (method url-fetch) (uri (llvm-uri "lld" version)) (sha256 (base32 - "077xyh7sij6mhp4dc4kdcmp9whrpz332fa12rwxnzp3wgd5bxrzg")))) + "1zakyxk5bwnh7jarckcd4rbmzi58jgn2dbah5j5cwcyfyfbx9drc")))) (build-system cmake-build-system) (inputs - `(("llvm" ,llvm-11))) + `(("llvm" ,llvm-12) + ("libunwind-source" ,libunwind-12-source))) (arguments - `(#:build-type "Release" + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'extract-libunwind-and-patch-path + (lambda* (#:key inputs #:allow-other-keys) + (invoke "tar" "-xf" (assoc-ref inputs "libunwind-source")) + (substitute "MachO/CMakeLists.txt" + ;; The build script assumes that the libunwind code + ;; is the source's sibling directory. Patch it so + ;; that it finds it directly where we put it + (list (cons