From 10ce2b47917a22617577ff811ac5ce99de35848c Mon Sep 17 00:00:00 2001 From: Emily Date: Fri, 8 Aug 2025 18:22:54 +0100 Subject: [PATCH] {gcc11,gfortran11,gdc11,gnat11,gnat-bootstrap11}: drop EOL since 2024; no longer used in the tree. --- doc/release-notes/rl-2511.section.md | 2 +- pkgs/by-name/gf/gfortran11/package.nix | 10 - pkgs/development/compilers/gcc/default.nix | 76 ++--- ...thread-model-support-from-mcfgthread.patch | 306 ------------------ .../compilers/gcc/patches/default.nix | 63 +--- .../gcc/patches/gfortran-driving.patch | 20 -- .../compilers/gcc/patches/no-sys-dirs.patch | 28 -- pkgs/development/compilers/gcc/versions.nix | 2 - .../compilers/gnat-bootstrap/default.nix | 17 - pkgs/top-level/aliases.nix | 7 +- pkgs/top-level/all-packages.nix | 34 -- 11 files changed, 48 insertions(+), 517 deletions(-) delete mode 100644 pkgs/by-name/gf/gfortran11/package.nix delete mode 100644 pkgs/development/compilers/gcc/patches/11/Added-mcf-thread-model-support-from-mcfgthread.patch delete mode 100644 pkgs/development/compilers/gcc/patches/gfortran-driving.patch delete mode 100644 pkgs/development/compilers/gcc/patches/no-sys-dirs.patch diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index f261560026ab..5285a32254be 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -20,7 +20,7 @@ - The `offrss` package was removed due to lack of upstream maintenance since 2012. It's recommended for users to migrate to another RSS reader -- GCC 9 and 10 have been removed, as they have reached end‐of‐life upstream and are no longer supported. +- GCC 9, 10, and 11 have been removed, as they have reached end‐of‐life upstream and are no longer supported. - `base16-builder` node package has been removed due to lack of upstream maintenance. - `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. diff --git a/pkgs/by-name/gf/gfortran11/package.nix b/pkgs/by-name/gf/gfortran11/package.nix deleted file mode 100644 index d27a264fc529..000000000000 --- a/pkgs/by-name/gf/gfortran11/package.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ wrapCC, gcc11 }: -wrapCC ( - gcc11.cc.override { - name = "gfortran"; - langFortran = true; - langCC = false; - langC = false; - profiledCompiler = false; - } -) diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index 0aab42a2dc6d..6d6189ed7499 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -80,11 +80,9 @@ let majorVersion = versions.major version; atLeast14 = versionAtLeast version "14"; atLeast13 = versionAtLeast version "13"; - atLeast12 = versionAtLeast version "12"; is14 = majorVersion == "14"; is13 = majorVersion == "13"; is12 = majorVersion == "12"; - is11 = majorVersion == "11"; # releases have a form: MAJOR.MINOR.MICRO, like 14.2.1 # snapshots have a form like MAJOR.MINOR.MICRO.DATE, like 14.2.1.20250322 @@ -98,7 +96,7 @@ let # "14.2.0" -> "14.2.0" baseVersion = lib.concatStringsSep "." (lib.take 3 (lib.splitVersion version)); - disableBootstrap = !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler); + disableBootstrap = !stdenv.hostPlatform.isDarwin && !profiledCompiler; inherit (stdenv) buildPlatform hostPlatform targetPlatform; targetConfig = @@ -216,7 +214,7 @@ pipe "mirror://gcc/snapshots/${majorVersion}-${snapDate}/gcc-${majorVersion}-${snapDate}.tar.xz" else "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"; - ${if is11 || is13 then "hash" else "sha256"} = gccVersions.srcHashForVersion version; + ${if is13 then "hash" else "sha256"} = gccVersions.srcHashForVersion version; }; inherit patches; @@ -236,8 +234,7 @@ pipe "format" "pie" "stackclashprotection" - ] - ++ optionals (is11 && langAda) [ "fortify3" ]; + ]; postPatch = '' configureScripts=$(find . -name configure) @@ -258,7 +255,7 @@ pipe # This should kill all the stdinc frameworks that gcc and friends like to # insert into default search paths. + optionalString hostPlatform.isDarwin '' - substituteInPlace gcc/config/darwin-c.c${optionalString atLeast12 "c"} \ + substituteInPlace gcc/config/darwin-c.cc \ --replace 'if (stdinc)' 'if (0)' substituteInPlace libgcc/config/t-slibgcc-darwin \ @@ -333,7 +330,7 @@ pipe buildFlags = # we do not yet have Nix-driven profiling - assert atLeast12 -> (profiledCompiler -> !disableBootstrap); + assert profiledCompiler -> !disableBootstrap; let target = optionalString (profiledCompiler) "profiled" @@ -354,45 +351,38 @@ pipe # https://gcc.gnu.org/PR109898 enableParallelInstalling = false; - env = mapAttrs (_: v: toString v) ( - { + env = mapAttrs (_: v: toString v) { - NIX_NO_SELF_RPATH = true; + NIX_NO_SELF_RPATH = true; - # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 - ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; + # https://gcc.gnu.org/install/specific.html#x86-64-x-solaris210 + ${if hostPlatform.system == "x86_64-solaris" then "CC" else null} = "gcc -m64"; - # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the - # library headers and binaries, regardless of the language being compiled. - # - # The LTO code doesn't find zlib, so we just add it to $CPATH and - # $LIBRARY_PATH in this case. - # - # Cross-compiling, we need gcc not to read ./specs in order to build the g++ - # compiler (after the specs for the cross-gcc are created). Having - # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks. + # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the + # library headers and binaries, regardless of the language being compiled. + # + # The LTO code doesn't find zlib, so we just add it to $CPATH and + # $LIBRARY_PATH in this case. + # + # Cross-compiling, we need gcc not to read ./specs in order to build the g++ + # compiler (after the specs for the cross-gcc are created). Having + # LIBRARY_PATH= makes gcc read the specs from ., and the build breaks. - CPATH = optionals (lib.systems.equals targetPlatform hostPlatform) ( - makeSearchPathOutput "dev" "include" ([ ] ++ optional (zlib != null) zlib) - ); + CPATH = optionals (lib.systems.equals targetPlatform hostPlatform) ( + makeSearchPathOutput "dev" "include" ([ ] ++ optional (zlib != null) zlib) + ); - LIBRARY_PATH = optionals (lib.systems.equals targetPlatform hostPlatform) ( - makeLibraryPath (optional (zlib != null) zlib) - ); + LIBRARY_PATH = optionals (lib.systems.equals targetPlatform hostPlatform) ( + makeLibraryPath (optional (zlib != null) zlib) + ); - NIX_LDFLAGS = optionalString hostPlatform.isSunOS "-lm"; + NIX_LDFLAGS = optionalString hostPlatform.isSunOS "-lm"; - inherit (callFile ./common/extra-target-flags.nix { }) - EXTRA_FLAGS_FOR_TARGET - EXTRA_LDFLAGS_FOR_TARGET - ; - } - // - optionalAttrs (!atLeast12 && stdenv.cc.isClang && (!lib.systems.equals targetPlatform hostPlatform)) - { - NIX_CFLAGS_COMPILE = "-Wno-register"; - } - ); + inherit (callFile ./common/extra-target-flags.nix { }) + EXTRA_FLAGS_FOR_TARGET + EXTRA_LDFLAGS_FOR_TARGET + ; + }; passthru = { inherit @@ -407,11 +397,7 @@ pipe ; isGNU = true; hardeningUnsupportedFlags = - optionals (!atLeast12) [ - "fortify3" - "trivialautovarinit" - ] - ++ optionals (!atLeast13) [ + optionals (!atLeast13) [ "strictflexarrays1" "strictflexarrays3" ] diff --git a/pkgs/development/compilers/gcc/patches/11/Added-mcf-thread-model-support-from-mcfgthread.patch b/pkgs/development/compilers/gcc/patches/11/Added-mcf-thread-model-support-from-mcfgthread.patch deleted file mode 100644 index 77202438e47d..000000000000 --- a/pkgs/development/compilers/gcc/patches/11/Added-mcf-thread-model-support-from-mcfgthread.patch +++ /dev/null @@ -1,306 +0,0 @@ -From 86f2f767ddffd9f7c6f1470b987ae7b0d251b988 Mon Sep 17 00:00:00 2001 -From: Liu Hao -Date: Wed, 25 Apr 2018 21:54:19 +0800 -Subject: [PATCH] Added 'mcf' thread model support from mcfgthread. - -Signed-off-by: Liu Hao ---- - config/gthr.m4 | 1 + - gcc/config.gcc | 3 +++ - gcc/config/i386/mingw-mcfgthread.h | 1 + - gcc/config/i386/mingw-w64.h | 2 +- - gcc/config/i386/mingw32.h | 11 ++++++++++- - gcc/configure | 2 +- - gcc/configure.ac | 2 +- - libatomic/configure.tgt | 2 +- - libgcc/config.host | 6 ++++++ - libgcc/config/i386/gthr-mcf.h | 1 + - libgcc/config/i386/t-mingw-mcfgthread | 2 ++ - libgcc/configure | 1 + - libstdc++-v3/configure | 1 + - libstdc++-v3/libsupc++/atexit_thread.cc | 18 ++++++++++++++++++ - libstdc++-v3/libsupc++/guard.cc | 23 +++++++++++++++++++++++ - libstdc++-v3/src/c++11/thread.cc | 9 +++++++++ - 16 files changed, 80 insertions(+), 5 deletions(-) - create mode 100644 gcc/config/i386/mingw-mcfgthread.h - create mode 100644 libgcc/config/i386/gthr-mcf.h - create mode 100644 libgcc/config/i386/t-mingw-mcfgthread - -diff --git a/config/gthr.m4 b/config/gthr.m4 -index 7b29f1f3327..82e21fe1709 100644 ---- a/config/gthr.m4 -+++ b/config/gthr.m4 -@@ -21,6 +21,7 @@ case $1 in - tpf) thread_header=config/s390/gthr-tpf.h ;; - vxworks) thread_header=config/gthr-vxworks.h ;; - win32) thread_header=config/i386/gthr-win32.h ;; -+ mcf) thread_header=config/i386/gthr-mcf.h ;; - esac - AC_SUBST(thread_header) - ]) -diff --git a/gcc/config.gcc b/gcc/config.gcc -index 46a9029acec..112c24e95a3 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1758,6 +1758,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) - if test x$enable_threads = xposix ; then - tm_file="${tm_file} i386/mingw-pthread.h" - fi -+ if test x$enable_threads = xmcf ; then -+ tm_file="${tm_file} i386/mingw-mcfgthread.h" -+ fi - tm_file="${tm_file} i386/mingw32.h" - # This makes the logic if mingw's or the w64 feature set has to be used - case ${target} in -diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h -new file mode 100644 -index 00000000000..ec381a7798f ---- /dev/null -+++ b/gcc/config/i386/mingw-mcfgthread.h -@@ -0,0 +1 @@ -+#define TARGET_USE_MCFGTHREAD 1 -diff --git a/gcc/config/i386/mingw-w64.h b/gcc/config/i386/mingw-w64.h -index 484dc7a9e9f..a15bbeea500 100644 ---- a/gcc/config/i386/mingw-w64.h -+++ b/gcc/config/i386/mingw-w64.h -@@ -48,7 +48,7 @@ along with GCC; see the file COPYING3. If not see - "%{mwindows:-lgdi32 -lcomdlg32} " \ - "%{fvtable-verify=preinit:-lvtv -lpsapi; \ - fvtable-verify=std:-lvtv -lpsapi} " \ -- "-ladvapi32 -lshell32 -luser32 -lkernel32" -+ LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" - - #undef SPEC_32 - #undef SPEC_64 -diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h -index 0612b87199a..76cea94f3b7 100644 ---- a/gcc/config/i386/mingw32.h -+++ b/gcc/config/i386/mingw32.h -@@ -32,6 +32,14 @@ along with GCC; see the file COPYING3. If not see - | MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \ - | MASK_MS_BITFIELD_LAYOUT) - -+#ifndef TARGET_USE_MCFGTHREAD -+#define CPP_MCFGTHREAD() ((void)0) -+#define LIB_MCFGTHREAD "" -+#else -+#define CPP_MCFGTHREAD() (builtin_define("__USING_MCFGTHREAD__")) -+#define LIB_MCFGTHREAD " -lmcfgthread " -+#endif -+ - /* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS - is for compatibility with native compiler. */ - #define EXTRA_OS_CPP_BUILTINS() \ -@@ -50,6 +58,7 @@ along with GCC; see the file COPYING3. If not see - builtin_define_std ("WIN64"); \ - builtin_define ("_WIN64"); \ - } \ -+ CPP_MCFGTHREAD(); \ - } \ - while (0) - -@@ -93,7 +102,7 @@ along with GCC; see the file COPYING3. If not see - "%{mwindows:-lgdi32 -lcomdlg32} " \ - "%{fvtable-verify=preinit:-lvtv -lpsapi; \ - fvtable-verify=std:-lvtv -lpsapi} " \ -- "-ladvapi32 -lshell32 -luser32 -lkernel32" -+ LIB_MCFGTHREAD "-ladvapi32 -lshell32 -luser32 -lkernel32" - - /* Weak symbols do not get resolved if using a Windows dll import lib. - Make the unwind registration references strong undefs. */ -diff --git a/gcc/configure b/gcc/configure -index 6121e163259..52f0e00efe6 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -11693,7 +11693,7 @@ case ${enable_threads} in - target_thread_file='single' - ;; - aix | dce | lynx | mipssde | posix | rtems | \ -- single | tpf | vxworks | win32) -+ single | tpf | vxworks | win32 | mcf) - target_thread_file=${enable_threads} - ;; - *) -diff --git a/gcc/configure.ac b/gcc/configure.ac -index b066cc609e1..4ecdba88de7 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -1612,7 +1612,7 @@ case ${enable_threads} in - target_thread_file='single' - ;; - aix | dce | lynx | mipssde | posix | rtems | \ -- single | tpf | vxworks | win32) -+ single | tpf | vxworks | win32 | mcf) - target_thread_file=${enable_threads} - ;; - *) -diff --git a/libatomic/configure.tgt b/libatomic/configure.tgt -index ea8c34f8c71..23134ad7363 100644 ---- a/libatomic/configure.tgt -+++ b/libatomic/configure.tgt -@@ -145,7 +145,7 @@ case "${target}" in - *-*-mingw*) - # OS support for atomic primitives. - case ${target_thread_file} in -- win32) -+ win32 | mcf) - config_path="${config_path} mingw" - ;; - posix) -diff --git a/libgcc/config.host b/libgcc/config.host -index 11b4acaff55..9fbd38650bd 100644 ---- a/libgcc/config.host -+++ b/libgcc/config.host -@@ -737,6 +737,9 @@ i[34567]86-*-mingw*) - posix) - tmake_file="i386/t-mingw-pthread $tmake_file" - ;; -+ mcf) -+ tmake_file="i386/t-mingw-mcfgthread $tmake_file" -+ ;; - esac - # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h - if test x$ac_cv_sjlj_exceptions = xyes; then -@@ -761,6 +764,9 @@ x86_64-*-mingw*) - posix) - tmake_file="i386/t-mingw-pthread $tmake_file" - ;; -+ mcf) -+ tmake_file="i386/t-mingw-mcfgthread $tmake_file" -+ ;; - esac - # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h - if test x$ac_cv_sjlj_exceptions = xyes; then -diff --git a/libgcc/config/i386/gthr-mcf.h b/libgcc/config/i386/gthr-mcf.h -new file mode 100644 -index 00000000000..5ea2908361f ---- /dev/null -+++ b/libgcc/config/i386/gthr-mcf.h -@@ -0,0 +1 @@ -+#include -diff --git a/libgcc/config/i386/t-mingw-mcfgthread b/libgcc/config/i386/t-mingw-mcfgthread -new file mode 100644 -index 00000000000..4b9b10e32d6 ---- /dev/null -+++ b/libgcc/config/i386/t-mingw-mcfgthread -@@ -0,0 +1,2 @@ -+SHLIB_PTHREAD_CFLAG = -+SHLIB_PTHREAD_LDFLAG = -lmcfgthread -diff --git a/libgcc/configure b/libgcc/configure -index b2f3f870844..eff889dc3b3 100644 ---- a/libgcc/configure -+++ b/libgcc/configure -@@ -5451,6 +5451,7 @@ case $target_thread_file in - tpf) thread_header=config/s390/gthr-tpf.h ;; - vxworks) thread_header=config/gthr-vxworks.h ;; - win32) thread_header=config/i386/gthr-win32.h ;; -+ mcf) thread_header=config/i386/gthr-mcf.h ;; - esac - - -diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure -index ba094be6f15..979a5ab9ace 100755 ---- a/libstdc++-v3/configure -+++ b/libstdc++-v3/configure -@@ -15187,6 +15187,7 @@ case $target_thread_file in - tpf) thread_header=config/s390/gthr-tpf.h ;; - vxworks) thread_header=config/gthr-vxworks.h ;; - win32) thread_header=config/i386/gthr-win32.h ;; -+ mcf) thread_header=config/i386/gthr-mcf.h ;; - esac - - -diff --git a/libstdc++-v3/libsupc++/atexit_thread.cc b/libstdc++-v3/libsupc++/atexit_thread.cc -index de920d714c6..665fb74bd6b 100644 ---- a/libstdc++-v3/libsupc++/atexit_thread.cc -+++ b/libstdc++-v3/libsupc++/atexit_thread.cc -@@ -25,6 +25,22 @@ - #include - #include - #include "bits/gthr.h" -+ -+#ifdef __USING_MCFGTHREAD__ -+ -+#include -+namespace __cxxabiv1 { -+extern "C" int -+__cxa_thread_atexit (void (_GLIBCXX_CDTOR_CALLABI *dtor)(void *), -+ void *obj, void *dso_handle) -+ _GLIBCXX_NOTHROW -+{ -+ return ::_MCFCRT_AtThreadExit((void (*)(_MCFCRT_STD intptr_t))dtor, (_MCFCRT_STD intptr_t)obj) ? 0 : -1; -+ (void)dso_handle; -+} -+} -+#else // __USING_MCFGTHREAD__ -+ - #ifdef _GLIBCXX_THREAD_ATEXIT_WIN32 - #define WIN32_LEAN_AND_MEAN - #include -@@ -167,3 +183,5 @@ __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *), void *obj, void */*dso_ha - } - - #endif /* _GLIBCXX_HAVE___CXA_THREAD_ATEXIT_IMPL */ -+ -+#endif // __USING_MCFGTHREAD__ -diff --git a/libstdc++-v3/libsupc++/guard.cc b/libstdc++-v3/libsupc++/guard.cc -index 3a2ec3ad0d6..8b4cc96199b 100644 ---- a/libstdc++-v3/libsupc++/guard.cc -+++ b/libstdc++-v3/libsupc++/guard.cc -@@ -28,6 +28,27 @@ - #include - #include - #include -+ -+#ifdef __USING_MCFGTHREAD__ -+ -+#include -+ -+namespace __cxxabiv1 { -+ -+extern "C" int __cxa_guard_acquire(__guard *g){ -+ return ::_MCFCRT_WaitForOnceFlagForever((::_MCFCRT_OnceFlag *)g) == ::_MCFCRT_kOnceResultInitial; -+} -+extern "C" void __cxa_guard_abort(__guard *g) throw() { -+ ::_MCFCRT_SignalOnceFlagAsAborted((::_MCFCRT_OnceFlag *)g); -+} -+extern "C" void __cxa_guard_release(__guard *g) throw() { -+ ::_MCFCRT_SignalOnceFlagAsFinished((::_MCFCRT_OnceFlag *)g); -+} -+ -+} -+ -+#else // __USING_MCFGTHREAD__ -+ - #include - #include - #include -@@ -425,3 +446,5 @@ namespace __cxxabiv1 - #endif - } - } -+ -+#endif -diff --git a/libstdc++-v3/src/c++11/thread.cc b/libstdc++-v3/src/c++11/thread.cc -index 8238817c2e9..0c6a1f85f6f 100644 ---- a/libstdc++-v3/src/c++11/thread.cc -+++ b/libstdc++-v3/src/c++11/thread.cc -@@ -55,6 +55,15 @@ static inline int get_nprocs() - #elif defined(_GLIBCXX_USE_SC_NPROC_ONLN) - # include - # define _GLIBCXX_NPROCS sysconf(_SC_NPROC_ONLN) -+#elif defined(_WIN32) -+# include -+static inline int get_nprocs() -+{ -+ SYSTEM_INFO sysinfo; -+ GetSystemInfo(&sysinfo); -+ return (int)sysinfo.dwNumberOfProcessors; -+} -+# define _GLIBCXX_NPROCS get_nprocs() - #else - # define _GLIBCXX_NPROCS 0 - #endif --- -2.17.0 - diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index 23e4bf10e99f..ae5080f9f6b0 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -29,12 +29,10 @@ let atLeast15 = lib.versionAtLeast version "15"; atLeast14 = lib.versionAtLeast version "14"; atLeast13 = lib.versionAtLeast version "13"; - atLeast12 = lib.versionAtLeast version "12"; is15 = majorVersion == "15"; is14 = majorVersion == "14"; is13 = majorVersion == "13"; is12 = majorVersion == "12"; - is11 = majorVersion == "11"; # We only apply these patches when building a native toolchain for # aarch64-darwin, as it breaks building a foreign one: @@ -49,28 +47,20 @@ let in # -# Patches below are organized into three general categories: -# 1. Patches relevant to gcc>=12 on every platform -# 2. Patches relevant to gcc>=12 on specific platforms -# 3. Patches relevant only to gcc<12 +# Patches below are organized into two general categories: +# 1. Patches relevant on every platform +# 2. Patches relevant on specific platforms # -## 1. Patches relevant to gcc>=12 on every platform #################################### +## 1. Patches relevant on every platform #################################### [ ] -# Backport "c++: conversion to base of vbase in NSDMI" -# Fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431 -++ optional (!atLeast12) (fetchpatch { - name = "gcc-bug80431-fix"; - url = "https://github.com/gcc-mirror/gcc/commit/de31f5445b12fd9ab9969dc536d821fe6f0edad0.patch"; - hash = "sha256-bnHKJP5jR8rNJjRTi58/N/qZ5fPkuFBk7WblJWQpKOs="; -}) # Pass the path to a C++ compiler directly in the Makefile.in ++ optional (!lib.systems.equals targetPlatform hostPlatform) ./libstdc++-target.patch ++ optionals (noSysDirs) ( [ # Do not try looking for binaries and libraries in /lib and /usr/lib - (if atLeast12 then ./gcc-12-no-sys-dirs.patch else ./no-sys-dirs.patch) + ./gcc-12-no-sys-dirs.patch ] ++ ( { @@ -92,19 +82,17 @@ in ./no-sys-dirs-riscv.patch ./12/mangle-NIX_STORE-in-__FILE__.patch ]; - "11" = [ ./no-sys-dirs-riscv.patch ]; } ."${majorVersion}" or [ ] ) ) # Pass CFLAGS on to gnat -++ optional (atLeast12 && langAda) ./gnat-cflags-11.patch +++ optional langAda ./gnat-cflags-11.patch ++ optional langFortran ( # Fix interaction of gfortran and libtool # Fixes the output of -v # See also https://github.com/nixOS/nixpkgs/commit/cc6f814a8f0e9b70ede5b24192558664fa1f98a2 - if atLeast12 then ./gcc-12-gfortran-driving.patch else ./gfortran-driving.patch -) + ./gcc-12-gfortran-driving.patch) # Do not pass a default include dir on PowerPC+Musl # See https://github.com/NixOS/nixpkgs/pull/45340/commits/d6bb7d45162ac93e017cc9b665ae4836f6410710 ++ [ ./ppc-musl.patch ] @@ -114,12 +102,12 @@ in ++ optional (!atLeast14) ./cfi_startproc-reorder-label-09-1.diff ++ optional (atLeast14 && !canApplyIainsDarwinPatches) ./cfi_startproc-reorder-label-14-1.diff -## 2. Patches relevant to gcc>=12 on specific platforms #################################### +## 2. Patches relevant on specific platforms #################################### ### Musl+Go+gcc12 # backport fixes to build gccgo with musl libc -++ optionals (stdenv.hostPlatform.isMusl && langGo && atLeast12) [ +++ optionals (stdenv.hostPlatform.isMusl && langGo) [ # libgo: handle stat st_atim32 field and SYS_SECCOMP # syscall: gofmt # Add blank lines after //sys comments where needed, and then run gofmt @@ -185,9 +173,7 @@ in ) ../patches/15/libgcc-darwin-detection.patch # Fix detection of bootstrap compiler Ada support (cctools as) on Nix Darwin -++ optional ( - atLeast12 && stdenv.hostPlatform.isDarwin && langAda -) ./ada-cctools-as-detection-configure.patch +++ optional (stdenv.hostPlatform.isDarwin && langAda) ./ada-cctools-as-detection-configure.patch # Remove CoreServices on Darwin, as it is only needed for macOS SDK 14+ ++ optional ( @@ -247,16 +233,6 @@ in # Needed to build LLVM>18 ./cfi_startproc-reorder-label-2.diff ]; - "11" = [ - (fetchpatch { - # There are no upstream release tags in https://github.com/iains/gcc-11-branch. - # 5cc4c42a0d4de08715c2eef8715ad5b2e92a23b6 is the commit from https://github.com/gcc-mirror/gcc/releases/tag/releases%2Fgcc-11.5.0 - url = "https://github.com/iains/gcc-11-branch/compare/5cc4c42a0d4de08715c2eef8715ad5b2e92a23b6..gcc-11.5-darwin-r0.diff"; - hash = "sha256-7lH+GkgkrE6nOp9PMdIoqlQNWK31s6oW+lDt1LIkadE="; - }) - # Needed to build LLVM>18 - ./cfi_startproc-reorder-label-2.diff - ]; } .${majorVersion} or [ ] ) @@ -268,22 +244,3 @@ in ++ optional ( !atLeast13 && !withoutTargetLibc && targetPlatform.isMinGW && threadsCross.model == "mcf" ) (./. + "/${majorVersion}/Added-mcf-thread-model-support-from-mcfgthread.patch") - -############################################################################## -## -## 3. Patches relevant only to gcc<12 -## -## Above this point are patches which might potentially be applied -## to gcc version 12 or newer. Below this point are patches which -## will *only* be used for gcc versions older than gcc12. -## -############################################################################## - -## gcc 11.0 and older ############################################################################## - -# openjdk build fails without this on -march=opteron; is upstream in gcc12 -++ optional is11 (fetchpatch { - name = "darwin-aarch64-self-host-driver.patch"; - url = "https://github.com/gcc-mirror/gcc/commit/d243f4009d8071b734df16cd70f4c5d09a373769.patch"; - sha256 = "sha256-H97GZs2wwzfFGiFOgds/5KaweC+luCsWX3hRFf7+Sm4="; -}) diff --git a/pkgs/development/compilers/gcc/patches/gfortran-driving.patch b/pkgs/development/compilers/gcc/patches/gfortran-driving.patch deleted file mode 100644 index 70708886b405..000000000000 --- a/pkgs/development/compilers/gcc/patches/gfortran-driving.patch +++ /dev/null @@ -1,20 +0,0 @@ -This patch fixes interaction with Libtool. -See , for details. - ---- a/gcc/fortran/gfortranspec.c -+++ b/gcc/fortran/gfortranspec.c -@@ -461,8 +461,15 @@ For more information about these matters, see the file named COPYING\n\n")); - { - fprintf (stderr, _("Driving:")); - for (i = 0; i < g77_newargc; i++) -+ { -+ if (g77_new_decoded_options[i].opt_index == OPT_l) -+ /* Make sure no white space is inserted after `-l'. */ -+ fprintf (stderr, " -l%s", -+ g77_new_decoded_options[i].canonical_option[1]); -+ else - fprintf (stderr, " %s", - g77_new_decoded_options[i].orig_option_with_args_text); -+ } - fprintf (stderr, "\n"); - } diff --git a/pkgs/development/compilers/gcc/patches/no-sys-dirs.patch b/pkgs/development/compilers/gcc/patches/no-sys-dirs.patch deleted file mode 100644 index 36df51904acf..000000000000 --- a/pkgs/development/compilers/gcc/patches/no-sys-dirs.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -ru -x '*~' gcc-4.8.3-orig/gcc/cppdefault.c gcc-4.8.3/gcc/cppdefault.c ---- gcc-4.8.3-orig/gcc/cppdefault.c 2013-01-10 21:38:27.000000000 +0100 -+++ gcc-4.8.3/gcc/cppdefault.c 2014-08-18 16:20:32.893944536 +0200 -@@ -35,6 +35,8 @@ - # undef CROSS_INCLUDE_DIR - #endif - -+#undef LOCAL_INCLUDE_DIR -+ - const struct default_include cpp_include_defaults[] - #ifdef INCLUDE_DEFAULTS - = INCLUDE_DEFAULTS; -diff -ru -x '*~' gcc-4.8.3-orig/gcc/gcc.c gcc-4.8.3/gcc/gcc.c ---- gcc-4.8.3-orig/gcc/gcc.c 2014-03-23 12:30:57.000000000 +0100 -+++ gcc-4.8.3/gcc/gcc.c 2014-08-18 13:19:32.689201690 +0200 -@@ -1162,10 +1162,10 @@ - /* Default prefixes to attach to command names. */ - - #ifndef STANDARD_STARTFILE_PREFIX_1 --#define STANDARD_STARTFILE_PREFIX_1 "/lib/" -+#define STANDARD_STARTFILE_PREFIX_1 "" - #endif - #ifndef STANDARD_STARTFILE_PREFIX_2 --#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/" -+#define STANDARD_STARTFILE_PREFIX_2 "" - #endif - - #ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */ diff --git a/pkgs/development/compilers/gcc/versions.nix b/pkgs/development/compilers/gcc/versions.nix index 5c25ad3bc215..7c69f0484d77 100644 --- a/pkgs/development/compilers/gcc/versions.nix +++ b/pkgs/development/compilers/gcc/versions.nix @@ -4,7 +4,6 @@ let "14" = "14.3.0"; "13" = "13.4.0"; "12" = "12.4.0"; - "11" = "11.5.0"; }; fromMajorMinor = majorMinorVersion: majorMinorToVersionMap."${majorMinorVersion}"; @@ -19,7 +18,6 @@ let "14.3.0" = "sha256-4Nx3KXYlYxrI5Q+pL//v6Jmk63AlktpcMu8E4ik6yjo="; "13.4.0" = "sha256-nEzm27BAVo/cVFWIrAPFy8lajb8MeqSQFwhDr7WcqPU="; "12.4.0" = "sha256-cE9lJgTMvMsUvavzR4yVEciXiLEss7v/3tNzQZFqkXU="; - "11.5.0" = "sha256-puIYaOrVRc+H8MAfhCduS1KB1nIJhZHByJYkHwk2NHg="; } ."${version}"; diff --git a/pkgs/development/compilers/gnat-bootstrap/default.nix b/pkgs/development/compilers/gnat-bootstrap/default.nix index 7de8a33bc5cb..cca928a0f997 100644 --- a/pkgs/development/compilers/gnat-bootstrap/default.nix +++ b/pkgs/development/compilers/gnat-bootstrap/default.nix @@ -33,23 +33,6 @@ stdenv.mkDerivation ( url = "https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-${finalAttrs.version}/gnat-${stdenv.hostPlatform.system}-${finalAttrs.version}.tar.gz"; in { - "11" = { - gccVersion = "11.2.0"; - alireRevision = "4"; - } - // { - x86_64-darwin = { - inherit url; - hash = "sha256-FmBgD20PPQlX/ddhJliCTb/PRmKxe9z7TFPa2/SK4GY="; - upstreamTriplet = "x86_64-apple-darwin19.6.0"; - }; - x86_64-linux = { - inherit url; - hash = "sha256-8fMBJp6igH+Md5jE4LMubDmC4GLt4A+bZG/Xcz2LAJQ="; - upstreamTriplet = "x86_64-pc-linux-gnu"; - }; - } - .${stdenv.hostPlatform.system} or throwUnsupportedSystem; "12" = { gccVersion = "12.1.0"; alireRevision = "2"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index d4be4bed8dcb..415050b754e1 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -953,6 +953,8 @@ mapAliases { gcc10 = throw "gcc10 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 gcc10Stdenv = throw "gcc10Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 gcc10StdenvCompat = throw "gcc10StdenvCompat has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 + gcc11 = throw "gcc11 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 + gcc11Stdenv = throw "gcc11Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 gcc-arm-embedded-6 = throw "gcc-arm-embedded-6 has been removed from Nixpkgs as it is unmaintained and obsolete"; # Added 2025-04-12 gcc-arm-embedded-7 = throw "gcc-arm-embedded-7 has been removed from Nixpkgs as it is unmaintained and obsolete"; # Added 2025-04-12 gcc-arm-embedded-8 = throw "gcc-arm-embedded-8 has been removed from Nixpkgs as it is unmaintained and obsolete"; # Added 2025-04-12 @@ -976,6 +978,7 @@ mapAliases { gfortran8 = throw "gfortran8 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 gfortran9 = throw "gfortran9 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 gfortran10 = throw "gfortran10 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 + gfortran11 = throw "gfortran11 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 gg = go-graft; # Added 2025-03-07 ggobi = throw "'ggobi' has been removed from Nixpkgs, as it is unmaintained and broken"; # Added 2025-05-18 ghostwriter = makePlasma5Throw "ghostwriter"; # Added 2023-03-18 @@ -1023,7 +1026,9 @@ mapAliases { gmailieer = throw "'gmailieer' has been renamed to/replaced by 'lieer'"; # Converted to throw 2024-10-17 gmnisrv = throw "'gmnisrv' has been removed due to lack of maintenance upstream"; # Added 2025-06-07 gmp4 = throw "'gmp4' is end-of-life, consider using 'gmp' instead"; # Added 2024-12-24 - gnatboot11 = gnat-bootstrap11; + gnat11 = throw "gnat11 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 + gnat-bootstrap11 = throw "gnat-bootstrap11 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 + gnatboot11 = throw "gnatboot11 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 gnatboot12 = gnat-bootstrap12; gnatboot = gnat-bootstrap; gnatcoll-core = gnatPackages.gnatcoll-core; # Added 2024-02-25 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5a12b8786180..77e1eaaf19bd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4861,7 +4861,6 @@ with pkgs; extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc; }; - gcc11Stdenv = overrideCC gccStdenv buildPackages.gcc11; gcc12Stdenv = overrideCC gccStdenv buildPackages.gcc12; gcc13Stdenv = overrideCC gccStdenv buildPackages.gcc13; gcc14Stdenv = overrideCC gccStdenv buildPackages.gcc14; @@ -4964,7 +4963,6 @@ with pkgs; }); inherit (callPackage ../development/compilers/gcc/all.nix { inherit noSysDirs; }) - gcc11 gcc12 gcc13 gcc14 @@ -4985,34 +4983,6 @@ with pkgs; gnat = gnat13; # When changing this, update also gnatPackages - gnat11 = wrapCC ( - gcc11.cc.override { - name = "gnat"; - langC = true; - langCC = false; - langAda = true; - profiledCompiler = false; - # As per upstream instructions building a cross compiler - # should be done with a (native) compiler of the same version. - # If we are cross-compiling GNAT, we may as well do the same. - gnat-bootstrap = - if stdenv.hostPlatform == stdenv.targetPlatform && stdenv.buildPlatform == stdenv.hostPlatform then - buildPackages.gnat-bootstrap11 - else - buildPackages.gnat11; - stdenv = - if - stdenv.hostPlatform == stdenv.targetPlatform - && stdenv.buildPlatform == stdenv.hostPlatform - && stdenv.buildPlatform.isDarwin - && stdenv.buildPlatform.isx86_64 - then - overrideCC stdenv gnat-bootstrap11 - else - stdenv; - } - ); - gnat12 = wrapCC ( gcc12.cc.override { name = "gnat"; @@ -5126,9 +5096,6 @@ with pkgs; ); gnat-bootstrap = gnat-bootstrap12; - gnat-bootstrap11 = wrapCC ( - callPackage ../development/compilers/gnat-bootstrap { majorVersion = "11"; } - ); gnat-bootstrap12 = wrapCCWith ( { cc = callPackage ../development/compilers/gnat-bootstrap { majorVersion = "12"; }; @@ -5911,7 +5878,6 @@ with pkgs; libcxx extraPackages nixSupport - zlib ; } // extraArgs;