Patchwork :Resend: Add LLVM, clang and clang-runtime-3.8 to GNU Guix

login
register
mail settings
Submitter Dennis Mungai
Date May 26, 2016, 7:45 p.m.
Message ID <CAKKYfmHtwMd-HvYqdrKaYJ6kPQoc0b-71paW7zg+F0y5-4CPUw@mail.gmail.com>
Download mbox | patch
Permalink /patch/12541/
State New
Headers show

Comments

Dennis Mungai - May 26, 2016, 7:45 p.m.
Hello,

This current patch adds LLVM 3.8 and it's matching clang and
clang-runtime packages to GNU Guix.

Discard the previous patch as it was not formatted via git. This one is :-)

Regards,

Dennis.
Roel Janssen - May 26, 2016, 8:13 p.m.
Hello Dennis,

Welcome and thank you for the patch.

Dennis Mungai writes:

> +(define-public llvm-3.8
> +  (package (inherit llvm)
> +    (version "3.8.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append "http://llvm.org/releases/"
> +                           version "/llvm-" version ".src.tar.xz"))
> +       (sha256
> +        (base32
> +         "0ikfq0gxac8xpvxj23l4hk8f12ydx48fljgrz1gl9xp0ks704nsm"))))
> +    (native-inputs
> +     `(("python" ,python-wrapper)
> +       ("perl"   ,perl)
> +       ("libffi" ,libffi)
> +       ("zlib" ,zlib)))

One space between the string and the unquote is enough.

> +    (arguments
> +     `(#:configure-flags '("-DCMAKE_SKIP_BUILD_RPATH=FALSE"
> +                           "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
> +                           "-DLLVM_ENABLE_PIC=ON"
> +                           ;"-DLLVM_ENABLE_RTTI=ON"
> +                           "-DLLVM_ENABLE_WERROR=OFF"
> +                           ;;"-DLLVM_REQUIRES_RTTI=ON"

Could you remove the options you commented out?

> +                           )))))

These should be positioned directly after "-DLLVM_ENABLE_WERROR=OFF".

> +
> +(define-public clang-runtime-3.8
> +  (clang-runtime-from-llvm
> +   llvm-3.8
> +   "1c2nkp9563873ffz22qmhc0wakgj428pch8rmhym8agjamz3ily8"))
> +
> +(define-public clang-3.8
> +  (clang-from-llvm llvm-3.8 clang-runtime-3.8
> +                   "1ybcac8hlr9vl3wg8s4v6cp0c0qgqnwprsv85lihbkq3vqv94504"))
> -- 
> 2.7.4

Thank you,
Roel Janssen

Patch

From 38643acf50749212a4455d15a1729002d6dfa04a Mon Sep 17 00:00:00 2001
From: brainiarc7 <dmngaie@gmail.com>
Date: Thu, 26 May 2016 22:39:05 +0300
Subject: [PATCH] Add LLVM 3.8 to GNU Guix

---
 gnu/packages/llvm.scm | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 3bf019f..e995ff2 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -2,6 +2,9 @@ 
 ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2016 Dennis Mungai <dmngaie@gmail.com>
+;;; Copyright © 2016 Pjotr Prins <pjotr.public12@thebird.nl>
+;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -21,6 +24,8 @@ 
 (define-module (gnu packages llvm)
   #:use-module (guix packages)
   #:use-module (guix licenses)
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages libffi)
   #:use-module (guix download)
   #:use-module (guix utils)
   #:use-module (guix build-system gnu)
@@ -201,3 +206,37 @@  code analysis tools.")
 (define-public clang-3.5
   (clang-from-llvm llvm-3.5 clang-runtime-3.5
                    "12yv3jwdjcbkrx7zjm8wh4jrvb59v8fdw4mnmz3zc1jb00p9k07w"))
+                   
+(define-public llvm-3.8
+  (package (inherit llvm)
+    (version "3.8.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://llvm.org/releases/"
+                           version "/llvm-" version ".src.tar.xz"))
+       (sha256
+        (base32
+         "0ikfq0gxac8xpvxj23l4hk8f12ydx48fljgrz1gl9xp0ks704nsm"))))
+    (native-inputs
+     `(("python" ,python-wrapper)
+       ("perl"   ,perl)
+       ("libffi" ,libffi)
+       ("zlib" ,zlib)))
+    (arguments
+     `(#:configure-flags '("-DCMAKE_SKIP_BUILD_RPATH=FALSE"
+                           "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
+                           "-DLLVM_ENABLE_PIC=ON"
+                           ;"-DLLVM_ENABLE_RTTI=ON"
+                           "-DLLVM_ENABLE_WERROR=OFF"
+                           ;;"-DLLVM_REQUIRES_RTTI=ON"
+                           )))))
+
+(define-public clang-runtime-3.8
+  (clang-runtime-from-llvm
+   llvm-3.8
+   "1c2nkp9563873ffz22qmhc0wakgj428pch8rmhym8agjamz3ily8"))
+
+(define-public clang-3.8
+  (clang-from-llvm llvm-3.8 clang-runtime-3.8
+                   "1ybcac8hlr9vl3wg8s4v6cp0c0qgqnwprsv85lihbkq3vqv94504"))
-- 
2.7.4