unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: terramorpha@cock.li
To: 49471@debbugs.gnu.org
Subject: [bug#49471] the actual patch
Date: Thu, 08 Jul 2021 17:45:34 -0400	[thread overview]
Message-ID: <144970c00db4527f3e64c1a74466286d@cock.li> (raw)
In-Reply-To: <e7e70cb2398e0a8070ea38c09511d339@cock.li>

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 
"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




  reply	other threads:[~2021-07-08 21:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08 21:39 [bug#49471] [PATCH] gnu: lld: Update to 12.0.0 terramorpha
2021-07-08 21:45 ` terramorpha [this message]
2021-07-09 22:06 ` Leo Prikler
2021-07-19 17:37   ` Ludovic Courtès
2021-07-19 18:10     ` Leo Prikler
2021-09-24  0:28 ` bug#49471: " Sarah Morgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=144970c00db4527f3e64c1a74466286d@cock.li \
    --to=terramorpha@cock.li \
    --cc=49471@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).