Index: compiler-rt/trunk/test/asan/lit.cfg =================================================================== --- compiler-rt/trunk/test/asan/lit.cfg +++ compiler-rt/trunk/test/asan/lit.cfg @@ -138,7 +138,10 @@ if config.host_os == 'Darwin': config.substitutions.append( ("%ld_flags_rpath_exe", '-Wl,-rpath,@executable_path/ %dynamiclib') ) config.substitutions.append( ("%ld_flags_rpath_so", '-install_name @rpath/`basename %dynamiclib`') ) -elif config.host_os in ['Linux', 'FreeBSD']: +elif config.host_os == 'FreeBSD': + config.substitutions.append( ("%ld_flags_rpath_exe", "-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec") ) + config.substitutions.append( ("%ld_flags_rpath_so", '') ) +elif config.host_os == 'Linux': config.substitutions.append( ("%ld_flags_rpath_exe", "-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec") ) config.substitutions.append( ("%ld_flags_rpath_so", '') )