diff --git a/pkgs/by-name/gf/gfortran7/package.nix b/pkgs/by-name/gf/gfortran7/package.nix deleted file mode 100644 index 311b7e6b90a7..000000000000 --- a/pkgs/by-name/gf/gfortran7/package.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ wrapCC, gcc7 }: -wrapCC ( - gcc7.cc.override { - name = "gfortran"; - langFortran = true; - langCC = false; - langC = false; - profiledCompiler = false; - } -) diff --git a/pkgs/by-name/gf/gfortran8/package.nix b/pkgs/by-name/gf/gfortran8/package.nix deleted file mode 100644 index 0d0e03c7bb0b..000000000000 --- a/pkgs/by-name/gf/gfortran8/package.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ wrapCC, gcc8 }: -wrapCC ( - gcc8.cc.override { - name = "gfortran"; - langFortran = true; - langCC = false; - langC = false; - profiledCompiler = false; - } -) diff --git a/pkgs/by-name/qm/qmk/package.nix b/pkgs/by-name/qm/qmk/package.nix index c550d7653887..b45d480ba16d 100644 --- a/pkgs/by-name/qm/qmk/package.nix +++ b/pkgs/by-name/qm/qmk/package.nix @@ -45,7 +45,7 @@ python3.pkgs.buildPythonApplication rec { gnumake pkgsCross.avr.buildPackages.binutils pkgsCross.avr.buildPackages.binutils.bintools - pkgsCross.avr.buildPackages.gcc8 + pkgsCross.avr.buildPackages.gcc pkgsCross.avr.libcCross ]; diff --git a/pkgs/development/compilers/gcc/all.nix b/pkgs/development/compilers/gcc/all.nix index 5d5abb82c3eb..7eba6bad2dcb 100644 --- a/pkgs/development/compilers/gcc/all.nix +++ b/pkgs/development/compilers/gcc/all.nix @@ -3,7 +3,7 @@ , gccStdenv , gcc9Stdenv , callPackage -, isl_0_17, isl_0_20 +, isl_0_20 , libcCross , threadsCross , noSysDirs @@ -17,20 +17,15 @@ let let atLeast = lib.versionAtLeast majorMinorVersion; attrName = "gcc${lib.replaceStrings ["."] [""] majorMinorVersion}"; - pkg = lowPrio (wrapCC (callPackage ./default.nix ({ + pkg = lowPrio (wrapCC (callPackage ./default.nix { inherit noSysDirs; inherit majorMinorVersion; reproducibleBuild = true; profiledCompiler = false; libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then args.libcCross else null; threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { }; - isl = if stdenv.hostPlatform.isDarwin then null - else if atLeast "9" then isl_0_20 - else /* atLeast "7" */ isl_0_17; - } // lib.optionalAttrs (!(atLeast "9")) { - # gcc 10 is too strict to cross compile gcc <= 8 - stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc9Stdenv else stdenv; - }))); + isl = if stdenv.hostPlatform.isDarwin then null else isl_0_20; + })); in lib.nameValuePair attrName pkg; in diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index 40a0484d5c50..5e35a660785c 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -67,16 +67,12 @@ let atLeast12 = versionAtLeast version "12"; atLeast11 = versionAtLeast version "11"; atLeast10 = versionAtLeast version "10"; - atLeast9 = versionAtLeast version "9"; - atLeast8 = versionAtLeast version "8"; is14 = majorVersion == "14"; is13 = majorVersion == "13"; is12 = majorVersion == "12"; is11 = majorVersion == "11"; is10 = majorVersion == "10"; is9 = majorVersion == "9"; - is8 = majorVersion == "8"; - is7 = majorVersion == "7"; disableBootstrap = atLeast11 && !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler); @@ -166,7 +162,7 @@ assert stdenv.buildPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; -assert (!is7 && !is8) -> (langAda -> gnat-bootstrap != null); +assert langAda -> gnat-bootstrap != null; # TODO: fixup D bootstapping, probably by using gdc11 (and maybe other changes). # error: GDC is required to build d @@ -261,9 +257,7 @@ pipe ((callFile ./common/builder.nix {}) ({ configurePlatforms = [ "build" "host" "target" ]; - configureFlags = (callFile ./common/configure-flags.nix { }) - ++ optional (is7 && targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419" - ++ optional (is7 && targetPlatform.isNetBSD) "--disable-libcilkrts"; + configureFlags = callFile ./common/configure-flags.nix { }; inherit targetConfig; @@ -319,11 +313,7 @@ pipe ((callFile ./common/builder.nix {}) ({ EXTRA_FLAGS_FOR_TARGET EXTRA_LDFLAGS_FOR_TARGET ; - } // optionalAttrs is7 { - NIX_CFLAGS_COMPILE = optionalString (stdenv.cc.isClang && langFortran) "-Wno-unused-command-line-argument" - # Downgrade register storage class specifier errors to warnings when building a cross compiler from a clang stdenv. - + optionalString (stdenv.cc.isClang && targetPlatform != hostPlatform) " -Wno-register"; - } // optionalAttrs (!is7 && !atLeast12 && stdenv.cc.isClang && targetPlatform != hostPlatform) { + } // optionalAttrs (!atLeast12 && stdenv.cc.isClang && targetPlatform != hostPlatform) { NIX_CFLAGS_COMPILE = "-Wno-register"; }); @@ -331,18 +321,14 @@ pipe ((callFile ./common/builder.nix {}) ({ inherit langC langCC langObjC langObjCpp langAda langFortran langGo langD version; isGNU = true; hardeningUnsupportedFlags = - optional ( - (targetPlatform.isAarch64 && !atLeast9) || !atLeast8 - ) "stackclashprotection" - ++ optional (!atLeast11) "zerocallusedregs" + optional (!atLeast11) "zerocallusedregs" ++ optionals (!atLeast12) [ "fortify3" "trivialautovarinit" ] ++ optional (!( - atLeast8 - && targetPlatform.isLinux + targetPlatform.isLinux && targetPlatform.isx86_64 && targetPlatform.libc == "glibc" )) "shadowstack" - ++ optional (!(atLeast9 && targetPlatform.isLinux && targetPlatform.isAarch64)) "pacret" + ++ optional (!(targetPlatform.isLinux && targetPlatform.isAarch64)) "pacret" ++ optionals (langFortran) [ "fortify" "format" ]; }; @@ -359,10 +345,7 @@ pipe ((callFile ./common/builder.nix {}) ({ maintainers ; } // optionalAttrs (!atLeast11) { - badPlatforms = - # avr-gcc8 is maintained for the `qmk` package - if (is8 && targetPlatform.isAvr) then [] - else [ "aarch64-darwin" ]; + badPlatforms = [ "aarch64-darwin" ]; } // optionalAttrs is10 { badPlatforms = if targetPlatform != hostPlatform then [ "aarch64-darwin" ] else [ ]; }; @@ -371,8 +354,6 @@ pipe ((callFile ./common/builder.nix {}) ({ preBuild = '' makeFlagsArray+=('STRIP=${getBin cctools}/bin/${stdenv.cc.targetPrefix}strip') ''; -} // optionalAttrs (!atLeast8) { - doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv } // optionalAttrs enableMultilib { dontMoveLib64 = true; } diff --git a/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch b/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch deleted file mode 100644 index 095713eb6c8c..000000000000 --- a/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -ur a/libgcc/config/t-darwin b/libgcc/config/t-darwin ---- a/libgcc/config/t-darwin 2012-07-14 09:50:59.000000000 -0400 -+++ b/libgcc/config/t-darwin 2023-11-05 21:26:11.696825584 -0500 -@@ -7,12 +7,6 @@ - crttme.o: $(srcdir)/config/darwin-crt-tm.c - $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -DEND -c $< - --# -pipe because there's an assembler bug, 4077127, which causes --# it to not properly process the first # directive, causing temporary --# file names to appear in stabs, causing the bootstrap to fail. Using -pipe --# works around this by not having any temporary file names. --HOST_LIBGCC2_CFLAGS += -pipe -- - # Use unwind-dw2-fde-darwin - LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \ - $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c diff --git a/pkgs/development/compilers/gcc/patches/6/0001-Fix-build-for-glibc-2.31.patch b/pkgs/development/compilers/gcc/patches/6/0001-Fix-build-for-glibc-2.31.patch deleted file mode 100644 index 0cd04e218caf..000000000000 --- a/pkgs/development/compilers/gcc/patches/6/0001-Fix-build-for-glibc-2.31.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 8b55f1047cf3491429c1af607e5dac08a81db6e1 Mon Sep 17 00:00:00 2001 -From: Maximilian Bosch -Date: Thu, 20 Feb 2020 15:08:36 +0100 -Subject: [PATCH] Fix build for glibc 2.31 - ---- - .../sanitizer_platform_limits_posix.cc | 5 +++-- - .../sanitizer_platform_limits_posix.h | 15 +-------------- - 2 files changed, 4 insertions(+), 16 deletions(-) - -diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -index 069d8d557..c49c28c6e 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -@@ -1130,8 +1130,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); - #ifndef __GLIBC_PREREQ - #define __GLIBC_PREREQ(x, y) 0 - #endif --#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) --/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ -+#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) -+/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit -+ on many architectures. */ - CHECK_SIZE_AND_OFFSET(ipc_perm, mode); - #endif - -diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -index 304d04e39..568081a79 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -200,27 +200,14 @@ namespace __sanitizer { - unsigned __seq; - u64 __unused1; - u64 __unused2; --#elif defined(__mips__) || defined(__aarch64__) -- unsigned int mode; -- unsigned short __seq; -- unsigned short __pad1; -- unsigned long __unused1; -- unsigned long __unused2; - #elif defined(__sparc__) --# if defined(__arch64__) - unsigned mode; -- unsigned short __pad1; --# else -- unsigned short __pad1; -- unsigned short mode; - unsigned short __pad2; --# endif - unsigned short __seq; - unsigned long long __unused1; - unsigned long long __unused2; - #else -- unsigned short mode; -- unsigned short __pad1; -+ unsigned int mode; - unsigned short __seq; - unsigned short __pad2; - #if defined(__x86_64__) && !defined(_LP64) --- -2.25.0 - diff --git a/pkgs/development/compilers/gcc/patches/6/Added-mcf-thread-model-support-from-mcfgthread.patch b/pkgs/development/compilers/gcc/patches/6/Added-mcf-thread-model-support-from-mcfgthread.patch deleted file mode 100644 index 25e3a902cbf2..000000000000 --- a/pkgs/development/compilers/gcc/patches/6/Added-mcf-thread-model-support-from-mcfgthread.patch +++ /dev/null @@ -1,285 +0,0 @@ -From 30534f48c6ede142dad0008d1641392d82b8a137 Mon Sep 17 00:00:00 2001 -From: Liu Hao -Date: Mon, 18 Apr 2016 11:50:55 +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 +++++++++++++++++++++++ - 15 files changed, 71 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 858b878d4b3..6f745790d64 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1722,6 +1722,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 fe11333a2d1..cac85802f38 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 e04818966fa..7b75a372506 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 954673c1c43..6b5667f1c70 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -11702,7 +11702,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 4c65d441e72..e6fa04ada4f 100644 ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -1593,7 +1593,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 eab2765d7fd..f4058b6f4a2 100644 ---- a/libatomic/configure.tgt -+++ b/libatomic/configure.tgt -@@ -124,7 +124,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 2b139b8befc..fb18d2a042e 100644 ---- a/libgcc/config.host -+++ b/libgcc/config.host -@@ -712,6 +712,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 -@@ -736,6 +739,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 e7d6c75a6f7..664d0f852c4 100644 ---- a/libgcc/configure -+++ b/libgcc/configure -@@ -5077,6 +5077,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 b5ae4213f94..c484d3aee5f 100755 ---- a/libstdc++-v3/configure -+++ b/libstdc++-v3/configure -@@ -15177,6 +15177,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 e6520c1094f..3d6907796dd 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 -@@ -163,3 +179,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 9b617998ffe..a441fdbb616 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 - #if defined(__GTHREADS) && defined(__GTHREAD_HAS_COND) \ -@@ -424,3 +445,5 @@ namespace __cxxabiv1 - #endif - } - } -+ -+#endif --- -2.12.1 - diff --git a/pkgs/development/compilers/gcc/patches/6/AvailabilityInternal.h-fixincludes.patch b/pkgs/development/compilers/gcc/patches/6/AvailabilityInternal.h-fixincludes.patch deleted file mode 100644 index a29bb5eba98c..000000000000 --- a/pkgs/development/compilers/gcc/patches/6/AvailabilityInternal.h-fixincludes.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x -index 662dc97762c..5140a04f9dd 100644 ---- a/fixincludes/fixincl.x -+++ b/fixincludes/fixincl.x -@@ -3053,6 +3053,43 @@ static const char* apzDarwin_Stdint_7Patch[] = { - #endif", - (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 -@@ -9855,9 +9892,9 @@ static const char* apzX11_SprintfPatch[] = { - * - * List of all fixes - */ --#define REGEX_COUNT 277 -+#define REGEX_COUNT 278 - #define MACH_LIST_SIZE_LIMIT 187 --#define FIX_COUNT 241 -+#define FIX_COUNT 242 - - /* - * Enumerate the fixes -@@ -9933,6 +9970,7 @@ typedef enum { - DARWIN_STDINT_5_FIXIDX, - DARWIN_STDINT_6_FIXIDX, - DARWIN_STDINT_7_FIXIDX, -+ DARWIN_NIX_SDK_AVAILABILITYINTERNAL_FIXIDX, - DEC_INTERN_ASM_FIXIDX, - DJGPP_WCHAR_H_FIXIDX, - ECD_CURSOR_FIXIDX, -@@ -10457,6 +10495,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { - DARWIN_STDINT_7_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aDarwin_Stdint_7Tests, apzDarwin_Stdint_7Patch, 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 98fb5b61649..8aad418dff8 100644 ---- a/fixincludes/inclhack.def -+++ b/fixincludes/inclhack.def -@@ -1591,6 +1591,20 @@ fix = { - "#define UINTMAX_C(v) (v ## ULL)"; - }; - -+/* -+ * 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/6/gnat-glibc234.patch b/pkgs/development/compilers/gcc/patches/6/gnat-glibc234.patch deleted file mode 100644 index 2d29cd7fa77f..000000000000 --- a/pkgs/development/compilers/gcc/patches/6/gnat-glibc234.patch +++ /dev/null @@ -1,30 +0,0 @@ -Fix build with glibc 2.34. Adapted from: -https://github.com/gcc-mirror/gcc/commit/331763de7d4850702a0f67298f36017c73cdb103 ---- a/gcc/ada/init.c -+++ b/gcc/ada/init.c -@@ -579,12 +579,8 @@ - - #ifndef __ia64__ - #define HAVE_GNAT_ALTERNATE_STACK 1 --/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size. -- It must be larger than MINSIGSTKSZ and hopefully near 2 * SIGSTKSZ. */ --# if 16 * 1024 < MINSIGSTKSZ --# error "__gnat_alternate_stack too small" --# endif --char __gnat_alternate_stack[16 * 1024]; -+/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size. */ -+char __gnat_alternate_stack[32 * 1024]; - #endif - - #ifdef __XENO__ ---- a/gcc/ada/s-osinte-linux.ads -+++ b/gcc/ada/s-osinte-linux.ads -@@ -328,7 +328,7 @@ - oss : access stack_t) return int; - pragma Import (C, sigaltstack, "sigaltstack"); - -- Alternate_Stack_Size : constant := 16 * 1024; -+ Alternate_Stack_Size : constant := 32 * 1024; - -- This must be in keeping with init.c:__gnat_alternate_stack - - Alternate_Stack : aliased char_array (1 .. Alternate_Stack_Size); diff --git a/pkgs/development/compilers/gcc/patches/6/gogcc-workaround-glibc-2.36.patch b/pkgs/development/compilers/gcc/patches/6/gogcc-workaround-glibc-2.36.patch deleted file mode 100644 index bc11f990e5e9..000000000000 --- a/pkgs/development/compilers/gcc/patches/6/gogcc-workaround-glibc-2.36.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/libgo/mksysinfo.sh b/libgo/mksysinfo.sh -index dd456e907..24e607c7b 100755 ---- a/libgo/mksysinfo.sh -+++ b/libgo/mksysinfo.sh -@@ -148,9 +148,6 @@ cat > sysinfo.c < - #endif --#if defined(HAVE_LINUX_FS_H) --#include --#endif - #if defined(HAVE_LINUX_REBOOT_H) - #include - #endif diff --git a/pkgs/development/compilers/gcc/patches/6/libstdc++-disable-flat_namespace.patch b/pkgs/development/compilers/gcc/patches/6/libstdc++-disable-flat_namespace.patch deleted file mode 100644 index 571644410def..000000000000 --- a/pkgs/development/compilers/gcc/patches/6/libstdc++-disable-flat_namespace.patch +++ /dev/null @@ -1,26 +0,0 @@ -Backported from GCC 7. - -diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host -index 304a7f5aff6..d1a189d93d0 100644 ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -234,7 +234,7 @@ case "${host_os}" in - os_include_dir="os/newlib" - OPT_LDFLAGS="${OPT_LDFLAGS} \$(lt_host_flags)" - ;; -- darwin | darwin[1-7] | darwin[1-7].*) -+ darwin[1-7] | darwin[1-7].*) - # On Darwin, performance is improved if libstdc++ is single-module. - # Up to at least 10.3.7, -flat_namespace is required for proper - # treatment of coalesced symbols. -@@ -252,6 +252,10 @@ case "${host_os}" in - esac - os_include_dir="os/bsd/darwin" - ;; -+ darwin*) -+ # Post Darwin8, defaults should be sufficient. -+ os_include_dir="os/bsd/darwin" -+ ;; - *djgpp*) # leading * picks up "msdosdjgpp" - os_include_dir="os/djgpp" - error_constants_dir="os/djgpp" diff --git a/pkgs/development/compilers/gcc/patches/7/0001-Fix-build-for-glibc-2.31.patch b/pkgs/development/compilers/gcc/patches/7/0001-Fix-build-for-glibc-2.31.patch deleted file mode 100644 index d8aad14942bf..000000000000 --- a/pkgs/development/compilers/gcc/patches/7/0001-Fix-build-for-glibc-2.31.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 2d03b6eaf823fc2db6a32b4a95e18f8a7474b47f Mon Sep 17 00:00:00 2001 -From: Maximilian Bosch -Date: Thu, 20 Feb 2020 01:56:42 +0100 -Subject: [PATCH] Fix build for glibc 2.31 - ---- - .../sanitizer_platform_limits_posix.cc | 5 +++-- - .../sanitizer_platform_limits_posix.h | 15 +-------------- - 2 files changed, 4 insertions(+), 16 deletions(-) - -diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -index 97eae3fc7..4089d4695 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -@@ -1145,8 +1145,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); - CHECK_SIZE_AND_OFFSET(ipc_perm, gid); - CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); - CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); --#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) --/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ -+#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) -+/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit -+ on many architectures. */ - CHECK_SIZE_AND_OFFSET(ipc_perm, mode); - #endif - -diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -index c13932283..3456fb2db 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -204,27 +204,14 @@ namespace __sanitizer { - unsigned __seq; - u64 __unused1; - u64 __unused2; --#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) -- unsigned int mode; -- unsigned short __seq; -- unsigned short __pad1; -- unsigned long __unused1; -- unsigned long __unused2; - #elif defined(__sparc__) --# if defined(__arch64__) - unsigned mode; -- unsigned short __pad1; --# else -- unsigned short __pad1; -- unsigned short mode; - unsigned short __pad2; --# endif - unsigned short __seq; - unsigned long long __unused1; - unsigned long long __unused2; - #else -- unsigned short mode; -- unsigned short __pad1; -+ unsigned int mode; - unsigned short __seq; - unsigned short __pad2; - #if defined(__x86_64__) && !defined(_LP64) --- -2.25.0 - diff --git a/pkgs/development/compilers/gcc/patches/7/Added-mcf-thread-model-support-from-mcfgthread.patch b/pkgs/development/compilers/gcc/patches/7/Added-mcf-thread-model-support-from-mcfgthread.patch deleted file mode 100644 index 0c5d0ee9e460..000000000000 --- a/pkgs/development/compilers/gcc/patches/7/Added-mcf-thread-model-support-from-mcfgthread.patch +++ /dev/null @@ -1,285 +0,0 @@ -From d3cb66e4751fcbd581b81a14a973de2d78fc02ad Mon Sep 17 00:00:00 2001 -From: Liu Hao -Date: Mon, 18 Apr 2016 11:50:55 +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 +++++++++++++++++++++++ - 15 files changed, 71 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 8f91197f34e..59db37cac04 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1719,6 +1719,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 270ec0dd037..88966f79695 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 e5f014cb473..989cfbe894e 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 ea73b151a4e..317200e5620 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -11681,7 +11681,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 9d4c792a33f..d51899a5676 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 b8af3ab2546..73248438a8c 100644 ---- a/libatomic/configure.tgt -+++ b/libatomic/configure.tgt -@@ -125,7 +125,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 b279a6458f9..20d22f585da 100644 ---- a/libgcc/config.host -+++ b/libgcc/config.host -@@ -710,6 +710,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 -@@ -734,6 +737,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 45c459788c3..8fc569ef16e 100644 ---- a/libgcc/configure -+++ b/libgcc/configure -@@ -5086,6 +5086,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 2406cb9d946..50e7e4ced89 100755 ---- a/libstdc++-v3/configure -+++ b/libstdc++-v3/configure -@@ -15182,6 +15182,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 923a0707556..a55d85aad2d 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 19953bc52f0..72fd5f26d5b 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 --- -2.12.1 - diff --git a/pkgs/development/compilers/gcc/patches/7/AvailabilityInternal.h-fixincludes.patch b/pkgs/development/compilers/gcc/patches/7/AvailabilityInternal.h-fixincludes.patch deleted file mode 100644 index a8a995d030df..000000000000 --- a/pkgs/development/compilers/gcc/patches/7/AvailabilityInternal.h-fixincludes.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x -index d12ba7c3e88..9f31b29c509 100644 ---- a/fixincludes/fixincl.x -+++ b/fixincludes/fixincl.x -@@ -3468,6 +3468,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 -@@ -10347,9 +10384,9 @@ static const char* apzX11_SprintfPatch[] = { - * - * List of all fixes - */ --#define REGEX_COUNT 291 -+#define REGEX_COUNT 292 - #define MACH_LIST_SIZE_LIMIT 187 --#define FIX_COUNT 253 -+#define FIX_COUNT 254 - - /* - * Enumerate the fixes -@@ -10435,6 +10472,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, -@@ -11011,6 +11049,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 179e2f3c98a..70b681f35c8 100644 ---- a/fixincludes/inclhack.def -+++ b/fixincludes/inclhack.def -@@ -1793,6 +1793,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/7/gcc8-asan-glibc-2.34.patch b/pkgs/development/compilers/gcc/patches/7/gcc8-asan-glibc-2.34.patch deleted file mode 100644 index 5645b97c1d89..000000000000 --- a/pkgs/development/compilers/gcc/patches/7/gcc8-asan-glibc-2.34.patch +++ /dev/null @@ -1,70 +0,0 @@ -From ef195a39d0d3b929cc676302d074b42c25460601 Mon Sep 17 00:00:00 2001 -From: Jakub Jelinek -Date: Sat, 17 Apr 2021 11:27:14 +0200 -Subject: [PATCH] sanitizer: Fix asan against glibc 2.34 [PR100114] - -As mentioned in the PR, SIGSTKSZ is no longer a compile time constant in -glibc 2.34 and later, so -static const uptr kAltStackSize = SIGSTKSZ * 4; -needs dynamic initialization, but is used by a function called indirectly -from .preinit_array and therefore before the variable is constructed. -This results in using 0 size instead and all asan instrumented programs -die with: -==91==ERROR: AddressSanitizer failed to allocate 0x0 (0) bytes of SetAlternateSignalStack (error code: 22) - -Here is a cherry-pick from upstream to fix this. - -2021-04-17 Jakub Jelinek - - PR sanitizer/100114 - * sanitizer_common/sanitizer_posix_libcdep.cc: Cherry-pick - llvm-project revisions 82150606fb11d28813ae6da1101f5bda638165fe - and b93629dd335ffee2fc4b9b619bf86c3f9e6b0023. - -(cherry picked from commit 950bac27d63c1c2ac3a6ed867692d6a13f21feb3) ---- - .../sanitizer_common/sanitizer_posix_libcdep.cc | 13 ++++++++----- - 1 file changed, 8 insertions(+), 5 deletions(-) - -diff --git a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc -index 1a37118c299..066079b3954 100644 ---- a/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cc -@@ -159,7 +159,11 @@ bool SupportsColoredOutput(fd_t fd) { - - #if !SANITIZER_GO - // TODO(glider): different tools may require different altstack size. --static const uptr kAltStackSize = SIGSTKSZ * 4; // SIGSTKSZ is not enough. -+static uptr GetAltStackSize() { -+ // SIGSTKSZ is not enough. -+ static const uptr kAltStackSize = SIGSTKSZ * 4; -+ return kAltStackSize; -+} - - void SetAlternateSignalStack() { - stack_t altstack, oldstack; -@@ -170,10 +174,9 @@ void SetAlternateSignalStack() { - // TODO(glider): the mapped stack should have the MAP_STACK flag in the - // future. It is not required by man 2 sigaltstack now (they're using - // malloc()). -- void* base = MmapOrDie(kAltStackSize, __func__); -- altstack.ss_sp = (char*) base; -+ altstack.ss_size = GetAltStackSize(); -+ altstack.ss_sp = (char *)MmapOrDie(altstack.ss_size, __func__); - altstack.ss_flags = 0; -- altstack.ss_size = kAltStackSize; - CHECK_EQ(0, sigaltstack(&altstack, nullptr)); - } - -@@ -181,7 +184,7 @@ void UnsetAlternateSignalStack() { - stack_t altstack, oldstack; - altstack.ss_sp = nullptr; - altstack.ss_flags = SS_DISABLE; -- altstack.ss_size = kAltStackSize; // Some sane value required on Darwin. -+ altstack.ss_size = GetAltStackSize(); // Some sane value required on Darwin. - CHECK_EQ(0, sigaltstack(&altstack, &oldstack)); - UnmapOrDie(oldstack.ss_sp, oldstack.ss_size); - } --- -2.27.0 - diff --git a/pkgs/development/compilers/gcc/patches/7/riscv-no-relax.patch b/pkgs/development/compilers/gcc/patches/7/riscv-no-relax.patch deleted file mode 100644 index 93d9cd1d60f5..000000000000 --- a/pkgs/development/compilers/gcc/patches/7/riscv-no-relax.patch +++ /dev/null @@ -1,109 +0,0 @@ -commit e7c570f37384d824cb9725f237920e9691e57269 -gpg: Signature made Tue 06 Mar 2018 04:52:46 PM PST -gpg: using RSA key 00CE76D1834960DFCE886DF8EF4CA1502CCBAB41 -gpg: issuer "palmer@dabbelt.com" -gpg: Good signature from "Palmer Dabbelt " [ultimate] -gpg: aka "Palmer Dabbelt " [ultimate] -Author: Palmer Dabbelt -Date: Thu Mar 1 12:01:06 2018 -0800 - - RISC-V: Add and document the "-mno-relax" option - - RISC-V relies on aggressive linker relaxation to get good code size. As - a result no text symbol addresses can be known until link time, which - means that alignment must be handled during the link. This alignment - pass is essentially just another linker relaxation, so this has the - unfortunate side effect that linker relaxation is required for - correctness on many RISC-V targets. - - The RISC-V assembler has supported an ".option norelax" for a long time - because there are situations in which linker relaxation is a bad idea -- - the canonical example is when trying to materialize the initial value of - the global pointer into a register, which would otherwise be relaxed to - a NOP. We've been relying on users who want to disable relaxation for - an entire link to pass "-Wl,--no-relax", but that still relies on the - linker relaxing R_RISCV_ALIGN to handle alignment despite it not being - strictly necessary. - - This patch adds a GCC option, "-mno-relax", that disable linker - relaxation by adding ".option norelax" to the top of every generated - assembly file. The assembler is smart enough to handle alignment at - assemble time for files that have never emitted a relaxable relocation, - so this is sufficient to really disable all relaxations in the linker, - which results in significantly faster link times for large objects. - - This also has the side effect of allowing toolchains that don't support - linker relaxation (LLVM and the Linux module loader) to function - correctly. Toolchains that don't support linker relaxation should - default to "-mno-relax" and error when presented with any R_RISCV_ALIGN - relocation as those need to be handled for correctness. - - gcc/ChangeLog - - 2018-03-01 Palmer Dabbelt - - * config/riscv/riscv.opt (mrelax): New option. - * config/riscv/riscv.c (riscv_file_start): Emit ".option - "norelax" when riscv_mrelax is disabled. - * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax". - -diff --git a/gcc/config/riscv/riscv.c b/gcc/config/riscv/riscv.c -index c38f6c394d54..3e81874de232 100644 ---- a/gcc/config/riscv/riscv.c -+++ b/gcc/config/riscv/riscv.c -@@ -3979,6 +3979,11 @@ riscv_file_start (void) - - /* Instruct GAS to generate position-[in]dependent code. */ - fprintf (asm_out_file, "\t.option %spic\n", (flag_pic ? "" : "no")); -+ -+ /* If the user specifies "-mno-relax" on the command line then disable linker -+ relaxation in the assembler. */ -+ if (! riscv_mrelax) -+ fprintf (asm_out_file, "\t.option norelax\n"); - } - - /* Implement TARGET_ASM_OUTPUT_MI_THUNK. Generate rtl rather than asm text -diff --git a/gcc/config/riscv/riscv.opt b/gcc/config/riscv/riscv.opt -index 581a26bb5c1e..b37ac75d9bb4 100644 ---- a/gcc/config/riscv/riscv.opt -+++ b/gcc/config/riscv/riscv.opt -@@ -106,6 +106,11 @@ mexplicit-relocs - Target Report Mask(EXPLICIT_RELOCS) - Use %reloc() operators, rather than assembly macros, to load addresses. - -+mrelax -+Target Bool Var(riscv_mrelax) Init(1) -+Take advantage of linker relaxations to reduce the number of instructions -+required to materialize symbol addresses. -+ - Mask(64BIT) - - Mask(MUL) -diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi -index 8d366c626bae..deb48af2ecad 100644 ---- a/gcc/doc/invoke.texi -+++ b/gcc/doc/invoke.texi -@@ -1042,7 +1042,8 @@ See RS/6000 and PowerPC Options. - -msave-restore -mno-save-restore @gol - -mstrict-align -mno-strict-align @gol - -mcmodel=medlow -mcmodel=medany @gol ---mexplicit-relocs -mno-explicit-relocs @gol} -+-mexplicit-relocs -mno-explicit-relocs @gol -+-mrelax -mno-relax @gol} - - @emph{RL78 Options} - @gccoptlist{-msim -mmul=none -mmul=g13 -mmul=g14 -mallregs @gol -@@ -23102,6 +23103,12 @@ Use or do not use assembler relocation operators when dealing with symbolic - addresses. The alternative is to use assembler macros instead, which may - limit optimization. - -+@item -mrelax -+@itemx -mno-relax -+Take advantage of linker relaxations to reduce the number of instructions -+required to materialize symbol addresses. The default is to take advantage of -+linker relaxations. -+ - @end table - - @node RL78 Options - diff --git a/pkgs/development/compilers/gcc/patches/7/riscv-pthread-reentrant.patch b/pkgs/development/compilers/gcc/patches/7/riscv-pthread-reentrant.patch deleted file mode 100644 index c7527ffb2b16..000000000000 --- a/pkgs/development/compilers/gcc/patches/7/riscv-pthread-reentrant.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: gcc/config/riscv/linux.h -=================================================================== ---- a/gcc/config/riscv/linux.h (revision 257620) -+++ b/gcc/config/riscv/linux.h (revision 257621) -@@ -47,6 +47,8 @@ - - #define ICACHE_FLUSH_FUNC "__riscv_flush_icache" - -+#define CPP_SPEC "%{pthread:-D_REENTRANT}" -+ - #define LINK_SPEC "\ - -melf" XLEN_SPEC "lriscv \ - %{shared} \ diff --git a/pkgs/development/compilers/gcc/patches/8/Added-mcf-thread-model-support-from-mcfgthread.patch b/pkgs/development/compilers/gcc/patches/8/Added-mcf-thread-model-support-from-mcfgthread.patch deleted file mode 100644 index d9809e828f10..000000000000 --- a/pkgs/development/compilers/gcc/patches/8/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/8/AvailabilityInternal.h-fixincludes.patch b/pkgs/development/compilers/gcc/patches/8/AvailabilityInternal.h-fixincludes.patch deleted file mode 100644 index 0a4f46bce066..000000000000 --- a/pkgs/development/compilers/gcc/patches/8/AvailabilityInternal.h-fixincludes.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x -index 9578c99ab7b..e0ae73496c6 100644 ---- a/fixincludes/fixincl.x -+++ b/fixincludes/fixincl.x -@@ -3428,6 +3428,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 -@@ -10356,9 +10393,9 @@ static const char* apzX11_SprintfPatch[] = { - * - * List of all fixes - */ --#define REGEX_COUNT 294 -+#define REGEX_COUNT 295 - #define MACH_LIST_SIZE_LIMIT 187 --#define FIX_COUNT 255 -+#define FIX_COUNT 256 - - /* - * Enumerate the fixes -@@ -10445,6 +10482,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, -@@ -11027,6 +11065,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 948ea1d9183..5eb403ac841 100644 ---- a/fixincludes/inclhack.def -+++ b/fixincludes/inclhack.def -@@ -1697,6 +1697,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/8/avr-gcc-8-darwin.patch b/pkgs/development/compilers/gcc/patches/8/avr-gcc-8-darwin.patch deleted file mode 100644 index 3705ed99c49a..000000000000 --- a/pkgs/development/compilers/gcc/patches/8/avr-gcc-8-darwin.patch +++ /dev/null @@ -1,16 +0,0 @@ -From https://gist.githubusercontent.com/DavidEGrayson/88bceb3f4e62f45725ecbb9248366300/raw/c1f515475aff1e1e3985569d9b715edb0f317648/gcc-11-arm-darwin.patch - -diff -ur a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c ---- a/gcc/config/host-darwin.c 2021-04-27 03:00:13.000000000 -0700 -+++ b/gcc/config/host-darwin.c 2021-06-11 14:49:13.754000000 -0700 -@@ -22,6 +22,10 @@ - #include "coretypes.h" - #include "diagnostic-core.h" - #include "config/host-darwin.h" -+#include "hosthooks.h" -+#include "hosthooks-def.h" -+ -+const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; - - /* Yes, this is really supposed to work. */ - /* This allows for a pagesize of 16384, which we have on Darwin20, but should \ No newline at end of file diff --git a/pkgs/development/compilers/gcc/patches/8/gcc8-darwin-as-gstabs.patch b/pkgs/development/compilers/gcc/patches/8/gcc8-darwin-as-gstabs.patch deleted file mode 100644 index 1ac870e57298..000000000000 --- a/pkgs/development/compilers/gcc/patches/8/gcc8-darwin-as-gstabs.patch +++ /dev/null @@ -1,96 +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 2021-05-14 04:42:08.000000000 -0400 -+++ b/gcc/config/darwin.h 2023-11-06 08:53:27.629155053 -0500 -@@ -233,12 +233,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 - -@@ -469,18 +475,31 @@ - /* 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 c25771a93723..c9989f4c1e0b 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -30,16 +30,12 @@ let atLeast12 = lib.versionAtLeast version "12"; atLeast11 = lib.versionAtLeast version "11"; atLeast10 = lib.versionAtLeast version "10"; - atLeast9 = lib.versionAtLeast version "9"; - atLeast8 = lib.versionAtLeast version "8"; is14 = majorVersion == "14"; is13 = majorVersion == "13"; is12 = majorVersion == "12"; is11 = majorVersion == "11"; is10 = majorVersion == "10"; is9 = majorVersion == "9"; - is8 = majorVersion == "8"; - is7 = majorVersion == "7"; inherit (lib) optionals optional; in @@ -70,7 +66,7 @@ in ++ optional (atLeast12 && langAda) ./gnat-cflags-11.patch ++ optional langFortran (if atLeast12 then ./gcc-12-gfortran-driving.patch else ./gfortran-driving.patch) ++ [ ./ppc-musl.patch ] -++ optional (atLeast9 && langD) ./libphobos.patch +++ optional langD ./libphobos.patch @@ -172,8 +168,6 @@ in # Work around newer AvailabilityInternal.h when building older versions of GCC. ++ optionals (stdenv.hostPlatform.isDarwin) ({ "9" = [ ../patches/9/AvailabilityInternal.h-fixincludes.patch ]; - "8" = [ ../patches/8/AvailabilityInternal.h-fixincludes.patch ]; - "7" = [ ../patches/7/AvailabilityInternal.h-fixincludes.patch ]; }.${majorVersion} or []) @@ -226,41 +220,3 @@ in # 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 - - -## gcc 8.0 and older ############################################################################## - -++ optional (!atLeast9) ./libsanitizer-no-cyclades-9.patch -++ optional (is7 || is8) ./9/fix-struct-redefinition-on-glibc-2.36.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 (is8 && hostPlatform.isDarwin) ./8/gcc8-darwin-as-gstabs.patch - -# Make avr-gcc8 build on aarch64-darwin -# avr-gcc8 is maintained for the `qmk` package -# https://github.com/osx-cross/homebrew-avr/blob/main/Formula/avr-gcc%408.rb#L69 -++ optional (is8 && targetPlatform.isAvr && hostPlatform.isDarwin && hostPlatform.isAarch64) ./8/avr-gcc-8-darwin.patch - - -## gcc 7.0 and older ############################################################################## - -++ optional (is7 && hostPlatform != buildPlatform) (fetchpatch { # XXX: Refine when this should be applied - url = "https://git.busybox.net/buildroot/plain/package/gcc/7.1.0/0900-remove-selftests.patch?id=11271540bfe6adafbc133caf6b5b902a816f5f02"; - sha256 = "0mrvxsdwip2p3l17dscpc1x8vhdsciqw1z5q9i6p5g9yg1cqnmgs"; -}) -++ optionals (is7) [ - # https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00633.html - (./. + "/${majorVersion}/riscv-pthread-reentrant.patch") - # https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00297.html - (./. + "/${majorVersion}/riscv-no-relax.patch") - # Fix for asan w/glibc-2.34. Although there's no upstream backport to v7, - # the patch from gcc 8 seems to work perfectly fine. - (./. + "/${majorVersion}/gcc8-asan-glibc-2.34.patch") - (./. + "/${majorVersion}/0001-Fix-build-for-glibc-2.31.patch") -] -++ optional (is7 && targetPlatform.libc == "musl" && targetPlatform.isx86_32) (fetchpatch { - url = "https://git.alpinelinux.org/aports/plain/main/gcc/gcc-6.1-musl-libssp.patch?id=5e4b96e23871ee28ef593b439f8c07ca7c7eb5bb"; - sha256 = "1jf1ciz4gr49lwyh8knfhw6l5gvfkwzjy90m7qiwkcbsf4a3fqn2"; -}) -++ optional ((is7 || is8) && !atLeast9 && targetPlatform.libc == "musl") ./libgomp-dont-force-initial-exec.patch diff --git a/pkgs/development/compilers/gcc/patches/libgomp-dont-force-initial-exec.patch b/pkgs/development/compilers/gcc/patches/libgomp-dont-force-initial-exec.patch deleted file mode 100644 index afd1f7456d32..000000000000 --- a/pkgs/development/compilers/gcc/patches/libgomp-dont-force-initial-exec.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 01c433f4788441c0963005b9d3fad5b2865e6651 Mon Sep 17 00:00:00 2001 -From: Will Dietz -Date: Mon, 24 Sep 2018 19:57:50 -0500 -Subject: [PATCH] libgomp/configure.tgt: don't force initial-exec tls-model - ---- - libgomp/configure.tgt | 17 ----------------- - 1 file changed, 17 deletions(-) - -diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt -index 74d95a570c7..b608c55f0c1 100644 ---- a/libgomp/configure.tgt -+++ b/libgomp/configure.tgt -@@ -10,23 +10,6 @@ - # XCFLAGS Add extra compile flags to use. - # XLDFLAGS Add extra link flags to use. - --# Optimize TLS usage by avoiding the overhead of dynamic allocation. --if test $gcc_cv_have_tls = yes ; then -- case "${target}" in -- -- *-*-k*bsd*-gnu*) -- ;; -- -- *-*-linux* | *-*-gnu*) -- XCFLAGS="${XCFLAGS} -ftls-model=initial-exec" -- ;; -- -- *-*-rtems*) -- XCFLAGS="${XCFLAGS} -ftls-model=local-exec" -- ;; -- esac --fi -- - # Since we require POSIX threads, assume a POSIX system by default. - config_path="posix" - --- -2.19.0 - diff --git a/pkgs/development/compilers/gcc/patches/libsanitizer-no-cyclades-9.patch b/pkgs/development/compilers/gcc/patches/libsanitizer-no-cyclades-9.patch deleted file mode 100644 index 072403d1495f..000000000000 --- a/pkgs/development/compilers/gcc/patches/libsanitizer-no-cyclades-9.patch +++ /dev/null @@ -1,82 +0,0 @@ -https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=2b40941d23b1570cdd90083b58fa0f66aa58c86e -https://gcc.gnu.org/PR100379 ---- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc -+++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc -@@ -365,15 +365,6 @@ static void ioctl_table_fill() { - - #if SANITIZER_LINUX && !SANITIZER_ANDROID - // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE -- _(CYGETDEFTHRESH, WRITE, sizeof(int)); -- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); -- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); -- _(CYGETTHRESH, WRITE, sizeof(int)); -- _(CYGETTIMEOUT, WRITE, sizeof(int)); -- _(CYSETDEFTHRESH, NONE, 0); -- _(CYSETDEFTIMEOUT, NONE, 0); -- _(CYSETTHRESH, NONE, 0); -- _(CYSETTIMEOUT, NONE, 0); - _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); - _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); - _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc -@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t; - # include - #endif - #include --#include - #include - #include - #include -@@ -466,7 +465,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); - - #if SANITIZER_LINUX && !SANITIZER_ANDROID - unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); -- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); - #if EV_VERSION > (0x010000) - unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); - #else -@@ -833,15 +831,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); - #endif // SANITIZER_LINUX || SANITIZER_FREEBSD - - #if SANITIZER_LINUX && !SANITIZER_ANDROID -- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; -- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; -- unsigned IOCTL_CYGETMON = CYGETMON; -- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; -- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; -- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; -- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; -- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; -- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; - unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; - unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; - unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; ---- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -1040,7 +1040,6 @@ struct __sanitizer_cookie_io_functions_t { - - #if SANITIZER_LINUX && !SANITIZER_ANDROID - extern unsigned struct_ax25_parms_struct_sz; -- extern unsigned struct_cyclades_monitor_sz; - extern unsigned struct_input_keymap_entry_sz; - extern unsigned struct_ipx_config_data_sz; - extern unsigned struct_kbdiacrs_sz; -@@ -1385,15 +1384,6 @@ struct __sanitizer_cookie_io_functions_t { - #endif // SANITIZER_LINUX || SANITIZER_FREEBSD - - #if SANITIZER_LINUX && !SANITIZER_ANDROID -- extern unsigned IOCTL_CYGETDEFTHRESH; -- extern unsigned IOCTL_CYGETDEFTIMEOUT; -- extern unsigned IOCTL_CYGETMON; -- extern unsigned IOCTL_CYGETTHRESH; -- extern unsigned IOCTL_CYGETTIMEOUT; -- extern unsigned IOCTL_CYSETDEFTHRESH; -- extern unsigned IOCTL_CYSETDEFTIMEOUT; -- extern unsigned IOCTL_CYSETTHRESH; -- extern unsigned IOCTL_CYSETTIMEOUT; - extern unsigned IOCTL_EQL_EMANCIPATE; - extern unsigned IOCTL_EQL_ENSLAVE; - extern unsigned IOCTL_EQL_GETMASTRCFG; --- -2.27.0 diff --git a/pkgs/development/compilers/gcc/versions.nix b/pkgs/development/compilers/gcc/versions.nix index 7aa8b558f358..87ebf0681299 100644 --- a/pkgs/development/compilers/gcc/versions.nix +++ b/pkgs/development/compilers/gcc/versions.nix @@ -6,9 +6,6 @@ let "11" = "11.5.0"; "10" = "10.5.0"; "9" = "9.5.0"; - "8" = "8.5.0"; - "7" = "7.5.0"; - "6" = "6.5.0"; }; fromMajorMinor = majorMinorVersion: @@ -22,9 +19,6 @@ let "11.5.0" = "sha256-puIYaOrVRc+H8MAfhCduS1KB1nIJhZHByJYkHwk2NHg="; "10.5.0" = "sha256-JRCVQ/30bzl8NHtdi3osflaUpaUczkucbh6opxyjB8E="; "9.5.0" = "13ygjmd938m0wmy946pxdhz9i1wq7z4w10l6pvidak0xxxj9yxi7"; - "8.5.0" = "0l7d4m9jx124xsk6xardchgy2k5j5l2b15q322k31f0va4d8826k"; - "7.5.0" = "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq"; - "6.5.0" = "0i89fksfp6wr1xg9l8296aslcymv2idn60ip31wr9s4pwin7kwby"; }."${version}"; in { diff --git a/pkgs/development/libraries/isl/0.17.1.nix b/pkgs/development/libraries/isl/0.17.1.nix deleted file mode 100644 index 2e0110df786e..000000000000 --- a/pkgs/development/libraries/isl/0.17.1.nix +++ /dev/null @@ -1,8 +0,0 @@ -import ./generic.nix rec { - version = "0.17.1"; - urls = [ - "mirror://sourceforge/libisl/isl-${version}.tar.xz" - "https://libisl.sourceforge.io/isl-${version}.tar.xz" - ]; - sha256 = "be152e5c816b477594f4c6194b5666d8129f3a27702756ae9ff60346a8731647"; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 4b2e4ee7f9fe..4efab55ea533 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -413,12 +413,18 @@ mapAliases { gcc49Stdenv = throw "gcc49Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-11 gcc6 = throw "gcc6 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13 gcc6Stdenv = throw "gcc6Stdenv has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13 + gcc7 = throw "gcc7 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 + 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 gcc10StdenvCompat = if stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "11" then gcc10Stdenv else stdenv; # Added 2024-03-21 gcj = gcj6; # Added 2024-09-13 gcj6 = throw "gcj6 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13 gcolor2 = throw "'gcolor2' has been removed due to lack of maintenance upstream and depending on gtk2. Consider using 'gcolor3' or 'eyedropper' instead"; # Added 2024-09-15 gfortran48 = throw "'gfortran48' has been removed from nixpkgs"; # Added 2024-09-10 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 ghostwriter = libsForQt5.kdeGear.ghostwriter; # Added 2023-03-18 gmp5 = throw "'gmp5' has been removed as it is unmaintained. Consider using 'gmp' instead"; # Added 2024-10-28 gmpc = throw "'gmpc' has been removed due to lack of maintenance upstream. Consider using 'plattenalbum' instead"; # Added 2024-09-14 @@ -542,6 +548,7 @@ mapAliases { irrlichtmt = throw "irrlichtmt has been removed because it was moved into the Minetest repo"; # Added 2024-08-12 isl_0_11 = throw "isl_0_11 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13 isl_0_14 = throw "isl_0_14 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13 + isl_0_17 = throw "isl_0_17 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-11-20 iso-flags-png-320x420 = lib.warn "iso-flags-png-320x420 has been renamed to iso-flags-png-320x240" iso-flags-png-320x240; # Added 2024-07-17 itktcl = tclPackages.itktcl; # Added 2024-10-02 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 38982497a655..da9f94c711be 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3918,7 +3918,6 @@ with pkgs; angryipscanner = ipscan; isl = isl_0_20; - isl_0_17 = callPackage ../development/libraries/isl/0.17.1.nix { }; isl_0_20 = callPackage ../development/libraries/isl/0.20.0.nix { }; isl_0_24 = callPackage ../development/libraries/isl/0.24.0.nix { }; @@ -6130,8 +6129,6 @@ with pkgs; extraBuildInputs = lib.optional stdenv.hostPlatform.isDarwin clang.cc; }; - gcc7Stdenv = overrideCC gccStdenv buildPackages.gcc7; - gcc8Stdenv = overrideCC gccStdenv buildPackages.gcc8; gcc9Stdenv = overrideCC gccStdenv buildPackages.gcc9; gcc10Stdenv = overrideCC gccStdenv buildPackages.gcc10; gcc11Stdenv = overrideCC gccStdenv buildPackages.gcc11; @@ -6223,7 +6220,7 @@ with pkgs; }; inherit (callPackage ../development/compilers/gcc/all.nix { inherit noSysDirs; }) - gcc7 gcc8 gcc9 gcc10 gcc11 gcc12 gcc13 gcc14; + gcc9 gcc10 gcc11 gcc12 gcc13 gcc14; gcc_latest = gcc14; diff --git a/pkgs/top-level/release.nix b/pkgs/top-level/release.nix index 838ac6ec3934..24683706ab8d 100644 --- a/pkgs/top-level/release.nix +++ b/pkgs/top-level/release.nix @@ -215,8 +215,6 @@ let TODO: re-add tests; context: https://github.com/NixOS/nixpkgs/commit/36587a587ab191eddd868179d63c82cdd5dee21b jobs.tests.cc-wrapper.default.x86_64-linux - jobs.tests.cc-wrapper.gcc7Stdenv.x86_64-linux - jobs.tests.cc-wrapper.gcc8Stdenv.x86_64-linux # broken see issue #40038 @@ -248,8 +246,6 @@ let jobs.darwin.linux-builder.x86_64-darwin /* jobs.tests.cc-wrapper.default.x86_64-darwin - jobs.tests.cc-wrapper.gcc7Stdenv.x86_64-darwin - jobs.tests.cc-wrapper.gcc8Stdenv.x86_64-darwin jobs.tests.cc-wrapper.llvmPackages.clang.x86_64-darwin jobs.tests.cc-wrapper.llvmPackages.libcxx.x86_64-darwin jobs.tests.stdenv-inputs.x86_64-darwin