gcc9: apply gcc PR 96796 to avoid cycling on certain subreg reloads

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96796

This may have caused the AArch64 build failure of PyTorch in:

https://github.com/NixOS/nixpkgs/pull/101917
This commit is contained in:
Daniël de Kok
2020-11-02 20:06:53 +01:00
parent 9843da727b
commit c81a429fb7
2 changed files with 268 additions and 1 deletions
+7 -1
View File
@@ -58,7 +58,13 @@ let majorVersion = "9";
inherit (stdenv) buildPlatform hostPlatform targetPlatform;
patches =
optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
# Fix ICE: Max. number of generated reload insns per insn is achieved (90)
#
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96796
#
# This patch can most likely be removed by a post 9.3.0-release.
[ ./avoid-cycling-subreg-reloads.patch ]
++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch
++ optional noSysDirs ../no-sys-dirs.patch
/* ++ optional (hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied
url = "https://git.busybox.net/buildroot/plain/package/gcc/${version}/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02";