Merge pull request #237577 from raboof/build-gcc-parallel-and-reproducible

Build gcc parallel and reproducible

authored by Sergei Trofimovich and committed by GitHub df7727f0 603503c6

+30 -24
+3 -1
pkgs/development/compilers/gcc/10/default.nix
··· 55 55 # Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431 56 56 ../fix-bug-80431.patch 57 57 ../11/fix-struct-redefinition-on-glibc-2.36.patch 58 - ../install-info-files-serially.patch 59 58 ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch 60 59 ++ optional noSysDirs ../no-sys-dirs.patch 61 60 ++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv.patch ··· 237 236 buildFlags = optional 238 237 (targetPlatform == hostPlatform && hostPlatform == buildPlatform) 239 238 (if profiledCompiler then "profiledbootstrap" else "bootstrap"); 239 + 240 + # https://gcc.gnu.org/PR109898 241 + enableParallelInstalling = false; 240 242 241 243 inherit (callFile ../common/strip-attributes.nix { }) 242 244 stripDebugList
+3 -1
pkgs/development/compilers/gcc/11/default.nix
··· 59 59 # Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431 60 60 ../fix-bug-80431.patch 61 61 ./fix-struct-redefinition-on-glibc-2.36.patch 62 - ../install-info-files-serially.patch 63 62 ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch 64 63 ++ optional noSysDirs ../no-sys-dirs.patch 65 64 ++ optional (noSysDirs && hostPlatform.isRiscV) ../no-sys-dirs-riscv.patch ··· 253 252 let target = lib.optionalString (profiledCompiler) "profiled" 254 253 + lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap"; 255 254 in lib.optional (target != "") target; 255 + 256 + # https://gcc.gnu.org/PR109898 257 + enableParallelInstalling = false; 256 258 257 259 inherit (callFile ../common/strip-attributes.nix { }) 258 260 stripDebugList
+3 -1
pkgs/development/compilers/gcc/12/default.nix
··· 68 68 ../gnat-cflags-11.patch 69 69 ../gcc-12-gfortran-driving.patch 70 70 ../ppc-musl.patch 71 - ../install-info-files-serially.patch 72 71 73 72 # backport ICE fix on ccache code 74 73 ./lambda-ICE-PR109241.patch ··· 299 298 lib.optionalString (profiledCompiler) "profiled" + 300 299 lib.optionalString (targetPlatform == hostPlatform && hostPlatform == buildPlatform && !disableBootstrap) "bootstrap"; 301 300 in lib.optional (target != "") target; 301 + 302 + # https://gcc.gnu.org/PR109898 303 + enableParallelInstalling = false; 302 304 303 305 inherit (callFile ../common/strip-attributes.nix { }) 304 306 stripDebugList
+3
pkgs/development/compilers/gcc/13/default.nix
··· 298 298 stripDebugListTarget 299 299 preFixup; 300 300 301 + # https://gcc.gnu.org/PR109898 302 + enableParallelInstalling = false; 303 + 301 304 # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 302 305 ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; 303 306
+3 -1
pkgs/development/compilers/gcc/4.8/default.nix
··· 74 74 ../struct-ucontext-4.8.patch 75 75 ../sigsegv-not-declared.patch 76 76 ../res_state-not-declared.patch 77 - ../install-info-files-serially.patch 78 77 # gcc-11 compatibility 79 78 (fetchpatch { 80 79 name = "gcc4-char-reload.patch"; ··· 256 255 stripDebugList 257 256 stripDebugListTarget 258 257 preFixup; 258 + 259 + # https://gcc.gnu.org/PR109898 260 + enableParallelInstalling = false; 259 261 260 262 doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv 261 263
+3 -1
pkgs/development/compilers/gcc/4.9/default.nix
··· 63 63 [ ../9/fix-struct-redefinition-on-glibc-2.36.patch ../use-source-date-epoch.patch 64 64 ../parallel-bconfig.patch ./parallel-strsignal.patch 65 65 ./libsanitizer.patch 66 - ../install-info-files-serially.patch 67 66 (fetchpatch { 68 67 name = "avoid-ustat-glibc-2.28.patch"; 69 68 url = "https://gitweb.gentoo.org/proj/gcc-patches.git/plain/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch?id=55fcb515620a8f7d3bb77eba938aa0fcf0d67c96"; ··· 272 271 buildFlags = optional 273 272 (targetPlatform == hostPlatform && hostPlatform == buildPlatform) 274 273 (if profiledCompiler then "profiledbootstrap" else "bootstrap"); 274 + 275 + # https://gcc.gnu.org/PR109898 276 + enableParallelInstalling = false; 275 277 276 278 inherit (callFile ../common/strip-attributes.nix { }) 277 279 stripDebugList
+3 -1
pkgs/development/compilers/gcc/6/default.nix
··· 68 68 69 69 # Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431 70 70 ../fix-bug-80431.patch 71 - ../install-info-files-serially.patch 72 71 ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch 73 72 ++ optional noSysDirs ../no-sys-dirs.patch 74 73 ++ optional langAda ../gnat-cflags.patch ··· 290 289 buildFlags = optional 291 290 (targetPlatform == hostPlatform && hostPlatform == buildPlatform) 292 291 (if profiledCompiler then "profiledbootstrap" else "bootstrap"); 292 + 293 + # https://gcc.gnu.org/PR109898 294 + enableParallelInstalling = false; 293 295 294 296 inherit (callFile ../common/strip-attributes.nix { }) 295 297 stripDebugList
+3 -1
pkgs/development/compilers/gcc/7/default.nix
··· 61 61 ../fix-bug-80431.patch 62 62 63 63 ../9/fix-struct-redefinition-on-glibc-2.36.patch 64 - ../install-info-files-serially.patch 65 64 ] 66 65 ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch 67 66 ++ optionals targetPlatform.isNetBSD [ ··· 243 242 buildFlags = optional 244 243 (targetPlatform == hostPlatform && hostPlatform == buildPlatform) 245 244 (if profiledCompiler then "profiledbootstrap" else "bootstrap"); 245 + 246 + # https://gcc.gnu.org/PR109898 247 + enableParallelInstalling = false; 246 248 247 249 inherit (callFile ../common/strip-attributes.nix { }) 248 250 stripDebugList
+3 -1
pkgs/development/compilers/gcc/8/default.nix
··· 50 50 # Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431 51 51 ../fix-bug-80431.patch 52 52 ../9/fix-struct-redefinition-on-glibc-2.36.patch 53 - ../install-info-files-serially.patch 54 53 ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch 55 54 ++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch 56 55 ++ optional noSysDirs ../no-sys-dirs.patch ··· 220 219 buildFlags = optional 221 220 (targetPlatform == hostPlatform && hostPlatform == buildPlatform) 222 221 (if profiledCompiler then "profiledbootstrap" else "bootstrap"); 222 + 223 + # https://gcc.gnu.org/PR109898 224 + enableParallelInstalling = false; 223 225 224 226 inherit (callFile ../common/strip-attributes.nix { }) 225 227 stripDebugList
+3 -1
pkgs/development/compilers/gcc/9/default.nix
··· 59 59 ./fix-struct-redefinition-on-glibc-2.36.patch 60 60 # Fix https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431 61 61 ../fix-bug-80431.patch 62 - ../install-info-files-serially.patch 63 62 ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch 64 63 ++ optional targetPlatform.isNetBSD ../libstdc++-netbsd-ctypes.patch 65 64 ++ optional noSysDirs ../no-sys-dirs.patch ··· 234 233 buildFlags = optional 235 234 (targetPlatform == hostPlatform && hostPlatform == buildPlatform) 236 235 (if profiledCompiler then "profiledbootstrap" else "bootstrap"); 236 + 237 + # https://gcc.gnu.org/PR109898 238 + enableParallelInstalling = false; 237 239 238 240 inherit (callFile ../common/strip-attributes.nix { }) 239 241 stripDebugList
-15
pkgs/development/compilers/gcc/install-info-files-serially.patch
··· 1 - diff -Naur gcc-12.2.0/gcc/Makefile.in gcc-12.2.0-new/gcc/Makefile.in 2 - --- gcc-12.2.0/gcc/Makefile.in 2022-08-19 10:09:52.280658631 +0200 3 - +++ gcc-12.2.0-new/gcc/Makefile.in 2023-05-04 14:35:44.401420184 +0200 4 - @@ -3781,6 +3781,11 @@ 5 - fi; \ 6 - fi 7 - 8 - +# We don't care about the order in which the info files are built, but 9 - +# install-info doesn't support multiple parallel invocations writing to 10 - +# the same `dir-file`, so we have to disable parallelism for that reason: 11 - +.NOTPARALLEL: install-info 12 - + 13 - # Install the info files. 14 - # $(INSTALL_DATA) might be a relative pathname, so we can't cd into srcdir 15 - # to do the install.