add more directories to implicit link exclusion

This commit is contained in:
Chris White 2021-07-23 16:25:31 -07:00 committed by Todd Gamblin
parent ace3753076
commit 7ea94d1103

View File

@ -274,15 +274,20 @@ def initconfig_hardware_entries(self):
# Fix for working around CMake adding implicit link directories
# returned by the BlueOS compilers to link executables with
# non-system default stdlib
_gcc_prefix = "/usr/tce/packages/gcc/gcc-4.9.3/lib64"
if os.path.exists(_gcc_prefix):
_gcc_prefix2 = pjoin(
_gcc_prefix,
"gcc/powerpc64le-unknown-linux-gnu/4.9.3")
_link_dirs = "{0};{1}".format(_gcc_prefix, _gcc_prefix2)
_roots = ["/usr/tce/packages/gcc/gcc-4.9.3",
"/usr/tce/packages/gcc/gcc-4.9.3/gnu"]
_subdirs = ["lib64",
"lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3"]
_existing_paths = []
for root in _roots:
for subdir in _subdirs:
_curr_path = pjoin(root, subdir)
if os.path.exists(_curr_path):
_existing_paths.append(_curr_path)
if _existing_paths:
entries.append(cmake_cache_string(
"BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE",
_link_dirs))
";".join(_existing_paths)))
return entries