diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index b3bb491d7f..2633207113 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -1172,7 +1172,7 @@ def _post_buildcache_install_hook(self): os.path.exists(os.path.join(header_dir, h)) for h in libc.package_class.representative_headers ): - relocation_args.append(f"-isystem {header_dir}") + relocation_args.append(f"-idirafter {header_dir}") else: tty.warn( f"Cannot relocate {specs_file} include directories, "