From d62c10ff76b3ba16940295371d61f22b02fa98df Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 16 Jan 2023 23:56:13 +0900 Subject: [PATCH] fix libtool filter for Fujitsu compilers (#34916) Since legit regular expressions are matched, do not pass string=True to the filter Refs #34897 --- lib/spack/spack/build_systems/autotools.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/spack/spack/build_systems/autotools.py b/lib/spack/spack/build_systems/autotools.py index 76e6bb27ce6..f49a6d4cff4 100644 --- a/lib/spack/spack/build_systems/autotools.py +++ b/lib/spack/spack/build_systems/autotools.py @@ -7,7 +7,7 @@ import os.path import stat import subprocess -from typing import List # novm +from typing import List # novm # noqa: F401 import llnl.util.filesystem as fs import llnl.util.tty as tty @@ -427,15 +427,15 @@ def _do_patch_libtool(self): x.filter(regex="-nostdlib", repl="", string=True) rehead = r"/\S*/" for o in [ - "fjhpctag.o", - "fjcrt0.o", - "fjlang08.o", - "fjomp.o", - "crti.o", - "crtbeginS.o", - "crtendS.o", + r"fjhpctag\.o", + r"fjcrt0\.o", + r"fjlang08\.o", + r"fjomp\.o", + r"crti\.o", + r"crtbeginS\.o", + r"crtendS\.o", ]: - x.filter(regex=(rehead + o), repl="", string=True) + x.filter(regex=(rehead + o), repl="") elif self.pkg.compiler.name == "dpcpp": # Hack to filter out spurious predep_objects when building with Intel dpcpp # (see https://github.com/spack/spack/issues/32863):