Merge pull request #245550 from trofi/gcc-restore-sys-include

gcc: revert "do not install sys-include headers for cross-compilers."
This commit is contained in:
Adam Joseph 2023-07-28 02:55:12 +00:00 committed by GitHub
commit 8470989a96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -251,17 +251,6 @@ originalAttrs: (stdenv.mkDerivation (finalAttrs: originalAttrs // {
done
fi
# Cross-compiler specific:
# --with-headers=$dir option triggers gcc to make a private copy
# of $dir headers and use it later as `-isysroot`. This prevents
# cc-wrapper from overriding libc headers with `-idirafter`.
# It should be safe to drop it and rely solely on the cc-wrapper.
local sysinc_dir=$out/''${targetConfig+$targetConfig/}sys-include
if [ -d "$sysinc_dir" ]; then
chmod -R u+w "$out/''${targetConfig+$targetConfig/}sys-include"
rm -rfv "$out/''${targetConfig+$targetConfig/}sys-include"
fi
# Get rid of some "fixed" header files
rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux,sys/mount.h,bits/statx.h}