'Make sure ld -r is handled correctly on OS\'s where it doesn\'t
support rpaths.'

def test_ld_deps_reentrant(self):

    os.environ['SPACK_DEPENDENCIES'] = ':'.join([self.dep1])
    os.environ['SPACK_RPATH_DEPS'] = os.environ['SPACK_DEPENDENCIES']
    os.environ['SPACK_LINK_DEPS'] = os.environ['SPACK_DEPENDENCIES']
    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)))
