gcc: use -idirafter for libc headers (#44081)
GCC C++ headers like cstdlib use `#include_next <stdlib.h>` to wrap libc headers. We're using `-isystem` for libc, which puts those headers too early in the search path. `-idirafter` fixes this so `include_next` works.
This commit is contained in:
parent
965bb4d3c0
commit
5e9c702fa7
1 changed files with 1 additions and 1 deletions
|
@ -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, "
|
||||
|
|
Loading…
Reference in a new issue