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.
This commit is contained in:
Erik Schnetter 2016-01-17 10:46:21 -05:00
parent 63911d4165
commit 2cd9ad8ce6
3 changed files with 10 additions and 10 deletions

View File

@ -1711,15 +1711,15 @@ Compile-time library search paths
* ``-L$dep_prefix/lib`` * ``-L$dep_prefix/lib``
* ``-L$dep_prefix/lib64`` * ``-L$dep_prefix/lib64``
Runtime library search paths (RPATHs) Runtime library search paths (RPATHs)
* ``-Wl,-rpath=$dep_prefix/lib`` * ``-Wl,-rpath,$dep_prefix/lib``
* ``-Wl,-rpath=$dep_prefix/lib64`` * ``-Wl,-rpath,$dep_prefix/lib64``
Include search paths Include search paths
* ``-I$dep_prefix/include`` * ``-I$dep_prefix/include``
An example of this would be the ``libdwarf`` build, which has one An example of this would be the ``libdwarf`` build, which has one
dependency: ``libelf``. Every call to ``cc`` in the ``libdwarf`` dependency: ``libelf``. Every call to ``cc`` in the ``libdwarf``
build will have ``-I$LIBELF_PREFIX/include``, 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 inserted on the command line. This is done transparently to the
project's build system, which will just think it's using a system project's build system, which will just think it's using a system
where ``libelf`` is readily available. Because of this, you **do where ``libelf`` is readily available. Because of this, you **do

View File

@ -1220,8 +1220,8 @@ def rpath(self):
@property @property
def rpath_args(self): def rpath_args(self):
"""Get the rpath args as a string, with -Wl,-rpath= for each element.""" """Get the rpath args as a string, with -Wl,-rpath, for each element."""
return " ".join("-Wl,-rpath=%s" % p for p in self.rpath) return " ".join("-Wl,-rpath,%s" % p for p in self.rpath)
def validate_package_url(url_string): def validate_package_url(url_string):

View File

@ -39,11 +39,11 @@
'arg1', 'arg1',
'-Wl,--start-group', '-Wl,--start-group',
'arg2', 'arg2',
'-Wl,-rpath=/first/rpath', 'arg3', '-Wl,-rpath', '-Wl,/second/rpath', '-Wl,-rpath,/first/rpath', 'arg3', '-Wl,-rpath', '-Wl,/second/rpath',
'-llib1', '-llib2', '-llib1', '-llib2',
'arg4', 'arg4',
'-Wl,--end-group', '-Wl,--end-group',
'-Xlinker,-rpath', '-Xlinker,/third/rpath', '-Xlinker,-rpath=/fourth/rpath', '-Xlinker,-rpath', '-Xlinker,/third/rpath', '-Xlinker,-rpath,/fourth/rpath',
'-llib3', '-llib4', '-llib3', '-llib4',
'arg5', 'arg6'] 'arg5', 'arg6']
@ -95,13 +95,13 @@ def test_cpp_mode(self):
def test_ccld_mode(self): def test_ccld_mode(self):
self.check_cc('dump-mode', [], "ccld") 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'], "ccld")
self.check_cc('dump-mode', ['foo.c', '-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") self.check_cc('dump-mode', ['foo.o', 'bar.o', 'baz.o', '-o', 'foo', '-Wl,-rpath,foo'], "ccld")
def test_ld_mode(self): def test_ld_mode(self):
self.check_ld('dump-mode', [], "ld") 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): def test_includes(self):