autotools: Filter libtools when building with dpcpp (#32876)
Due to a [known issue](https://community.intel.com/t5/Intel-oneAPI-Data-Parallel-C/dpcpp-and-GNU-Autotools/m-p/1296985) with dpcpp, autotool-based builds that try to use it will fail because they try to link against temporary files that no longer exist. This commit filters those files out of the libtools script so that linking can work properly.
This commit is contained in:
parent
cfea21319f
commit
53cea629b7
1 changed files with 9 additions and 1 deletions
|
@ -266,7 +266,8 @@ def _set_autotools_environment_variables(self):
|
|||
def _do_patch_libtool(self):
|
||||
"""If configure generates a "libtool" script that does not correctly
|
||||
detect the compiler (and patch_libtool is set), patch in the correct
|
||||
flags for the Arm, Clang/Flang, Fujitsu and NVHPC compilers."""
|
||||
flags for the Arm, Clang/Flang, Fujitsu and NVHPC compilers. Also
|
||||
filter out spurious predep_objects for Intel dpcpp builds."""
|
||||
|
||||
# Exit early if we are required not to patch libtool
|
||||
if not self.patch_libtool:
|
||||
|
@ -300,6 +301,13 @@ def _patch_libtool(self, libtool_path):
|
|||
]
|
||||
for o in objfile:
|
||||
fs.filter_file(rehead + o, "", libtool_path)
|
||||
# Hack to filter out spurious predp_objects when building with
|
||||
# Intel dpcpp; see issue #32863
|
||||
if self.spec.satisfies("%dpcpp"):
|
||||
fs.filter_file(
|
||||
r"^(predep_objects=.*)/tmp/conftest-[0-9A-Fa-f]+\.o", r"\1", libtool_path
|
||||
)
|
||||
fs.filter_file(r"^(predep_objects=.*)/tmp/a-[0-9A-Fa-f]+\.o", r"\1", libtool_path)
|
||||
|
||||
@property
|
||||
def configure_directory(self):
|
||||
|
|
Loading…
Reference in a new issue