summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2016-01-17 10:46:21 -0500
committerErik Schnetter <schnetter@gmail.com>2016-02-13 14:54:18 -0500
commit2cd9ad8ce63ea29093fcc2d8e1bd749d5cbccf0b (patch)
tree00d02eff8b5a65d28cd41db955d4454303d560c2 /lib
parent63911d416557c2c686d357c001d6ad3feebc5a8f (diff)
downloadspack-2cd9ad8ce63ea29093fcc2d8e1bd749d5cbccf0b.tar.gz
spack-2cd9ad8ce63ea29093fcc2d8e1bd749d5cbccf0b.tar.bz2
spack-2cd9ad8ce63ea29093fcc2d8e1bd749d5cbccf0b.tar.xz
spack-2cd9ad8ce63ea29093fcc2d8e1bd749d5cbccf0b.zip
Use "-Wl,-rpath," instead of "-Wl,-rpath="
The former translates to a linker argument "-rpath DIR", whereas the latter translates to "-rpath=DIR". The latter is not support on OS X.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/docs/packaging_guide.rst6
-rw-r--r--lib/spack/spack/package.py4
-rw-r--r--lib/spack/spack/test/cc.py10
3 files changed, 10 insertions, 10 deletions
diff --git a/lib/spack/docs/packaging_guide.rst b/lib/spack/docs/packaging_guide.rst
index 59ba63fa35..bb8a26ad02 100644
--- a/lib/spack/docs/packaging_guide.rst
+++ b/lib/spack/docs/packaging_guide.rst
@@ -1711,15 +1711,15 @@ Compile-time library search paths
* ``-L$dep_prefix/lib``
* ``-L$dep_prefix/lib64``
Runtime library search paths (RPATHs)
- * ``-Wl,-rpath=$dep_prefix/lib``
- * ``-Wl,-rpath=$dep_prefix/lib64``
+ * ``-Wl,-rpath,$dep_prefix/lib``
+ * ``-Wl,-rpath,$dep_prefix/lib64``
Include search paths
* ``-I$dep_prefix/include``
An example of this would be the ``libdwarf`` build, which has one
dependency: ``libelf``. Every call to ``cc`` in the ``libdwarf``
build will have ``-I$LIBELF_PREFIX/include``,
-``-L$LIBELF_PREFIX/lib``, and ``-Wl,-rpath=$LIBELF_PREFIX/lib``
+``-L$LIBELF_PREFIX/lib``, and ``-Wl,-rpath,$LIBELF_PREFIX/lib``
inserted on the command line. This is done transparently to the
project's build system, which will just think it's using a system
where ``libelf`` is readily available. Because of this, you **do
diff --git a/lib/spack/spack/package.py b/lib/spack/spack/package.py
index 8cb947c276..49d4fb6b23 100644
--- a/lib/spack/spack/package.py
+++ b/lib/spack/spack/package.py
@@ -1220,8 +1220,8 @@ class Package(object):
@property
def rpath_args(self):
- """Get the rpath args as a string, with -Wl,-rpath= for each element."""
- return " ".join("-Wl,-rpath=%s" % p for p in self.rpath)
+ """Get the rpath args as a string, with -Wl,-rpath, for each element."""
+ return " ".join("-Wl,-rpath,%s" % p for p in self.rpath)
def validate_package_url(url_string):
diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py
index 905af28a06..54d5638394 100644
--- a/lib/spack/spack/test/cc.py
+++ b/lib/spack/spack/test/cc.py
@@ -39,11 +39,11 @@ test_command = [
'arg1',
'-Wl,--start-group',
'arg2',
- '-Wl,-rpath=/first/rpath', 'arg3', '-Wl,-rpath', '-Wl,/second/rpath',
+ '-Wl,-rpath,/first/rpath', 'arg3', '-Wl,-rpath', '-Wl,/second/rpath',
'-llib1', '-llib2',
'arg4',
'-Wl,--end-group',
- '-Xlinker,-rpath', '-Xlinker,/third/rpath', '-Xlinker,-rpath=/fourth/rpath',
+ '-Xlinker,-rpath', '-Xlinker,/third/rpath', '-Xlinker,-rpath,/fourth/rpath',
'-llib3', '-llib4',
'arg5', 'arg6']
@@ -95,13 +95,13 @@ class CompilerTest(unittest.TestCase):
def test_ccld_mode(self):
self.check_cc('dump-mode', [], "ccld")
self.check_cc('dump-mode', ['foo.c', '-o', 'foo'], "ccld")
- self.check_cc('dump-mode', ['foo.c', '-o', 'foo', '-Wl,-rpath=foo'], "ccld")
- self.check_cc('dump-mode', ['foo.o', 'bar.o', 'baz.o', '-o', 'foo', '-Wl,-rpath=foo'], "ccld")
+ self.check_cc('dump-mode', ['foo.c', '-o', 'foo', '-Wl,-rpath,foo'], "ccld")
+ self.check_cc('dump-mode', ['foo.o', 'bar.o', 'baz.o', '-o', 'foo', '-Wl,-rpath,foo'], "ccld")
def test_ld_mode(self):
self.check_ld('dump-mode', [], "ld")
- self.check_ld('dump-mode', ['foo.o', 'bar.o', 'baz.o', '-o', 'foo', '-Wl,-rpath=foo'], "ld")
+ self.check_ld('dump-mode', ['foo.o', 'bar.o', 'baz.o', '-o', 'foo', '-Wl,-rpath,foo'], "ld")
def test_includes(self):