diff --git a/pkgs/development/compilers/gcc/common/builder.nix b/pkgs/development/compilers/gcc/common/builder.nix index e73542263df2f..cd8d4572a158b 100644 --- a/pkgs/development/compilers/gcc/common/builder.nix +++ b/pkgs/development/compilers/gcc/common/builder.nix @@ -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}