Patchwork [1/2] gnu: Add LLVM variant with RTTI support.

login
register
mail settings
Submitter Ricardo Wurmus
Date Nov. 6, 2016, 7:34 p.m.
Message ID <20161106193424.11435-1-rekado@elephly.net>
Download mbox | patch
Permalink /patch/17235/
State New
Headers show

Comments

Ricardo Wurmus - Nov. 6, 2016, 7:34 p.m.
* gnu/packages/llvm.scm (llvm-with-rtti): New variable.
---
 gnu/packages/llvm.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)
Leo Famulari - Nov. 7, 2016, 11:10 p.m.
On Sun, Nov 06, 2016 at 08:34:23PM +0100, Ricardo Wurmus wrote:
> * gnu/packages/llvm.scm (llvm-with-rtti): New variable.

Seems okay, although would it make sense to enable this in the main LLVM
package?
Eric Bavier - Nov. 8, 2016, 5:40 a.m.
On Mon, 7 Nov 2016 18:10:17 -0500
Leo Famulari <leo@famulari.name> wrote:

> On Sun, Nov 06, 2016 at 08:34:23PM +0100, Ricardo Wurmus wrote:
> > * gnu/packages/llvm.scm (llvm-with-rtti): New variable.  
> 
> Seems okay, although would it make sense to enable this in the main LLVM
> package?
> 

I think this would make sense.  I was just preparing a patch to do just
that to support a clamav package.

`~Eric
Ricardo Wurmus - Nov. 8, 2016, 8:10 a.m.
Leo Famulari <leo@famulari.name> writes:

> On Sun, Nov 06, 2016 at 08:34:23PM +0100, Ricardo Wurmus wrote:
>> * gnu/packages/llvm.scm (llvm-with-rtti): New variable.
>
> Seems okay, although would it make sense to enable this in the main LLVM
> package?

I’m not sure, because it seems to require dependent packages to also
support this or else be built with “-fno-rtti”.  We should build this
out in a separate branch and see how much damage this causes and how
many changes to existing packages this requires.

~~ Ricardo
Leo Famulari - Nov. 8, 2016, 4:04 p.m.
On Tue, Nov 08, 2016 at 09:10:46AM +0100, Ricardo Wurmus wrote:
> 
> Leo Famulari <leo@famulari.name> writes:
> 
> > On Sun, Nov 06, 2016 at 08:34:23PM +0100, Ricardo Wurmus wrote:
> >> * gnu/packages/llvm.scm (llvm-with-rtti): New variable.
> >
> > Seems okay, although would it make sense to enable this in the main LLVM
> > package?
> 
> I’m not sure, because it seems to require dependent packages to also
> support this or else be built with “-fno-rtti”.  We should build this
> out in a separate branch and see how much damage this causes and how
> many changes to existing packages this requires.

Perhaps, but let's not let it delay this patch :)
Ricardo Wurmus - Nov. 8, 2016, 8:02 p.m.
Leo Famulari <leo@famulari.name> writes:

> On Tue, Nov 08, 2016 at 09:10:46AM +0100, Ricardo Wurmus wrote:
>> 
>> Leo Famulari <leo@famulari.name> writes:
>> 
>> > On Sun, Nov 06, 2016 at 08:34:23PM +0100, Ricardo Wurmus wrote:
>> >> * gnu/packages/llvm.scm (llvm-with-rtti): New variable.
>> >
>> > Seems okay, although would it make sense to enable this in the main LLVM
>> > package?
>> 
>> I’m not sure, because it seems to require dependent packages to also
>> support this or else be built with “-fno-rtti”.  We should build this
>> out in a separate branch and see how much damage this causes and how
>> many changes to existing packages this requires.
>
> Perhaps, but let's not let it delay this patch :)

Okay :)  Pushed as 8ae60404510fedb89502e27c0e73f830ab429641.
Thanks for the review!

~~ Ricardo

Patch

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 1a1f7ee..96679bf 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -85,6 +85,17 @@  languages is in development.  The compiler infrastructure includes mirror sets
 of programming tools as well as libraries with equivalent functionality.")
     (license license:ncsa)))
 
+(define-public llvm-with-rtti
+  (package (inherit llvm)
+    (name "llvm-with-rtti")
+    (arguments
+     (substitute-keyword-arguments (package-arguments llvm)
+       ((#:configure-flags flags)
+        `(append '("-DCMAKE_SKIP_BUILD_RPATH=FALSE"
+                   "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
+                   "-DLLVM_REQUIRES_RTTI=1")
+                 ,flags))))))
+
 (define (clang-runtime-from-llvm llvm hash)
   (package
     (name "clang-runtime")