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
314893982e
commit
e1686eef7c
@ -1174,7 +1174,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 New Issue
Block a user