{gcc10,gfortran10}: drop

EOL since 2023; no longer used in the tree.

Emily 4e7ee62b 2a196a72

+160 -610
+1 -1
doc/release-notes/rl-2511.section.md
··· 20 20 21 21 - The `offrss` package was removed due to lack of upstream maintenance since 2012. It's recommended for users to migrate to another RSS reader 22 22 23 - - GCC 9 has been removed, as it has reached end‐of‐life upstream and is no longer supported. 23 + - GCC 9 and 10 have been removed, as they have reached end‐of‐life upstream and are no longer supported. 24 24 25 25 - `base16-builder` node package has been removed due to lack of upstream maintenance. 26 26 - `gentium` package now provides `Gentium-*.ttf` files, and not `GentiumPlus-*.ttf` files like before. The font identifiers `Gentium Plus*` are available in the `gentium-plus` package, and if you want to use the more recently updated package `gentium` [by sil](https://software.sil.org/gentium/), you should update your configuration files to use the `Gentium` font identifier.
-10
pkgs/by-name/gf/gfortran10/package.nix
··· 1 - { wrapCC, gcc10 }: 2 - wrapCC ( 3 - gcc10.cc.override { 4 - name = "gfortran"; 5 - langFortran = true; 6 - langCC = false; 7 - langC = false; 8 - profiledCompiler = false; 9 - } 10 - )
+126 -133
pkgs/development/compilers/gcc/common/libgcc.nix
··· 41 41 ) 42 42 43 43 ] 44 - ++ 44 + ++ ( 45 + let 46 + targetPlatformSlash = 47 + if lib.systems.equals hostPlatform targetPlatform then "" else "${targetPlatform.config}/"; 45 48 46 - # nixpkgs did not add the "libgcc" output until gcc11. In theory 47 - # the following condition can be changed to `true`, but that has not 48 - # been tested. 49 - lib.optionals (lib.versionAtLeast version "11.0") 49 + # If we are building a cross-compiler and the target libc provided 50 + # to us at build time has a libgcc, use that instead of building a 51 + # new one. This avoids having two separate (but identical) libgcc 52 + # outpaths in the closure of most packages, which can be confusing. 53 + useLibgccFromTargetLibc = libcCross != null && libcCross ? passthru.libgcc; 50 54 51 - ( 52 - let 53 - targetPlatformSlash = 54 - if lib.systems.equals hostPlatform targetPlatform then "" else "${targetPlatform.config}/"; 55 + enableLibGccOutput = 56 + (!stdenv.targetPlatform.isWindows || (lib.systems.equals stdenv.targetPlatform stdenv.hostPlatform)) 57 + && !langJit 58 + && !stdenv.hostPlatform.isDarwin 59 + && enableShared 60 + && !useLibgccFromTargetLibc; 55 61 56 - # If we are building a cross-compiler and the target libc provided 57 - # to us at build time has a libgcc, use that instead of building a 58 - # new one. This avoids having two separate (but identical) libgcc 59 - # outpaths in the closure of most packages, which can be confusing. 60 - useLibgccFromTargetLibc = libcCross != null && libcCross ? passthru.libgcc; 62 + # For some reason libgcc_s.so has major-version "2" on m68k but 63 + # "1" everywhere else. Might be worth changing this to "*". 64 + libgcc_s-version-major = if targetPlatform.isM68k then "2" else "1"; 61 65 62 - enableLibGccOutput = 63 - (!stdenv.targetPlatform.isWindows || (lib.systems.equals stdenv.targetPlatform stdenv.hostPlatform)) 64 - && !langJit 65 - && !stdenv.hostPlatform.isDarwin 66 - && enableShared 67 - && !useLibgccFromTargetLibc; 66 + in 67 + [ 68 68 69 - # For some reason libgcc_s.so has major-version "2" on m68k but 70 - # "1" everywhere else. Might be worth changing this to "*". 71 - libgcc_s-version-major = if targetPlatform.isM68k then "2" else "1"; 69 + ( 70 + pkg: 71 + pkg.overrideAttrs ( 72 + previousAttrs: 73 + lib.optionalAttrs useLibgccFromTargetLibc { 74 + passthru = (previousAttrs.passthru or { }) // { 75 + inherit (libcCross) libgcc; 76 + }; 77 + } 78 + ) 79 + ) 72 80 73 - in 74 - [ 81 + ( 82 + pkg: 83 + pkg.overrideAttrs ( 84 + previousAttrs: 85 + lib.optionalAttrs ((!langC) || langJit || enableLibGccOutput) { 86 + outputs = previousAttrs.outputs ++ lib.optionals enableLibGccOutput [ "libgcc" ]; 87 + # This is a separate phase because gcc assembles its phase scripts 88 + # in bash instead of nix (we should fix that). 89 + preFixupPhases = 90 + (previousAttrs.preFixupPhases or [ ]) 91 + ++ lib.optionals ((!langC) || enableLibGccOutput) [ "preFixupLibGccPhase" ]; 92 + preFixupLibGccPhase = 93 + # delete extra/unused builds of libgcc_s in non-langC builds 94 + # (i.e. libgccjit, gnat, etc) to avoid potential confusion 95 + lib.optionalString (!langC) '' 96 + rm -f $out/lib/libgcc_s.so* 97 + '' 75 98 76 - ( 77 - pkg: 78 - pkg.overrideAttrs ( 79 - previousAttrs: 80 - lib.optionalAttrs useLibgccFromTargetLibc { 81 - passthru = (previousAttrs.passthru or { }) // { 82 - inherit (libcCross) libgcc; 83 - }; 84 - } 85 - ) 86 - ) 87 - 88 - ( 89 - pkg: 90 - pkg.overrideAttrs ( 91 - previousAttrs: 92 - lib.optionalAttrs ((!langC) || langJit || enableLibGccOutput) { 93 - outputs = previousAttrs.outputs ++ lib.optionals enableLibGccOutput [ "libgcc" ]; 94 - # This is a separate phase because gcc assembles its phase scripts 95 - # in bash instead of nix (we should fix that). 96 - preFixupPhases = 97 - (previousAttrs.preFixupPhases or [ ]) 98 - ++ lib.optionals ((!langC) || enableLibGccOutput) [ "preFixupLibGccPhase" ]; 99 - preFixupLibGccPhase = 100 - # delete extra/unused builds of libgcc_s in non-langC builds 101 - # (i.e. libgccjit, gnat, etc) to avoid potential confusion 102 - lib.optionalString (!langC) '' 103 - rm -f $out/lib/libgcc_s.so* 104 - '' 105 - 106 - # move `libgcc_s.so` into its own output, `$libgcc` 107 - # We maintain $libgcc/lib/$target/ structure to make sure target 108 - # strip runs over libgcc_s.so and remove debug references to headers: 109 - # https://github.com/NixOS/nixpkgs/issues/316114 110 - + lib.optionalString enableLibGccOutput ( 111 - '' 112 - # move libgcc from lib to its own output (libgcc) 113 - mkdir -p $libgcc/${targetPlatformSlash}lib 114 - mv $lib/${targetPlatformSlash}lib/libgcc_s.so $libgcc/${targetPlatformSlash}lib/ 115 - mv $lib/${targetPlatformSlash}lib/libgcc_s.so.${libgcc_s-version-major} $libgcc/${targetPlatformSlash}lib/ 116 - ln -s $libgcc/${targetPlatformSlash}lib/libgcc_s.so $lib/${targetPlatformSlash}lib/ 117 - ln -s $libgcc/${targetPlatformSlash}lib/libgcc_s.so.${libgcc_s-version-major} $lib/${targetPlatformSlash}lib/ 118 - '' 119 - + lib.optionalString (targetPlatformSlash != "") '' 120 - ln -s ${targetPlatformSlash}lib $libgcc/lib 121 - '' 122 - # 123 - # Nixpkgs ordinarily turns dynamic linking into pseudo-static linking: 124 - # libraries are still loaded dynamically, exactly which copy of each 125 - # library is loaded is permanently fixed at compile time (via RUNPATH). 126 - # For libgcc_s we must revert to the "impure dynamic linking" style found 127 - # in imperative software distributions. We must do this because 128 - # `libgcc_s` calls `malloc()` and therefore has a `DT_NEEDED` for `libc`, 129 - # which creates two problems: 130 - # 131 - # 1. A circular package dependency `glibc`<-`libgcc`<-`glibc` 132 - # 133 - # 2. According to the `-Wl,-rpath` flags added by Nixpkgs' `ld-wrapper`, 134 - # the two versions of `glibc` in the cycle above are actually 135 - # different packages. The later one is compiled by this `gcc`, but 136 - # the earlier one was compiled by the compiler *that compiled* this 137 - # `gcc` (usually the bootstrapFiles). In any event, the `glibc` 138 - # dynamic loader won't honor that specificity without namespaced 139 - # manual loads (`dlmopen()`). Once a `libc` is present in the address 140 - # space of a process, that `libc` will be used to satisfy all 141 - # `DT_NEEDED`s for `libc`, regardless of `RUNPATH`s. 142 - # 143 - # So we wipe the RUNPATH using `patchelf --set-rpath ""`. We can't use 144 - # `patchelf --remove-rpath`, because at least as of patchelf 0.15.0 it 145 - # will leave the old RUNPATH string in the file where the reference 146 - # scanner can still find it: 147 - # 148 - # https://github.com/NixOS/patchelf/issues/453 149 - # 150 - # Note: we might be using the bootstrapFiles' copy of patchelf, so we have 151 - # to keep doing it this way until both the issue is fixed *and* all the 152 - # bootstrapFiles are regenerated, on every platform. 153 - # 154 - # This patchelfing is *not* effectively equivalent to copying 155 - # `libgcc_s` into `glibc`'s outpath. There is one minor and one 156 - # major difference: 157 - # 158 - # 1. (Minor): multiple builds of `glibc` (say, with different 159 - # overrides or parameters) will all reference a single store 160 - # path: 161 - # 162 - # /nix/store/xxx...xxx-gcc-libgcc/lib/libgcc_s.so.1 163 - # 164 - # This many-to-one referrer relationship will be visible in the store's 165 - # dependency graph, and will be available to `nix-store -q` queries. 166 - # Copying `libgcc_s` into each of its referrers would lose that 167 - # information. 168 - # 169 - # 2. (Major): by referencing `libgcc_s.so.1`, rather than copying it, we 170 - # are still able to run `nix-store -qd` on it to find out how it got 171 - # built! Most importantly, we can see from that deriver which compiler 172 - # was used to build it (or if it is part of the unpacked 173 - # bootstrap-files). Copying `libgcc_s.so.1` from one outpath to 174 - # another eliminates the ability to make these queries. 175 - # 176 - + '' 177 - patchelf --set-rpath "" $libgcc/lib/libgcc_s.so.${libgcc_s-version-major} 178 - '' 179 - ); 180 - } 181 - ) 182 - ) 183 - ] 99 + # move `libgcc_s.so` into its own output, `$libgcc` 100 + # We maintain $libgcc/lib/$target/ structure to make sure target 101 + # strip runs over libgcc_s.so and remove debug references to headers: 102 + # https://github.com/NixOS/nixpkgs/issues/316114 103 + + lib.optionalString enableLibGccOutput ( 104 + '' 105 + # move libgcc from lib to its own output (libgcc) 106 + mkdir -p $libgcc/${targetPlatformSlash}lib 107 + mv $lib/${targetPlatformSlash}lib/libgcc_s.so $libgcc/${targetPlatformSlash}lib/ 108 + mv $lib/${targetPlatformSlash}lib/libgcc_s.so.${libgcc_s-version-major} $libgcc/${targetPlatformSlash}lib/ 109 + ln -s $libgcc/${targetPlatformSlash}lib/libgcc_s.so $lib/${targetPlatformSlash}lib/ 110 + ln -s $libgcc/${targetPlatformSlash}lib/libgcc_s.so.${libgcc_s-version-major} $lib/${targetPlatformSlash}lib/ 111 + '' 112 + + lib.optionalString (targetPlatformSlash != "") '' 113 + ln -s ${targetPlatformSlash}lib $libgcc/lib 114 + '' 115 + # 116 + # Nixpkgs ordinarily turns dynamic linking into pseudo-static linking: 117 + # libraries are still loaded dynamically, exactly which copy of each 118 + # library is loaded is permanently fixed at compile time (via RUNPATH). 119 + # For libgcc_s we must revert to the "impure dynamic linking" style found 120 + # in imperative software distributions. We must do this because 121 + # `libgcc_s` calls `malloc()` and therefore has a `DT_NEEDED` for `libc`, 122 + # which creates two problems: 123 + # 124 + # 1. A circular package dependency `glibc`<-`libgcc`<-`glibc` 125 + # 126 + # 2. According to the `-Wl,-rpath` flags added by Nixpkgs' `ld-wrapper`, 127 + # the two versions of `glibc` in the cycle above are actually 128 + # different packages. The later one is compiled by this `gcc`, but 129 + # the earlier one was compiled by the compiler *that compiled* this 130 + # `gcc` (usually the bootstrapFiles). In any event, the `glibc` 131 + # dynamic loader won't honor that specificity without namespaced 132 + # manual loads (`dlmopen()`). Once a `libc` is present in the address 133 + # space of a process, that `libc` will be used to satisfy all 134 + # `DT_NEEDED`s for `libc`, regardless of `RUNPATH`s. 135 + # 136 + # So we wipe the RUNPATH using `patchelf --set-rpath ""`. We can't use 137 + # `patchelf --remove-rpath`, because at least as of patchelf 0.15.0 it 138 + # will leave the old RUNPATH string in the file where the reference 139 + # scanner can still find it: 140 + # 141 + # https://github.com/NixOS/patchelf/issues/453 142 + # 143 + # Note: we might be using the bootstrapFiles' copy of patchelf, so we have 144 + # to keep doing it this way until both the issue is fixed *and* all the 145 + # bootstrapFiles are regenerated, on every platform. 146 + # 147 + # This patchelfing is *not* effectively equivalent to copying 148 + # `libgcc_s` into `glibc`'s outpath. There is one minor and one 149 + # major difference: 150 + # 151 + # 1. (Minor): multiple builds of `glibc` (say, with different 152 + # overrides or parameters) will all reference a single store 153 + # path: 154 + # 155 + # /nix/store/xxx...xxx-gcc-libgcc/lib/libgcc_s.so.1 156 + # 157 + # This many-to-one referrer relationship will be visible in the store's 158 + # dependency graph, and will be available to `nix-store -q` queries. 159 + # Copying `libgcc_s` into each of its referrers would lose that 160 + # information. 161 + # 162 + # 2. (Major): by referencing `libgcc_s.so.1`, rather than copying it, we 163 + # are still able to run `nix-store -qd` on it to find out how it got 164 + # built! Most importantly, we can see from that deriver which compiler 165 + # was used to build it (or if it is part of the unpacked 166 + # bootstrap-files). Copying `libgcc_s.so.1` from one outpath to 167 + # another eliminates the ability to make these queries. 168 + # 169 + + '' 170 + patchelf --set-rpath "" $libgcc/lib/libgcc_s.so.${libgcc_s-version-major} 171 + '' 172 + ); 173 + } 174 + ) 184 175 ) 176 + ] 177 + ) 185 178 )
+29 -48
pkgs/development/compilers/gcc/default.nix
··· 82 82 atLeast14 = versionAtLeast version "14"; 83 83 atLeast13 = versionAtLeast version "13"; 84 84 atLeast12 = versionAtLeast version "12"; 85 - atLeast11 = versionAtLeast version "11"; 86 85 is14 = majorVersion == "14"; 87 86 is13 = majorVersion == "13"; 88 87 is12 = majorVersion == "12"; 89 88 is11 = majorVersion == "11"; 90 - is10 = majorVersion == "10"; 91 89 92 90 # releases have a form: MAJOR.MINOR.MICRO, like 14.2.1 93 91 # snapshots have a form like MAJOR.MINOR.MICRO.DATE, like 14.2.1.20250322 ··· 101 99 # "14.2.0" -> "14.2.0" 102 100 baseVersion = lib.concatStringsSep "." (lib.take 3 (lib.splitVersion version)); 103 101 104 - disableBootstrap = atLeast11 && !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler); 102 + disableBootstrap = !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler); 105 103 106 104 inherit (stdenv) buildPlatform hostPlatform targetPlatform; 107 105 targetConfig = ··· 224 222 "mirror://gcc/snapshots/${majorVersion}-${snapDate}/gcc-${majorVersion}-${snapDate}.tar.xz" 225 223 else 226 224 "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"; 227 - ${if is10 || is11 || is13 then "hash" else "sha256"} = gccVersions.srcHashForVersion version; 225 + ${if is11 || is13 then "hash" else "sha256"} = gccVersions.srcHashForVersion version; 228 226 }; 229 227 230 228 inherit patches; ··· 342 340 buildFlags = 343 341 # we do not yet have Nix-driven profiling 344 342 assert atLeast12 -> (profiledCompiler -> !disableBootstrap); 345 - if atLeast11 then 346 - let 347 - target = 348 - optionalString (profiledCompiler) "profiled" 349 - + optionalString ( 350 - (lib.systems.equals targetPlatform hostPlatform) 351 - && (lib.systems.equals hostPlatform buildPlatform) 352 - && !disableBootstrap 353 - ) "bootstrap"; 354 - in 355 - optional (target != "") target 356 - else 357 - optional ( 358 - (lib.systems.equals targetPlatform hostPlatform) && (lib.systems.equals hostPlatform buildPlatform) 359 - ) (if profiledCompiler then "profiledbootstrap" else "bootstrap"); 343 + let 344 + target = 345 + optionalString (profiledCompiler) "profiled" 346 + + optionalString ( 347 + (lib.systems.equals targetPlatform hostPlatform) 348 + && (lib.systems.equals hostPlatform buildPlatform) 349 + && !disableBootstrap 350 + ) "bootstrap"; 351 + in 352 + optional (target != "") target; 360 353 361 354 inherit (callFile ./common/strip-attributes.nix { }) 362 355 stripDebugList ··· 421 414 ; 422 415 isGNU = true; 423 416 hardeningUnsupportedFlags = 424 - optional (!atLeast11) "zerocallusedregs" 425 - ++ optionals (!atLeast12) [ 417 + optionals (!atLeast12) [ 426 418 "fortify3" 427 419 "trivialautovarinit" 428 420 ] ··· 452 444 platforms 453 445 teams 454 446 ; 455 - } 456 - // optionalAttrs (!atLeast11) { 457 - badPlatforms = [ "aarch64-darwin" ]; 458 - } 459 - // optionalAttrs is10 { 460 - badPlatforms = 461 - if (!lib.systems.equals targetPlatform hostPlatform) then [ "aarch64-darwin" ] else [ ]; 462 447 }; 463 448 } 464 449 // optionalAttrs enableMultilib { 465 450 dontMoveLib64 = true; 466 451 } 467 452 )) 468 - ( 469 - [ 470 - (callPackage ./common/libgcc.nix { 471 - inherit 472 - version 473 - langC 474 - langCC 475 - langJit 476 - targetPlatform 477 - hostPlatform 478 - withoutTargetLibc 479 - enableShared 480 - libcCross 481 - ; 482 - }) 483 - ] 484 - ++ optionals atLeast11 [ 485 - (callPackage ./common/checksum.nix { inherit langC langCC; }) 486 - ] 487 - ) 453 + ([ 454 + (callPackage ./common/libgcc.nix { 455 + inherit 456 + version 457 + langC 458 + langCC 459 + langJit 460 + targetPlatform 461 + hostPlatform 462 + withoutTargetLibc 463 + enableShared 464 + libcCross 465 + ; 466 + }) 467 + (callPackage ./common/checksum.nix { inherit langC langCC; }) 468 + ])
-306
pkgs/development/compilers/gcc/patches/10/Added-mcf-thread-model-support-from-mcfgthread.patch
··· 1 - From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001 2 - From: Liu Hao <lh_mouse@126.com> 3 - Date: Wed, 25 Apr 2018 21:54:19 +0800 4 - Subject: [PATCH] Added 'mcf' thread model support from mcfgthread. 5 - 6 - Signed-off-by: Liu Hao <lh_mouse@126.com> 7 - --- 8 - config/gthr.m4 | 1 + 9 - gcc/config.gcc | 3 +++ 10 - gcc/config/i386/mingw-mcfgthread.h | 1 + 11 - gcc/config/i386/mingw-w64.h | 2 +- 12 - gcc/config/i386/mingw32.h | 11 ++++++++++- 13 - gcc/configure | 2 +- 14 - gcc/configure.ac | 2 +- 15 - libatomic/configure.tgt | 2 +- 16 - libgcc/config.host | 6 ++++++ 17 - libgcc/config/i386/gthr-mcf.h | 1 + 18 - libgcc/config/i386/t-mingw-mcfgthread | 2 ++ 19 - libgcc/configure | 1 + 20 - libstdc++-v3/configure | 1 + 21 - libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++ 22 - libstdc++-v3/libsupc++/guard.cc | 23 +++++++++++++++++++++++ 23 - libstdc++-v3/src/c++11/thread.cc | 9 +++++++++ 24 - 16 files changed, 80 insertions(+), 5 deletions(-) 25 - create mode 100644 gcc/config/i386/mingw-mcfgthread.h 26 - create mode 100644 libgcc/config/i386/gthr-mcf.h 27 - create mode 100644 libgcc/config/i386/t-mingw-mcfgthread 28 - 29 - diff --git a/config/gthr.m4 b/config/gthr.m4 30 - index 7b29f1f3327..82e21fe1709 100644 31 - --- a/config/gthr.m4 32 - +++ b/config/gthr.m4 33 - @@ -21,6 +21,7 @@ case $1 in 34 - tpf) thread_header=config/s390/gthr-tpf.h ;; 35 - vxworks) thread_header=config/gthr-vxworks.h ;; 36 - win32) thread_header=config/i386/gthr-win32.h ;; 37 - + mcf) thread_header=config/i386/gthr-mcf.h ;; 38 - esac 39 - AC_SUBST(thread_header) 40 - ]) 41 - diff --git a/gcc/config.gcc b/gcc/config.gcc 42 - index 46a9029acec..112c24e95a3 100644 43 - --- a/gcc/config.gcc 44 - +++ b/gcc/config.gcc 45 - @@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) 46 - if test x$enable_threads = xposix ; then 47 - tm_file="${tm_file} i386/mingw-pthread.h" 48 - fi 49 - + if test x$enable_threads = xmcf ; then 50 - + tm_file="${tm_file} i386/mingw-mcfgthread.h" 51 - + fi 52 - tm_file="${tm_file} i386/mingw32.h" 53 - # This makes the logic if mingw's or the w64 feature set has to be used 54 - case ${target} in 55 - diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h 56 - new file mode 100644 57 - index 00000000000..ec381a7798f 58 - --- /dev/null 59 - +++ b/gcc/config/i386/mingw-mcfgthread.h 60 - @@ -0,0 +1 @@ 61 - +#define TARGET_USE_MCFGTHREAD 1 62 - diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h 63 - index 484dc7a9e9f..a15bbeea500 100644 64 - --- a/gcc/config/i386/mingw-w64.h 65 - +++ b/gcc/config/i386/mingw-w64.h 66 - @@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see 67 - "%{mwindows:-lgdi32 -lcomdlg32} " \ 68 - "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 69 - fvtable-verify=std:-lvtv -lpsapi} " \ 70 - - "-ladvapi32 -lshell32 -luser32 -lkernel32" 71 - + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 72 - 73 - #undef SPEC_32 74 - #undef SPEC_64 75 - diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h 76 - index 0612b87199a..76cea94f3b7 100644 77 - --- a/gcc/config/i386/mingw32.h 78 - +++ b/gcc/config/i386/mingw32.h 79 - @@ -32,6 +32,14 @@ along with GCC; see the file COPYING3. If not see 80 - | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \ 81 - | MASK_MS_BITFIELD_LAYOUT) 82 - 83 - +#ifndef TARGET_USE_MCFGTHREAD 84 - +#define CPP_MCFGTHREAD() ((void)0) 85 - +#define LIB_MCFGTHREAD "" 86 - +#else 87 - +#define CPP_MCFGTHREAD() (builtin_define("__USING_MCFGTHREAD__")) 88 - +#define LIB_MCFGTHREAD " -lmcfgthread " 89 - +#endif 90 - + 91 - /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS 92 - is for compatibility with native compiler. */ 93 - #define EXTRA_OS_CPP_BUILTINS() \ 94 - @@ -50,6 +58,7 @@ along with GCC; see the file COPYING3. If not see 95 - builtin_define_std ("WIN64"); \ 96 - builtin_define ("_WIN64"); \ 97 - } \ 98 - + CPP_MCFGTHREAD(); \ 99 - } \ 100 - while (0) 101 - 102 - @@ -93,7 +102,7 @@ along with GCC; see the file COPYING3. If not see 103 - "%{mwindows:-lgdi32 -lcomdlg32} " \ 104 - "%{fvtable-verify=preinit:-lvtv -lpsapi; \ 105 - fvtable-verify=std:-lvtv -lpsapi} " \ 106 - - "-ladvapi32 -lshell32 -luser32 -lkernel32" 107 - + LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" 108 - 109 - /* Weak symbols do not get resolved if using a Windows dll import lib. 110 - Make the unwind registration references strong undefs. */ 111 - diff --git a/gcc/configure b/gcc/configure 112 - index 6121e163259..52f0e00efe6 100755 113 - --- a/gcc/configure 114 - +++ b/gcc/configure 115 - @@ -11693,7 +11693,7 @@ case ${enable_threads} in 116 - target_thread_file='single' 117 - ;; 118 - aix | dce | lynx | mipssde | posix | rtems | \ 119 - - single | tpf | vxworks | win32) 120 - + single | tpf | vxworks | win32 | mcf) 121 - target_thread_file=${enable_threads} 122 - ;; 123 - *) 124 - diff --git a/gcc/configure.ac b/gcc/configure.ac 125 - index b066cc609e1..4ecdba88de7 100644 126 - --- a/gcc/configure.ac 127 - +++ b/gcc/configure.ac 128 - @@ -1612,7 +1612,7 @@ case ${enable_threads} in 129 - target_thread_file='single' 130 - ;; 131 - aix | dce | lynx | mipssde | posix | rtems | \ 132 - - single | tpf | vxworks | win32) 133 - + single | tpf | vxworks | win32 | mcf) 134 - target_thread_file=${enable_threads} 135 - ;; 136 - *) 137 - diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt 138 - index ea8c34f8c71..23134ad7363 100644 139 - --- a/libatomic/configure.tgt 140 - +++ b/libatomic/configure.tgt 141 - @@ -145,7 +145,7 @@ case "${target}" in 142 - *-*-mingw*) 143 - # OS support for atomic primitives. 144 - case ${target_thread_file} in 145 - - win32) 146 - + win32 | mcf) 147 - config_path="${config_path} mingw" 148 - ;; 149 - posix) 150 - diff --git a/libgcc/config.host b/libgcc/config.host 151 - index 11b4acaff55..9fbd38650bd 100644 152 - --- a/libgcc/config.host 153 - +++ b/libgcc/config.host 154 - @@ -737,6 +737,9 @@ i[34567]86-*-mingw*) 155 - posix) 156 - tmake_file="i386/t-mingw-pthread $tmake_file" 157 - ;; 158 - + mcf) 159 - + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 160 - + ;; 161 - esac 162 - # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 163 - if test x$ac_cv_sjlj_exceptions = xyes; then 164 - @@ -761,6 +764,9 @@ x86_64-*-mingw*) 165 - posix) 166 - tmake_file="i386/t-mingw-pthread $tmake_file" 167 - ;; 168 - + mcf) 169 - + tmake_file="i386/t-mingw-mcfgthread $tmake_file" 170 - + ;; 171 - esac 172 - # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h 173 - if test x$ac_cv_sjlj_exceptions = xyes; then 174 - diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h 175 - new file mode 100644 176 - index 00000000000..5ea2908361f 177 - --- /dev/null 178 - +++ b/libgcc/config/i386/gthr-mcf.h 179 - @@ -0,0 +1 @@ 180 - +#include <mcfgthread/gthread.h> 181 - diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread 182 - new file mode 100644 183 - index 00000000000..4b9b10e32d6 184 - --- /dev/null 185 - +++ b/libgcc/config/i386/t-mingw-mcfgthread 186 - @@ -0,0 +1,2 @@ 187 - +SHLIB_PTHREAD_CFLAG = 188 - +SHLIB_PTHREAD_LDFLAG = -lmcfgthread 189 - diff --git a/libgcc/configure b/libgcc/configure 190 - index b2f3f870844..eff889dc3b3 100644 191 - --- a/libgcc/configure 192 - +++ b/libgcc/configure 193 - @@ -5451,6 +5451,7 @@ case $target_thread_file in 194 - tpf) thread_header=config/s390/gthr-tpf.h ;; 195 - vxworks) thread_header=config/gthr-vxworks.h ;; 196 - win32) thread_header=config/i386/gthr-win32.h ;; 197 - + mcf) thread_header=config/i386/gthr-mcf.h ;; 198 - esac 199 - 200 - 201 - diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure 202 - index ba094be6f15..979a5ab9ace 100755 203 - --- a/libstdc++-v3/configure 204 - +++ b/libstdc++-v3/configure 205 - @@ -15187,6 +15187,7 @@ case $target_thread_file in 206 - tpf) thread_header=config/s390/gthr-tpf.h ;; 207 - vxworks) thread_header=config/gthr-vxworks.h ;; 208 - win32) thread_header=config/i386/gthr-win32.h ;; 209 - + mcf) thread_header=config/i386/gthr-mcf.h ;; 210 - esac 211 - 212 - 213 - diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc 214 - index de920d714c6..665fb74bd6b 100644 215 - --- a/libstdc++-v3/libsupc++/atexit_thread.cc 216 - +++ b/libstdc++-v3/libsupc++/atexit_thread.cc 217 - @@ -25,6 +25,22 @@ 218 - #include <cstdlib> 219 - #include <new> 220 - #include "bits/gthr.h" 221 - + 222 - +#ifdef __USING_MCFGTHREAD__ 223 - + 224 - +#include <mcfgthread/gthread.h> 225 - + 226 - +extern "C" int 227 - +__cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), 228 - + void *obj, void *dso_handle) 229 - + _GLIBCXX_NOTHROW 230 - +{ 231 - + return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1; 232 - + (void)dso_handle; 233 - +} 234 - + 235 - +#else // __USING_MCFGTHREAD__ 236 - + 237 - #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32 238 - #define WIN32_LEAN_AND_MEAN 239 - #include <windows.h> 240 - @@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha 241 - } 242 - 243 - #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ 244 - + 245 - +#endif // __USING_MCFGTHREAD__ 246 - diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc 247 - index 3a2ec3ad0d6..8b4cc96199b 100644 248 - --- a/libstdc++-v3/libsupc++/guard.cc 249 - +++ b/libstdc++-v3/libsupc++/guard.cc 250 - @@ -28,6 +28,27 @@ 251 - #include <cxxabi.h> 252 - #include <exception> 253 - #include <new> 254 - + 255 - +#ifdef __USING_MCFGTHREAD__ 256 - + 257 - +#include <mcfgthread/gthread.h> 258 - + 259 - +namespace __cxxabiv1 { 260 - + 261 - +extern "C" int __cxa_guard_acquire(__guard *g){ 262 - + return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial; 263 - +} 264 - +extern "C" void __cxa_guard_abort(__guard *g) throw() { 265 - + ::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g); 266 - +} 267 - +extern "C" void __cxa_guard_release(__guard *g) throw() { 268 - + ::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g); 269 - +} 270 - + 271 - +} 272 - + 273 - +#else // __USING_MCFGTHREAD__ 274 - + 275 - #include <ext/atomicity.h> 276 - #include <ext/concurrence.h> 277 - #include <bits/atomic_lockfree_defines.h> 278 - @@ -425,3 +446,5 @@ namespace __cxxabiv1 279 - #endif 280 - } 281 - } 282 - + 283 - +#endif 284 - diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc 285 - index 8238817c2e9..0c6a1f85f6f 100644 286 - --- a/libstdc++-v3/src/c++11/thread.cc 287 - +++ b/libstdc++-v3/src/c++11/thread.cc 288 - @@ -55,6 +55,15 @@ static inline int get_nprocs() 289 - #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN) 290 - # include <unistd.h> 291 - # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN) 292 - +#elif defined(_WIN32) 293 - +# include <windows.h> 294 - +static inline int get_nprocs() 295 - +{ 296 - + SYSTEM_INFO sysinfo; 297 - + GetSystemInfo(&sysinfo); 298 - + return (int)sysinfo.dwNumberOfProcessors; 299 - +} 300 - +# define _GLIBCXX_NPROCS get_nprocs() 301 - #else 302 - # define _GLIBCXX_NPROCS 0 303 - #endif 304 - -- 305 - 2.17.0 306 -
-34
pkgs/development/compilers/gcc/patches/clang-genconditions.patch
··· 1 - From https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92061#c5 2 - 3 - --- a/gcc/genconditions.c 2019-01-01 12:37:19.064943662 +0100 4 - +++ b/gcc/genconditions.c 2019-10-11 10:57:11.464595789 +0200 5 - @@ -57,8 +57,9 @@ write_header (void) 6 - \n\ 7 - /* It is necessary, but not entirely safe, to include the headers below\n\ 8 - in a generator program. As a defensive measure, don't do so when the\n\ 9 - - table isn't going to have anything in it. */\n\ 10 - -#if GCC_VERSION >= 3001\n\ 11 - + table isn't going to have anything in it.\n\ 12 - + Clang 9 is buggy and doesn't handle __builtin_constant_p correctly. */\n\ 13 - +#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\ 14 - \n\ 15 - /* Do not allow checking to confuse the issue. */\n\ 16 - #undef CHECKING_P\n\ 17 - @@ -170,7 +171,7 @@ struct c_test\n\ 18 - vary at run time. It works in 3.0.1 and later; 3.0 only when not\n\ 19 - optimizing. */\n\ 20 - \n\ 21 - -#if GCC_VERSION >= 3001\n\ 22 - +#if GCC_VERSION >= 3001 && __clang_major__ < 9\n\ 23 - static const struct c_test insn_conditions[] = {\n"); 24 - 25 - traverse_c_tests (write_one_condition, 0); 26 - @@ -191,7 +192,7 @@ write_writer (void) 27 - " unsigned int i;\n" 28 - " const char *p;\n" 29 - " puts (\"(define_conditions [\");\n" 30 - - "#if GCC_VERSION >= 3001\n" 31 - + "#if GCC_VERSION >= 3001 && __clang_major__ < 9\n" 32 - " for (i = 0; i < ARRAY_SIZE (insn_conditions); i++)\n" 33 - " {\n" 34 - " printf (\" (%d \\\"\", insn_conditions[i].value);\n"
-37
pkgs/development/compilers/gcc/patches/default.nix
··· 31 31 atLeast14 = lib.versionAtLeast version "14"; 32 32 atLeast13 = lib.versionAtLeast version "13"; 33 33 atLeast12 = lib.versionAtLeast version "12"; 34 - atLeast11 = lib.versionAtLeast version "11"; 35 34 is15 = majorVersion == "15"; 36 35 is14 = majorVersion == "14"; 37 36 is13 = majorVersion == "13"; 38 37 is12 = majorVersion == "12"; 39 38 is11 = majorVersion == "11"; 40 - is10 = majorVersion == "10"; 41 39 42 40 # We only apply these patches when building a native toolchain for 43 41 # aarch64-darwin, as it breaks building a foreign one: ··· 96 94 ./12/mangle-NIX_STORE-in-__FILE__.patch 97 95 ]; 98 96 "11" = [ ./no-sys-dirs-riscv.patch ]; 99 - "10" = [ ./no-sys-dirs-riscv.patch ]; 100 97 } 101 98 ."${majorVersion}" or [ ] 102 99 ) ··· 266 263 # Needed to build LLVM>18 267 264 ./cfi_startproc-reorder-label-2.diff 268 265 ]; 269 - "10" = [ 270 - (fetchpatch { 271 - # There are no upstream release tags in https://github.com/iains/gcc-10-branch. 272 - # d04fe55 is the commit from https://github.com/gcc-mirror/gcc/releases/tag/releases%2Fgcc-10.5.0 273 - url = "https://github.com/iains/gcc-10-branch/compare/d04fe5541c53cb16d1ca5c80da044b4c7633dbc6...gcc-10-5Dr0-pre-0.diff"; 274 - hash = "sha256-kVUHZKtYqkWIcqxHG7yAOR2B60w4KWLoxzaiFD/FWYk="; 275 - }) 276 - # Needed to build LLVM>18 277 - ./cfi_startproc-reorder-label-2.diff 278 - ]; 279 266 } 280 267 .${majorVersion} or [ ] 281 268 ) ··· 306 293 url = "https://github.com/gcc-mirror/gcc/commit/d243f4009d8071b734df16cd70f4c5d09a373769.patch"; 307 294 sha256 = "sha256-H97GZs2wwzfFGiFOgds/5KaweC+luCsWX3hRFf7+Sm4="; 308 295 }) 309 - 310 - ## gcc 10.0 and older ############################################################################## 311 - 312 - # Probably needed for gnat wrapper https://github.com/NixOS/nixpkgs/pull/62314 313 - ++ optional (langAda && is10) ./gnat-cflags.patch 314 - ++ 315 - # Backport native aarch64-darwin compilation fix from gcc12 316 - # https://github.com/NixOS/nixpkgs/pull/167595 317 - optional 318 - ( 319 - is10 320 - && buildPlatform.system == "aarch64-darwin" 321 - && (!lib.systems.equals targetPlatform buildPlatform) 322 - ) 323 - (fetchpatch { 324 - name = "0008-darwin-aarch64-self-host-driver.patch"; 325 - url = "https://github.com/gcc-mirror/gcc/commit/834c8749ced550af3f17ebae4072fb7dfb90d271.diff"; 326 - sha256 = "sha256-XtykrPd5h/tsnjY1wGjzSOJ+AyyNLsfnjuOZ5Ryq9vA="; 327 - }) 328 - 329 - # Fix undefined symbol errors when building older versions with clang 330 - ++ optional ( 331 - !atLeast11 && stdenv.cc.isClang && stdenv.hostPlatform.isDarwin 332 - ) ./clang-genconditions.patch
-35
pkgs/development/compilers/gcc/patches/gnat-cflags.patch
··· 1 - diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in 2 - index 4e74252bd74..0d848b5b4e3 100644 3 - --- a/gcc/ada/gcc-interface/Makefile.in 4 - +++ b/gcc/ada/gcc-interface/Makefile.in 5 - @@ -111,7 +111,7 @@ NO_OMIT_ADAFLAGS = -fno-omit-frame-pointer 6 - NO_SIBLING_ADAFLAGS = -fno-optimize-sibling-calls 7 - NO_REORDER_ADAFLAGS = -fno-toplevel-reorder 8 - GNATLIBFLAGS = -W -Wall -gnatpg -nostdinc 9 - -GNATLIBCFLAGS = -g -O2 10 - +GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET) 11 - # Pretend that _Unwind_GetIPInfo is available for the target by default. This 12 - # should be autodetected during the configuration of libada and passed down to 13 - # here, but we need something for --disable-libada and hope for the best. 14 - @@ -198,7 +198,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR)) 15 - # Link flags used to build gnat tools. By default we prefer to statically 16 - # link with libgcc to avoid a dependency on shared libgcc (which is tricky 17 - # to deal with as it may conflict with the libgcc provided by the system). 18 - -GCC_LINK_FLAGS=-static-libstdc++ -static-libgcc 19 - +GCC_LINK_FLAGS=-static-libstdc++ -static-libgcc $(CFLAGS_FOR_TARGET) 20 - 21 - # End of variables for you to override. 22 - 23 - diff --git a/libada/Makefile.in b/libada/Makefile.in 24 - index 522b9207326..ca866c74471 100644 25 - --- a/libada/Makefile.in 26 - +++ b/libada/Makefile.in 27 - @@ -59,7 +59,7 @@ LDFLAGS= 28 - CFLAGS=-g 29 - PICFLAG = @PICFLAG@ 30 - GNATLIBFLAGS= -W -Wall -gnatpg -nostdinc 31 - -GNATLIBCFLAGS= -g -O2 32 - +GNATLIBCFLAGS= -g -O2 $(CFLAGS) 33 - GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) $(CFLAGS_FOR_TARGET) \ 34 - -fexceptions -DIN_RTS @have_getipinfo@ @have_capability@ 35 -
-2
pkgs/development/compilers/gcc/versions.nix
··· 5 5 "13" = "13.4.0"; 6 6 "12" = "12.4.0"; 7 7 "11" = "11.5.0"; 8 - "10" = "10.5.0"; 9 8 }; 10 9 11 10 fromMajorMinor = majorMinorVersion: majorMinorToVersionMap."${majorMinorVersion}"; ··· 21 20 "13.4.0" = "sha256-nEzm27BAVo/cVFWIrAPFy8lajb8MeqSQFwhDr7WcqPU="; 22 21 "12.4.0" = "sha256-cE9lJgTMvMsUvavzR4yVEciXiLEss7v/3tNzQZFqkXU="; 23 22 "11.5.0" = "sha256-puIYaOrVRc+H8MAfhCduS1KB1nIJhZHByJYkHwk2NHg="; 24 - "10.5.0" = "sha256-JRCVQ/30bzl8NHtdi3osflaUpaUczkucbh6opxyjB8E="; 25 23 } 26 24 ."${version}"; 27 25
+4 -2
pkgs/top-level/aliases.nix
··· 950 950 gcc8Stdenv = throw "gcc8Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 951 951 gcc9 = throw "gcc9 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 952 952 gcc9Stdenv = throw "gcc9Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 953 - gcc10StdenvCompat = 954 - if stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11" then gcc10Stdenv else stdenv; # Added 2024-03-21 953 + gcc10 = throw "gcc10 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 954 + gcc10Stdenv = throw "gcc10Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 955 + gcc10StdenvCompat = throw "gcc10StdenvCompat has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 955 956 gcc-arm-embedded-6 = throw "gcc-arm-embedded-6 has been removed from Nixpkgs as it is unmaintained and obsolete"; # Added 2025-04-12 956 957 gcc-arm-embedded-7 = throw "gcc-arm-embedded-7 has been removed from Nixpkgs as it is unmaintained and obsolete"; # Added 2025-04-12 957 958 gcc-arm-embedded-8 = throw "gcc-arm-embedded-8 has been removed from Nixpkgs as it is unmaintained and obsolete"; # Added 2025-04-12 ··· 971 972 gfortran7 = throw "gfortran7 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 972 973 gfortran8 = throw "gfortran8 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 973 974 gfortran9 = throw "gfortran9 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 975 + gfortran10 = throw "gfortran10 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 974 976 gg = go-graft; # Added 2025-03-07 975 977 ggobi = throw "'ggobi' has been removed from Nixpkgs, as it is unmaintained and broken"; # Added 2025-05-18 976 978 ghostwriter = makePlasma5Throw "ghostwriter"; # Added 2023-03-18
-2
pkgs/top-level/all-packages.nix
··· 4861 4861 extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc; 4862 4862 }; 4863 4863 4864 - gcc10Stdenv = overrideCC gccStdenv buildPackages.gcc10; 4865 4864 gcc11Stdenv = overrideCC gccStdenv buildPackages.gcc11; 4866 4865 gcc12Stdenv = overrideCC gccStdenv buildPackages.gcc12; 4867 4866 gcc13Stdenv = overrideCC gccStdenv buildPackages.gcc13; ··· 4965 4964 }); 4966 4965 4967 4966 inherit (callPackage ../development/compilers/gcc/all.nix { inherit noSysDirs; }) 4968 - gcc10 4969 4967 gcc11 4970 4968 gcc12 4971 4969 gcc13