From a3378ccd3de5bf1e2a5c1ac3acfc4855def3440d Mon Sep 17 00:00:00 2001
From: Christoph Junghans <christoph.junghans@gmail.com>
Date: Sun, 16 Apr 2017 07:47:00 -0600
Subject: [PATCH] charm: add support for shared linking (#3859)

---
 var/spack/repos/builtin/packages/charm/package.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/var/spack/repos/builtin/packages/charm/package.py b/var/spack/repos/builtin/packages/charm/package.py
index 7072e37cd3..a12eb00445 100644
--- a/var/spack/repos/builtin/packages/charm/package.py
+++ b/var/spack/repos/builtin/packages/charm/package.py
@@ -73,9 +73,9 @@ class Charm(Package):
                 "Enable SMP parallelism (does not work with +multicore)"))
     variant("tcp", default=False,
             description="Use TCP as transport mechanism (requires +net)")
+    variant("shared", default=False, description="Enable shared link support")
 
     # Note: We could add variants for AMPI, LIBS, bigemulator, msa, Tau
-    # Note: We could support shared libraries
 
     depends_on("mpi", when="+mpi")
     depends_on("papi", when="+papi")
@@ -163,6 +163,8 @@ def install(self, spec, prefix):
                     "The +tcp variant requires "
                     "the +net communication mechanism")
             options.append("tcp")
+        if "+shared" in spec:
+            options.append("--build-shared")
 
         # Call "make" via the build script
         # Note: This builds Charm++ in the "tmp" subdirectory of the
-- 
GitLab