diff --git a/doc/release-notes/rl-2511.section.md b/doc/release-notes/rl-2511.section.md index 7f97507f0244..523c43f7386a 100644 --- a/doc/release-notes/rl-2511.section.md +++ b/doc/release-notes/rl-2511.section.md @@ -20,6 +20,8 @@ - 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 has been removed, as it has reached end‐of‐life upstream and is 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. - `space-orbit` package has been removed due to lack of upstream maintenance. Debian upstream stopped tracking it in 2011. diff --git a/pkgs/by-name/gf/gfortran9/package.nix b/pkgs/by-name/gf/gfortran9/package.nix deleted file mode 100644 index 9fce86338bcd..000000000000 --- a/pkgs/by-name/gf/gfortran9/package.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ wrapCC, gcc9 }: -wrapCC ( - gcc9.cc.override { - name = "gfortran"; - langFortran = true; - langCC = false; - langC = false; - profiledCompiler = false; - } -) diff --git a/pkgs/development/compilers/gcc/common/dependencies.nix b/pkgs/development/compilers/gcc/common/dependencies.nix index b27b59f2f2b9..839d6474836e 100644 --- a/pkgs/development/compilers/gcc/common/dependencies.nix +++ b/pkgs/development/compilers/gcc/common/dependencies.nix @@ -76,8 +76,8 @@ in gmp mpfr libmpc + libxcrypt ] - ++ optionals (lib.versionAtLeast version "10") [ libxcrypt ] ++ [ targetPackages.stdenv.cc.bintools # For linking code at run-time ] diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index 0e4a70f870d5..456c83df7e57 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -53,7 +53,6 @@ callPackage, majorMinorVersion, apple-sdk, - cctools, darwin, }: @@ -84,13 +83,11 @@ let atLeast13 = versionAtLeast version "13"; atLeast12 = versionAtLeast version "12"; atLeast11 = versionAtLeast version "11"; - atLeast10 = versionAtLeast version "10"; is14 = majorVersion == "14"; is13 = majorVersion == "13"; is12 = majorVersion == "12"; is11 = majorVersion == "11"; is10 = majorVersion == "10"; - is9 = majorVersion == "9"; # 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 @@ -326,11 +323,9 @@ pipe depsTargetTarget ; - preConfigure = - (callFile ./common/pre-configure.nix { }) - + optionalString atLeast10 '' - ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h - ''; + preConfigure = (callFile ./common/pre-configure.nix { }) + '' + ln -sf ${libxcrypt}/include/crypt.h libsanitizer/sanitizer_common/crypt.h + ''; dontDisableStatic = true; @@ -466,12 +461,6 @@ pipe if (!lib.systems.equals targetPlatform hostPlatform) then [ "aarch64-darwin" ] else [ ]; }; } - // optionalAttrs (!atLeast10 && stdenv.targetPlatform.isDarwin) { - # GCC <10 requires default cctools `strip` instead of `llvm-strip` used by Darwin bintools. - preBuild = '' - makeFlagsArray+=('STRIP=${getBin cctools}/bin/${stdenv.cc.targetPrefix}strip') - ''; - } // optionalAttrs enableMultilib { dontMoveLib64 = true; } diff --git a/pkgs/development/compilers/gcc/patches/9/Added-mcf-thread-model-support-from-mcfgthread.patch b/pkgs/development/compilers/gcc/patches/9/Added-mcf-thread-model-support-from-mcfgthread.patch deleted file mode 100644 index d9809e828f10..000000000000 --- a/pkgs/development/compilers/gcc/patches/9/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 -+ -+extern "C" int -+__cxxabiv1::__cxa_thread_atexit (void (*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/9/AvailabilityInternal.h-fixincludes.patch b/pkgs/development/compilers/gcc/patches/9/AvailabilityInternal.h-fixincludes.patch deleted file mode 100644 index 8575f71912a1..000000000000 --- a/pkgs/development/compilers/gcc/patches/9/AvailabilityInternal.h-fixincludes.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x -index 47a3578f017..6cf22d19b2a 100644 ---- a/fixincludes/fixincl.x -+++ b/fixincludes/fixincl.x -@@ -3480,6 +3480,43 @@ static const char* apzDarwin_Ucred__AtomicPatch[] = { - #endif\n", - (char*)NULL }; - -+/* * * * * * * * * * * * * * * * * * * * * * * * * * -+ * -+ * Description of Darwin_Nix_Sdk_Availabilityinternal fix -+ */ -+tSCC zDarwin_Nix_Sdk_AvailabilityinternalName[] = -+ "darwin_nix_sdk_availabilityinternal"; -+ -+/* -+ * File name selection pattern -+ */ -+tSCC zDarwin_Nix_Sdk_AvailabilityinternalList[] = -+ "AvailabilityInternal.h\0"; -+/* -+ * Machine/OS name selection pattern -+ */ -+tSCC* apzDarwin_Nix_Sdk_AvailabilityinternalMachs[] = { -+ "*-*-darwin*", -+ (const char*)NULL }; -+ -+/* -+ * content selection pattern - do fix if pattern found -+ */ -+tSCC zDarwin_Nix_Sdk_AvailabilityinternalSelect0[] = -+ "(.*)__has_builtin\\(__is_target_os\\)(.*)"; -+ -+#define DARWIN_NIX_SDK_AVAILABILITYINTERNAL_TEST_CT 1 -+static tTestDesc aDarwin_Nix_Sdk_AvailabilityinternalTests[] = { -+ { TT_EGREP, zDarwin_Nix_Sdk_AvailabilityinternalSelect0, (regex_t*)NULL }, }; -+ -+/* -+ * Fix Command Arguments for Darwin_Nix_Sdk_Availabilityinternal -+ */ -+static const char* apzDarwin_Nix_Sdk_AvailabilityinternalPatch[] = { -+ "format", -+ "%10%2", -+ (char*)NULL }; -+ - /* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description of Dec_Intern_Asm fix -@@ -10445,9 +10482,9 @@ static const char* apzX11_SprintfPatch[] = { - * - * List of all fixes - */ --#define REGEX_COUNT 296 -+#define REGEX_COUNT 297 - #define MACH_LIST_SIZE_LIMIT 187 --#define FIX_COUNT 257 -+#define FIX_COUNT 258 - - /* - * Enumerate the fixes -@@ -10535,6 +10572,7 @@ typedef enum { - DARWIN_STDINT_6_FIXIDX, - DARWIN_STDINT_7_FIXIDX, - DARWIN_UCRED__ATOMIC_FIXIDX, -+ DARWIN_NIX_SDK_AVAILABILITYINTERNAL_FIXIDX, - DEC_INTERN_ASM_FIXIDX, - DJGPP_WCHAR_H_FIXIDX, - ECD_CURSOR_FIXIDX, -@@ -11123,6 +11161,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { - DARWIN_UCRED__ATOMIC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aDarwin_Ucred__AtomicTests, apzDarwin_Ucred__AtomicPatch, 0 }, - -+ { zDarwin_Nix_Sdk_AvailabilityinternalName, zDarwin_Nix_Sdk_AvailabilityinternalList, -+ apzDarwin_Nix_Sdk_AvailabilityinternalMachs, -+ DARWIN_NIX_SDK_AVAILABILITYINTERNAL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, -+ aDarwin_Nix_Sdk_AvailabilityinternalTests, apzDarwin_Nix_Sdk_AvailabilityinternalPatch, 0 }, -+ - { zDec_Intern_AsmName, zDec_Intern_AsmList, - apzDec_Intern_AsmMachs, - DEC_INTERN_ASM_TEST_CT, FD_MACH_ONLY, -diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def -index bf136fdaa20..89bceb46c26 100644 ---- a/fixincludes/inclhack.def -+++ b/fixincludes/inclhack.def -@@ -1727,6 +1727,20 @@ fix = { - test_text = ""; /* Don't provide this for wrap fixes. */ - }; - -+/* -+ * Newer versions of AvailabilityInternal.h use `__has_builtin`, -+ * which is not implemented in or compatible with GCC. -+ */ -+fix = { -+ hackname = darwin_nix_sdk_availabilityinternal; -+ mach = "*-*-darwin*"; -+ files = AvailabilityInternal.h; -+ c_fix = format; -+ c_fix_arg = "%10%2"; -+ select = "(.*)__has_builtin\\(__is_target_os\\)(.*)"; -+ test_text = "__has_builtin(__is_target_os)"; -+}; -+ - /* - * Fix on Digital UNIX V4.0: - * It contains a prototype for a DEC C internal asm() function, diff --git a/pkgs/development/compilers/gcc/patches/9/fix-struct-redefinition-on-glibc-2.36.patch b/pkgs/development/compilers/gcc/patches/9/fix-struct-redefinition-on-glibc-2.36.patch deleted file mode 100644 index 5b4abfd02e0b..000000000000 --- a/pkgs/development/compilers/gcc/patches/9/fix-struct-redefinition-on-glibc-2.36.patch +++ /dev/null @@ -1,31 +0,0 @@ -Derived from ../11/fix-struct-redefinition-on-glibc-2.36.patch (upstream commit d2356ebb0084a0d80dbfe33040c9afe938c15d19) - -diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -index e8fce8a02..cb1ac806e 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -@@ -65,7 +65,9 @@ - #include - #include - #include -+#if SANITIZER_ANDROID - #include -+#endif - #include - #include - #include -@@ -846,10 +848,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); - unsigned IOCTL_EVIOCGPROP = IOCTL_NOT_PRESENT; - unsigned IOCTL_EVIOCSKEYCODE_V2 = IOCTL_NOT_PRESENT; - #endif -- unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS; -- unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION; -- unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS; -- unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION; -+ unsigned IOCTL_FS_IOC_GETFLAGS = _IOR('f', 1, long); -+ unsigned IOCTL_FS_IOC_GETVERSION = _IOR('v', 1, long); -+ unsigned IOCTL_FS_IOC_SETFLAGS = _IOW('f', 2, long); -+ unsigned IOCTL_FS_IOC_SETVERSION = _IOW('v', 2, long); - unsigned IOCTL_GIO_CMAP = GIO_CMAP; - unsigned IOCTL_GIO_FONT = GIO_FONT; - unsigned IOCTL_GIO_UNIMAP = GIO_UNIMAP; diff --git a/pkgs/development/compilers/gcc/patches/9/gcc9-darwin-as-gstabs.patch b/pkgs/development/compilers/gcc/patches/9/gcc9-darwin-as-gstabs.patch deleted file mode 100644 index 454139c5396c..000000000000 --- a/pkgs/development/compilers/gcc/patches/9/gcc9-darwin-as-gstabs.patch +++ /dev/null @@ -1,99 +0,0 @@ -Backported from https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b2cee5e1e89c8f939bc36fe9756befcb93d96982 - -diff -ur a/gcc/config/darwin.h b/gcc/config/darwin.h ---- a/gcc/config/darwin.h 2022-05-27 03:21:10.947379000 -0400 -+++ b/gcc/config/darwin.h 2023-11-06 12:18:27.209236423 -0500 -@@ -230,12 +230,18 @@ - - #define DSYMUTIL "\ndsymutil" - -+/* Spec that controls whether the debug linker is run automatically for -+ a link step. This needs to be done if there is a source file on the -+ command line which will result in a temporary object (and debug is -+ enabled). */ -+ - #define DSYMUTIL_SPEC \ - "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ - %{v} \ -- %{gdwarf-2:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\ -- %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \ -- %{gdwarf-2:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}" -+ %{g*:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\ -+ %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm|.s|.f|.f90|\ -+ .f95|.f03|.f77|.for|.F|.F90|.F95|.F03: \ -+ %{g*:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}" - - #define LINK_COMMAND_SPEC LINK_COMMAND_SPEC_A DSYMUTIL_SPEC - -@@ -463,21 +469,31 @@ - %{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \ - %{static}" ASM_MMACOSX_VERSION_MIN_SPEC - --/* Default ASM_DEBUG_SPEC. Darwin's as cannot currently produce dwarf -- debugging data. */ -- -+#ifdef HAS_AS_STABS_DIRECTIVE -+/* We only pass a debug option to the assembler if that supports stabs, since -+ dwarf is not uniformly supported in the assemblers. */ - #define ASM_DEBUG_SPEC "%{g*:%{%:debug-level-gt(0):%{!gdwarf*:--gstabs}}}" -+#else -+#define ASM_DEBUG_SPEC "" -+#endif -+ -+#undef ASM_DEBUG_OPTION_SPEC -+#define ASM_DEBUG_OPTION_SPEC "" -+ - #define ASM_FINAL_SPEC \ - "%{gsplit-dwarf:%ngsplit-dwarf is not supported on this platform} %. */ - --/* Prefer DWARF2. */ --#undef PREFERRED_DEBUGGING_TYPE --#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG --#define DARWIN_PREFER_DWARF -- --/* Since DWARF2 is default, conditions for running dsymutil are different. */ --#undef DSYMUTIL_SPEC --#define DSYMUTIL_SPEC \ -- "%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ -- %{v} \ -- %{g*:%{!gstabs*:%{%:debug-level-gt(0): -idsym}}}\ -- %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm|.s|.f|.f90|.f95|.f03|.f77|.for|.F|.F90|.F95|.F03: \ -- %{g*:%{!gstabs*:%{%:debug-level-gt(0): -dsym}}}}}}}}}}}" -- --/* Tell collect2 to run dsymutil for us as necessary. */ --#define COLLECT_RUN_DSYMUTIL 1 -- --/* Only ask as for debug data if the debug style is stabs (since as doesn't -- yet generate dwarf.) */ -- --#undef ASM_DEBUG_SPEC --#define ASM_DEBUG_SPEC "%{g*:%{%:debug-level-gt(0):%{gstabs:--gstabs}}}" -- - #undef ASM_OUTPUT_ALIGNED_COMMON - #define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN) \ - do { \ diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index 0b57ecab691f..f0bb8d5b7c75 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -32,14 +32,12 @@ let atLeast13 = lib.versionAtLeast version "13"; atLeast12 = lib.versionAtLeast version "12"; atLeast11 = lib.versionAtLeast version "11"; - atLeast10 = lib.versionAtLeast version "10"; is15 = majorVersion == "15"; is14 = majorVersion == "14"; is13 = majorVersion == "13"; is12 = majorVersion == "12"; is11 = majorVersion == "11"; is10 = majorVersion == "10"; - is9 = majorVersion == "9"; # We only apply these patches when building a native toolchain for # aarch64-darwin, as it breaks building a foreign one: @@ -99,7 +97,6 @@ in ]; "11" = [ ./no-sys-dirs-riscv.patch ]; "10" = [ ./no-sys-dirs-riscv.patch ]; - "9" = [ ./no-sys-dirs-riscv-gcc9.patch ]; } ."${majorVersion}" or [ ] ) @@ -283,14 +280,6 @@ in .${majorVersion} or [ ] ) -# Work around newer AvailabilityInternal.h when building older versions of GCC. -++ optionals (stdenv.hostPlatform.isDarwin) ( - { - "9" = [ ../patches/9/AvailabilityInternal.h-fixincludes.patch ]; - } - .${majorVersion} or [ ] -) - ## Windows # Backported mcf thread model support from gcc13: @@ -321,7 +310,7 @@ in ## gcc 10.0 and older ############################################################################## # Probably needed for gnat wrapper https://github.com/NixOS/nixpkgs/pull/62314 -++ optional (langAda && (is9 || is10)) ./gnat-cflags.patch +++ optional (langAda && is10) ./gnat-cflags.patch ++ # Backport native aarch64-darwin compilation fix from gcc12 # https://github.com/NixOS/nixpkgs/pull/167595 @@ -341,15 +330,3 @@ in ++ optional ( !atLeast11 && stdenv.cc.isClang && stdenv.hostPlatform.isDarwin ) ./clang-genconditions.patch - -## gcc 9.0 and older ############################################################################## - -++ optional (majorVersion == "9") ./9/fix-struct-redefinition-on-glibc-2.36.patch -# Needed for NetBSD cross comp in older versions -# https://gcc.gnu.org/pipermail/gcc-patches/2020-January/thread.html#537548 -# https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=98d56ea8900fdcff8f1987cf2bf499a5b7399857 -++ optional (!atLeast10 && targetPlatform.isNetBSD) ./libstdc++-netbsd-ctypes.patch - -# Make Darwin bootstrap respect whether the assembler supports `--gstabs`, -# which is not supported by the clang integrated assembler used by default on Darwin. -++ optional (is9 && hostPlatform.isDarwin) ./9/gcc9-darwin-as-gstabs.patch diff --git a/pkgs/development/compilers/gcc/patches/libstdc++-netbsd-ctypes.patch b/pkgs/development/compilers/gcc/patches/libstdc++-netbsd-ctypes.patch deleted file mode 100644 index 28fff80b786d..000000000000 --- a/pkgs/development/compilers/gcc/patches/libstdc++-netbsd-ctypes.patch +++ /dev/null @@ -1,141 +0,0 @@ -diff --git a/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h b/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h -index ff3ec893974..21eccf9fde1 100644 ---- a/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h -+++ b/libstdc++-v3/config/os/bsd/netbsd/ctype_base.h -@@ -38,40 +38,46 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - /// @brief Base class for ctype. - struct ctype_base - { -- // Non-standard typedefs. -- typedef const unsigned char* __to_type; - - // NB: Offsets into ctype::_M_table force a particular size - // on the mask type. Because of this, we don't use an enum. -- typedef unsigned char mask; - - #ifndef _CTYPE_U -- static const mask upper = _U; -- static const mask lower = _L; -- static const mask alpha = _U | _L; -- static const mask digit = _N; -- static const mask xdigit = _N | _X; -- static const mask space = _S; -- static const mask print = _P | _U | _L | _N | _B; -- static const mask graph = _P | _U | _L | _N; -- static const mask cntrl = _C; -- static const mask punct = _P; -- static const mask alnum = _U | _L | _N; -+ // Non-standard typedefs. -+ typedef const unsigned char* __to_type; -+ -+ typedef unsigned char mask; -+ -+ static const mask upper = _U; -+ static const mask lower = _L; -+ static const mask alpha = _U | _L; -+ static const mask digit = _N; -+ static const mask xdigit = _N | _X; -+ static const mask space = _S; -+ static const mask print = _P | _U | _L | _N | _B; -+ static const mask graph = _P | _U | _L | _N; -+ static const mask cntrl = _C; -+ static const mask punct = _P; -+ static const mask alnum = _U | _L | _N; - #else -- static const mask upper = _CTYPE_U; -- static const mask lower = _CTYPE_L; -- static const mask alpha = _CTYPE_U | _CTYPE_L; -- static const mask digit = _CTYPE_N; -- static const mask xdigit = _CTYPE_N | _CTYPE_X; -- static const mask space = _CTYPE_S; -- static const mask print = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N | _CTYPE_B; -- static const mask graph = _CTYPE_P | _CTYPE_U | _CTYPE_L | _CTYPE_N; -- static const mask cntrl = _CTYPE_C; -- static const mask punct = _CTYPE_P; -- static const mask alnum = _CTYPE_U | _CTYPE_L | _CTYPE_N; -+ typedef const unsigned short* __to_type; -+ -+ typedef unsigned short mask; -+ -+ static const mask upper = _CTYPE_U; -+ static const mask lower = _CTYPE_L; -+ static const mask alpha = _CTYPE_A; -+ static const mask digit = _CTYPE_D; -+ static const mask xdigit = _CTYPE_X; -+ static const mask space = _CTYPE_S; -+ static const mask print = _CTYPE_R; -+ static const mask graph = _CTYPE_G; -+ static const mask cntrl = _CTYPE_C; -+ static const mask punct = _CTYPE_P; -+ static const mask alnum = _CTYPE_A | _CTYPE_D; - #endif - #if __cplusplus >= 201103L -- static const mask blank = space; -+ static const mask blank = space; - #endif - }; - -diff --git a/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc b/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc -index ed3b7cd0d6a..33358e8f5d8 100644 ---- a/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc -+++ b/libstdc++-v3/config/os/bsd/netbsd/ctype_configure_char.cc -@@ -38,11 +38,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - // Information as gleaned from /usr/include/ctype.h - -- extern "C" const u_int8_t _C_ctype_[]; -- - const ctype_base::mask* - ctype::classic_table() throw() -- { return _C_ctype_ + 1; } -+ { return _C_ctype_tab_ + 1; } - - ctype::ctype(__c_locale, const mask* __table, bool __del, - size_t __refs) -@@ -69,14 +67,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - char - ctype::do_toupper(char __c) const -- { return ::toupper((int) __c); } -+ { return ::toupper((int)(unsigned char) __c); } - - const char* - ctype::do_toupper(char* __low, const char* __high) const - { - while (__low < __high) - { -- *__low = ::toupper((int) *__low); -+ *__low = ::toupper((int)(unsigned char) *__low); - ++__low; - } - return __high; -@@ -84,14 +82,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - - char - ctype::do_tolower(char __c) const -- { return ::tolower((int) __c); } -+ { return ::tolower((int)(unsigned char) __c); } - - const char* - ctype::do_tolower(char* __low, const char* __high) const - { - while (__low < __high) - { -- *__low = ::tolower((int) *__low); -+ *__low = ::tolower((int)(unsigned char) *__low); - ++__low; - } - return __high; -diff --git a/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h b/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h -index ace1120fba2..3234ce17c70 100644 ---- a/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h -+++ b/libstdc++-v3/config/os/bsd/netbsd/ctype_inline.h -@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION - is(const char* __low, const char* __high, mask* __vec) const - { - while (__low < __high) -- *__vec++ = _M_table[*__low++]; -+ *__vec++ = _M_table[(unsigned char)*__low++]; - return __high; - } - diff --git a/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv-gcc9.patch b/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv-gcc9.patch deleted file mode 100644 index afe3f26360e4..000000000000 --- a/pkgs/development/compilers/gcc/patches/no-sys-dirs-riscv-gcc9.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h -index 701f5ea1544..8de333caf54 100644 ---- a/gcc/config/riscv/riscv.h -+++ b/gcc/config/riscv/riscv.h -@@ -886,11 +886,7 @@ extern unsigned riscv_stack_boundary; - "%{mabi=lp64f:lp64f}" \ - "%{mabi=lp64d:lp64d}" \ - --#define STARTFILE_PREFIX_SPEC \ -- "/lib" XLEN_SPEC "/" ABI_SPEC "/ " \ -- "/usr/lib" XLEN_SPEC "/" ABI_SPEC "/ " \ -- "/lib/ " \ -- "/usr/lib/ " -+#define STARTFILE_PREFIX_SPEC "" - - /* ISA constants needed for code generation. */ - #define OPCODE_LW 0x2003 diff --git a/pkgs/development/compilers/gcc/versions.nix b/pkgs/development/compilers/gcc/versions.nix index 9cf3bb9d13cb..25e20d6f1cea 100644 --- a/pkgs/development/compilers/gcc/versions.nix +++ b/pkgs/development/compilers/gcc/versions.nix @@ -6,7 +6,6 @@ let "12" = "12.4.0"; "11" = "11.5.0"; "10" = "10.5.0"; - "9" = "9.5.0"; }; fromMajorMinor = majorMinorVersion: majorMinorToVersionMap."${majorMinorVersion}"; @@ -23,7 +22,6 @@ let "12.4.0" = "sha256-cE9lJgTMvMsUvavzR4yVEciXiLEss7v/3tNzQZFqkXU="; "11.5.0" = "sha256-puIYaOrVRc+H8MAfhCduS1KB1nIJhZHByJYkHwk2NHg="; "10.5.0" = "sha256-JRCVQ/30bzl8NHtdi3osflaUpaUczkucbh6opxyjB8E="; - "9.5.0" = "13ygjmd938m0wmy946pxdhz9i1wq7z4w10l6pvidak0xxxj9yxi7"; } ."${version}"; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 372b640f9912..80aea71c2600 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -948,6 +948,8 @@ mapAliases { gcc7Stdenv = throw "gcc7Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 gcc8 = throw "gcc8 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 gcc8Stdenv = throw "gcc8Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 + gcc9 = throw "gcc9 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 + gcc9Stdenv = throw "gcc9Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2025-08-08 gcc10StdenvCompat = if stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11" then gcc10Stdenv else stdenv; # Added 2024-03-21 gcc-arm-embedded-6 = throw "gcc-arm-embedded-6 has been removed from Nixpkgs as it is unmaintained and obsolete"; # Added 2025-04-12 @@ -968,6 +970,7 @@ mapAliases { gfortran49 = throw "'gfortran49' has been removed from nixpkgs"; # Added 2024-09-11 gfortran7 = throw "gfortran7 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 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 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 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6b7703b77e9f..c8cbe66897b4 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; }; - gcc9Stdenv = overrideCC gccStdenv buildPackages.gcc9; gcc10Stdenv = overrideCC gccStdenv buildPackages.gcc10; gcc11Stdenv = overrideCC gccStdenv buildPackages.gcc11; gcc12Stdenv = overrideCC gccStdenv buildPackages.gcc12; @@ -4966,7 +4965,6 @@ with pkgs; }); inherit (callPackage ../development/compilers/gcc/all.nix { inherit noSysDirs; }) - gcc9 gcc10 gcc11 gcc12