diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2016-04-21 23:10:10 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2016-04-21 23:12:33 -0700 |
commit | fa02f94ca4bada75cca4248665bbc007412294c5 (patch) | |
tree | 9176ee6794622cbbadcfb5e222f16cc15346897b /lib | |
parent | 5c4bb69af9cceca0b3c4380357ab6e74e7554067 (diff) | |
download | spack-fa02f94ca4bada75cca4248665bbc007412294c5.tar.gz spack-fa02f94ca4bada75cca4248665bbc007412294c5.tar.bz2 spack-fa02f94ca4bada75cca4248665bbc007412294c5.tar.xz spack-fa02f94ca4bada75cca4248665bbc007412294c5.zip |
Regression test for not adding RPATHs with `ld -r` (#809, #821)
- ld -r is only broken with rpaths on OSX; this tests that
specific case.
- test should still work cross-platform.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/test/cc.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/spack/spack/test/cc.py b/lib/spack/spack/test/cc.py index 0b1aeb2a8f..594cd6efe9 100644 --- a/lib/spack/spack/test/cc.py +++ b/lib/spack/spack/test/cc.py @@ -219,3 +219,27 @@ class CompilerTest(unittest.TestCase): ' '.join(test_command)) + def test_ld_deps_reentrant(self): + """Make sure ld -r is handled correctly on OS's where it doesn't + support rpaths.""" + os.environ['SPACK_DEPENDENCIES'] = ':'.join([self.dep1]) + + os.environ['SPACK_SHORT_SPEC'] = "foo@1.2=linux-x86_64" + reentrant_test_command = ['-r'] + test_command + self.check_ld('dump-args', reentrant_test_command, + 'ld ' + + '-rpath ' + self.prefix + '/lib ' + + '-rpath ' + self.prefix + '/lib64 ' + + + '-L' + self.dep1 + '/lib ' + + '-rpath ' + self.dep1 + '/lib ' + + + '-r ' + + ' '.join(test_command)) + + os.environ['SPACK_SHORT_SPEC'] = "foo@1.2=darwin-x86_64" + self.check_ld('dump-args', reentrant_test_command, + 'ld ' + + '-L' + self.dep1 + '/lib ' + + '-r ' + + ' '.join(test_command)) |