diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 5fcd8d694f44..7717c5015cb7 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -152,8 +152,8 @@ let x86-64-v4 = versionAtLeast ccVersion "11.0"; # Intel - skylake = versionAtLeast ccVersion "6.0"; - skylake-avx512 = versionAtLeast ccVersion "6.0"; + skylake = true; + skylake-avx512 = true; cannonlake = versionAtLeast ccVersion "8.0"; icelake-client = versionAtLeast ccVersion "8.0"; icelake-server = versionAtLeast ccVersion "8.0"; @@ -164,7 +164,7 @@ let alderlake = versionAtLeast ccVersion "12.0"; # AMD - znver1 = versionAtLeast ccVersion "6.0"; + znver1 = true; znver2 = versionAtLeast ccVersion "9.0"; znver3 = versionAtLeast ccVersion "11.0"; znver4 = versionAtLeast ccVersion "13.0"; @@ -202,9 +202,9 @@ let else if targetPlatform.isAarch64 then (if isGNU then { - cortex-a53 = versionAtLeast ccVersion "4.8"; # gcc 8c075f - cortex-a72 = versionAtLeast ccVersion "5.1"; # gcc d8f70d - "cortex-a72.cortex-a53" = versionAtLeast ccVersion "5.1"; # gcc d8f70d + cortex-a53 = true; + cortex-a72 = true; + "cortex-a72.cortex-a53" = true; }.${tune} or false else if isClang then { diff --git a/pkgs/development/compilers/gcc/all.nix b/pkgs/development/compilers/gcc/all.nix index deb2cf8cfdb7..05adfbfb82c4 100644 --- a/pkgs/development/compilers/gcc/all.nix +++ b/pkgs/development/compilers/gcc/all.nix @@ -3,11 +3,10 @@ , gccStdenv , gcc7Stdenv , callPackage -, isl_0_11, isl_0_14, isl_0_17, isl_0_20 +, isl_0_17, isl_0_20 , libcCross , threadsCross , noSysDirs -, cloog_0_18_0, cloog , lowPrio , wrapCC }@args: @@ -27,14 +26,8 @@ let threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { }; isl = if stdenv.isDarwin then null else if atLeast "9" then isl_0_20 - else if atLeast "7" then isl_0_17 - else if atLeast "6" then (if stdenv.targetPlatform.isRedox then isl_0_17 else isl_0_14) - else /* "5" */ isl_0_11; - } // lib.optionalAttrs (!(atLeast "6")) { - cloog = if stdenv.isDarwin - then null - else /* 5 */ cloog_0_18_0; - } // lib.optionalAttrs (atLeast "6" && !(atLeast "9")) { + 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 gcc7Stdenv else stdenv; }))); diff --git a/pkgs/development/compilers/gcc/common/builder.nix b/pkgs/development/compilers/gcc/common/builder.nix index 9a254ef59c02..8e087623879d 100644 --- a/pkgs/development/compilers/gcc/common/builder.nix +++ b/pkgs/development/compilers/gcc/common/builder.nix @@ -13,7 +13,6 @@ let version: stdenv.buildPlatform.isDarwin && stdenv.buildPlatform.isx86_64 - && lib.versionAtLeast version "6" && lib.versionOlder version "10"; in diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index f8e2ef6508b0..104851930213 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -6,7 +6,6 @@ , version , binutils, gmp, mpfr, libmpc, isl -, cloog ? null , enableLTO , enableMultilib @@ -18,7 +17,6 @@ , langCC , langD ? false , langFortran -, langJava ? false, javaAwtGtk ? false, javaAntlr ? null, javaEcj ? null , langAda ? false , langGo , langObjC @@ -29,7 +27,6 @@ }: assert !enablePlugin -> disableGdbPlugin; -assert langJava -> lib.versionOlder version "7"; # Note [Windows Exception Handling] # sjlj (short jump long jump) exception handling makes no sense on x86_64, @@ -165,7 +162,6 @@ let ++ lib.optional langCC "c++" ++ lib.optional langD "d" ++ lib.optional langFortran "fortran" - ++ lib.optional langJava "java" ++ lib.optional langAda "ada" ++ lib.optional langGo "go" ++ lib.optional langObjC "objc" @@ -197,11 +193,6 @@ let # Optional features ++ lib.optional (isl != null) "--with-isl=${isl}" - ++ lib.optionals (lib.versionOlder version "5" && cloog != null) [ - "--with-cloog=${cloog}" - "--disable-cloog-version-check" - "--enable-cloog-backend=isl" - ] # Ada options, gcc can't build the runtime library for a cross compiler ++ lib.optional langAda @@ -209,18 +200,6 @@ let then "--enable-libada" else "--disable-libada") - # Java options - ++ lib.optionals langJava [ - "--with-ecj-jar=${javaEcj}" - - # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See - # . - "--enable-java-home" - "--with-java-home=\${prefix}/lib/jvm/jre" - ] - ++ lib.optional javaAwtGtk "--enable-java-awt=gtk" - ++ lib.optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" - ++ import ../common/platform-flags.nix { inherit (stdenv) targetPlatform; inherit lib; } ++ lib.optionals (targetPlatform != hostPlatform) crossConfigureFlags ++ lib.optional disableBootstrap' "--disable-bootstrap" diff --git a/pkgs/development/compilers/gcc/common/dependencies.nix b/pkgs/development/compilers/gcc/common/dependencies.nix index d81a732b4189..f76b5fe601a9 100644 --- a/pkgs/development/compilers/gcc/common/dependencies.nix +++ b/pkgs/development/compilers/gcc/common/dependencies.nix @@ -6,7 +6,6 @@ , texinfo , which , gettext -, pkg-config ? null , gnused , patchelf , gmp @@ -14,21 +13,12 @@ , libmpc , libucontext ? null , libxcrypt ? null -, cloog ? null , darwin ? null , isl ? null , zlib ? null , gnat-bootstrap ? null , flex ? null -, boehmgc ? null -, zip ? null -, unzip ? null -, gtk2 ? null -, libart_lgpl ? null , perl ? null -, xlibs ? null -, langJava ? false -, javaAwtGtk ? false , langAda ? false , langGo ? false , langRust ? false @@ -52,7 +42,6 @@ in gettext ] ++ optionals (perl != null) [ perl ] - ++ optionals javaAwtGtk [ pkg-config ] ++ optionals (with stdenv.targetPlatform; isVc4 || isRedox && flex != null) [ flex ] ++ optionals langAda [ gnat-bootstrap ] ++ optionals langRust [ cargo ] @@ -83,15 +72,11 @@ in ++ [ targetPackages.stdenv.cc.bintools # For linking code at run-time ] - ++ optionals (lib.versionOlder version "5" && cloog != null) [ cloog ] ++ optionals (isl != null) [ isl ] ++ optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc zip unzip ] - ++ optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs) ++ optionals (langGo && stdenv.hostPlatform.isMusl) [ libucontext ] ++ optionals (lib.versionAtLeast version "14" && stdenv.hostPlatform.isDarwin) [ darwin.apple_sdk.frameworks.CoreServices ] ; - # threadsCross.package after gcc6 so i assume its okay for 4.8 and 4.9 too depsTargetTarget = optionals (!withoutTargetLibc && threadsCross != { } && threadsCross.package != null) [ threadsCross.package ]; } diff --git a/pkgs/development/compilers/gcc/common/meta.nix b/pkgs/development/compilers/gcc/common/meta.nix index a578705a66ec..4e864f95a611 100644 --- a/pkgs/development/compilers/gcc/common/meta.nix +++ b/pkgs/development/compilers/gcc/common/meta.nix @@ -23,6 +23,6 @@ in ''; platforms = platforms.unix; - maintainers = if versionOlder version "5" then [ maintainers.veprbl ] else teams.gcc.members; + maintainers = teams.gcc.members; } diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix index 75f59163bdac..9e1764eae916 100644 --- a/pkgs/development/compilers/gcc/common/pre-configure.nix +++ b/pkgs/development/compilers/gcc/common/pre-configure.nix @@ -4,7 +4,6 @@ , gnat-bootstrap ? null , langAda ? false , langFortran -, langJava ? false , langJit ? false , langGo , withoutTargetLibc @@ -13,18 +12,13 @@ , pkgsBuildTarget }: -assert langJava -> lib.versionOlder version "7"; -assert langAda -> gnat-bootstrap != null; let - needsLib - = (lib.versionOlder version "7" && (langJava || langGo)) - || (lib.versions.major version == "4" && lib.versions.minor version == "9" && targetPlatform.isDarwin); -in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' +assert langAda -> gnat-bootstrap != null; + +lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" -'' + lib.optionalString needsLib '' - export lib=$out; '' + lib.optionalString langAda '' export PATH=${gnat-bootstrap}/bin:$PATH '' diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index 9dda950dc125..f7e2e06bb79a 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -27,7 +27,6 @@ , threadsCross ? null # for MinGW , withoutTargetLibc ? false , gnused ? null -, cloog # unused; just for compat with gcc4, as we override the parameter on some places , buildPackages , pkgsBuildTarget , libxcrypt @@ -37,17 +36,6 @@ , majorMinorVersion , cctools , darwin - -# only for gcc<=6.x -, langJava ? false -, flex -, boehmgc ? null -, zip ? null, unzip ? null, pkg-config ? null -, gtk2 ? null, libart_lgpl ? null -, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null -, libXrender ? null, xorgproto ? null -, libXrandr ? null, libXi ? null -, x11Support ? langJava }: let @@ -80,8 +68,6 @@ let atLeast10 = versionAtLeast version "10"; atLeast9 = versionAtLeast version "9"; atLeast8 = versionAtLeast version "8"; - atLeast7 = versionAtLeast version "7"; - atLeast6 = versionAtLeast version "6"; is14 = majorVersion == "14"; is13 = majorVersion == "13"; is12 = majorVersion == "12"; @@ -90,7 +76,6 @@ let is9 = majorVersion == "9"; is8 = majorVersion == "8"; is7 = majorVersion == "7"; - is6 = majorVersion == "6"; disableBootstrap = atLeast11 && !stdenv.hostPlatform.isDarwin && (atLeast12 -> !profiledCompiler); @@ -104,12 +89,7 @@ let stageNameAddon = optionalString withoutTargetLibc "-nolibc"; crossNameAddon = optionalString (targetPlatform != hostPlatform) "${targetPlatform.config}${stageNameAddon}-"; - javaAwtGtk = langJava && x11Support; - xlibs = [ - libX11 libXt libSM libICE libXtst libXrender libXrandr libXi - xorgproto - ]; - callFile = callPackageWith ({ + callFile = callPackageWith { # lets inherit majorVersion @@ -128,7 +108,6 @@ let binutils buildPackages cargo - cloog withoutTargetLibc darwin disableBootstrap @@ -174,63 +153,18 @@ let texinfo threadsCross which - zip zlib ; - } // optionalAttrs (!atLeast7) { - inherit - boehmgc - flex - gnat-bootstrap - gtk2 - langAda - langJava - libICE - libSM - libX11 - libXi - libXrandr - libXrender - libXt - libXtst - libart_lgpl - pkg-config - unzip - x11Support - xorgproto - javaAwtGtk - xlibs - ; - javaEcj = fetchurl { - # The `$(top_srcdir)/ecj.jar' file is automatically picked up at - # `configure' time. - - # XXX: Eventually we might want to take it from upstream. - url = "ftp://sourceware.org/pub/java/ecj-4.3.jar"; - sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx"; - }; - - # Antlr (optional) allows the Java `gjdoc' tool to be built. We want a - # binary distribution here to allow the whole chain to be bootstrapped. - javaAntlr = fetchurl { - url = "https://www.antlr.org/download/antlr-4.4-complete.jar"; - sha256 = "02lda2imivsvsis8rnzmbrbp8rh1kb8vmq4i67pqhkwz7lf8y6dz"; - }; - }); + }; in -# We enable the isl cloog backend. -assert !atLeast6 -> (cloog != null -> isl != null); - -assert langJava -> !atLeast7 && zip != null && unzip != null && zlib != null && boehmgc != null && perl != null; # for `--enable-java-home' - # Make sure we get GNU sed. assert stdenv.buildPlatform.isDarwin -> gnused != null; # The go frontend is written in c++ assert langGo -> langCC; -assert (atLeast6 && !is7 && !is8) -> (langAda -> gnat-bootstrap != null); +assert (!is7 && !is8) -> (langAda -> gnat-bootstrap != null); # TODO: fixup D bootstapping, probably by using gdc11 (and maybe other changes). # error: GDC is required to build d @@ -243,40 +177,19 @@ assert threadsCross != {} -> stdenv.targetPlatform.isWindows; # If turned on, we can't provide reproducible builds anymore assert reproducibleBuild -> profiledCompiler == false; -# We need all these X libraries when building AWT with GTK. -assert !atLeast7 -> (x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == []); - pipe ((callFile ./common/builder.nix {}) ({ pname = "${crossNameAddon}${name}"; inherit version; - src = if is6 && stdenv.targetPlatform.isVc4 then fetchFromGitHub { - owner = "itszor"; - repo = "gcc-vc4"; - rev = "e90ff43f9671c760cf0d1dd62f569a0fb9bf8918"; - sha256 = "0gxf66hwqk26h8f853sybphqa5ca0cva2kmrw5jsiv6139g0qnp8"; - } else if is6 && stdenv.targetPlatform.isRedox then fetchFromGitHub { - owner = "redox-os"; - repo = "gcc"; - rev = "f360ac095028d286fc6dde4d02daed48f59813fa"; # `redox` branch - sha256 = "1an96h8l58pppyh3qqv90g8hgcfd9hj7igvh2gigmkxbrx94khfl"; - } else fetchurl { - url = if atLeast7 - then "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz" - else if atLeast6 - then "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.xz" - else "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2"; + src = fetchurl { + url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz"; ${if is10 || is11 || is13 then "hash" else "sha256"} = gccVersions.srcHashForVersion version; }; inherit patches; - outputs = - if atLeast7 - then [ "out" "man" "info" ] ++ optional (!langJit) "lib" - else if (langJava || langGo || (if atLeast6 then langJit else targetPlatform.isDarwin)) then ["out" "man" "info"] - else [ "out" "lib" "man" "info" ]; + outputs = [ "out" "man" "info" ] ++ optional (!langJit) "lib"; setOutputFlags = false; @@ -285,7 +198,7 @@ pipe ((callFile ./common/builder.nix {}) ({ hardeningDisable = [ "format" "pie" "stackclashprotection" ] ++ optionals (is11 && langAda) [ "fortify3" ]; - postPatch = optionalString atLeast7 '' + postPatch = '' configureScripts=$(find . -name configure) for configureScript in $configureScripts; do patchShebangs $configureScript @@ -293,7 +206,7 @@ pipe ((callFile ./common/builder.nix {}) ({ '' # This should kill all the stdinc frameworks that gcc and friends like to # insert into default search paths. - + optionalString (atLeast6 && hostPlatform.isDarwin) '' + + optionalString hostPlatform.isDarwin '' substituteInPlace gcc/config/darwin-c.c${optionalString atLeast12 "c"} \ --replace 'if (stdinc)' 'if (0)' @@ -314,18 +227,18 @@ pipe ((callFile ./common/builder.nix {}) ({ '' echo "fixing the {GLIBC,UCLIBC,MUSL}_DYNAMIC_LINKER macros..." for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h do - grep -q ${optionalString (!atLeast6) "LIBC"}_DYNAMIC_LINKER "$header" || continue + grep -q _DYNAMIC_LINKER "$header" || continue echo " fixing $header..." sed -i "$header" \ -e 's|define[[:blank:]]*\([UCG]\+\)LIBC_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define \1LIBC_DYNAMIC_LINKER\2 "${libc.out}\3"|g' \ -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g' done - '' + optionalString (atLeast6 && targetPlatform.libc == "musl") '' + '' + optionalString (targetPlatform.libc == "musl") '' sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR' '' ) )) - + optionalString (atLeast7 && targetPlatform.isAvr) ('' + + optionalString targetPlatform.isAvr ('' makeFlagsArray+=( '-s' # workaround for hitting hydra log limit 'LIMITS_H_TEST=false' @@ -382,12 +295,8 @@ pipe ((callFile ./common/builder.nix {}) ({ # Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find the # library headers and binaries, regarless of the language being compiled. # - # Note: When building the Java AWT GTK peer, the build system doesn't honor - # `--with-gmp' et al., e.g., when building - # `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just add - # them to $CPATH and $LIBRARY_PATH in this case. - # - # Likewise, the LTO code doesn't find zlib. + # The LTO code doesn't find zlib, so we just add it to $CPATH and + # $LIBRARY_PATH in this case. # # Cross-compiling, we need gcc not to read ./specs in order to build the g++ # compiler (after the specs for the cross-gcc are created). Having @@ -395,18 +304,14 @@ pipe ((callFile ./common/builder.nix {}) ({ CPATH = optionals (targetPlatform == hostPlatform) (makeSearchPathOutput "dev" "include" ([] ++ optional (zlib != null) zlib - ++ optional langJava boehmgc - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] )); LIBRARY_PATH = optionals (targetPlatform == hostPlatform) (makeLibraryPath ( optional (zlib != null) zlib - ++ optional langJava boehmgc - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] )); + NIX_LDFLAGS = optionalString hostPlatform.isSunOS "-lm"; + inherit (callFile ./common/extra-target-flags.nix { }) EXTRA_FLAGS_FOR_TARGET EXTRA_LDFLAGS_FOR_TARGET @@ -417,14 +322,10 @@ pipe ((callFile ./common/builder.nix {}) ({ + optionalString (stdenv.cc.isClang && targetPlatform != hostPlatform) " -Wno-register"; } // optionalAttrs (!is7 && !atLeast12 && stdenv.cc.isClang && targetPlatform != hostPlatform) { NIX_CFLAGS_COMPILE = "-Wno-register"; - } // optionalAttrs (!atLeast7) { - inherit langJava; - } // optionalAttrs atLeast6 { - NIX_LDFLAGS = optionalString hostPlatform.isSunOS "-lm"; }); passthru = { - inherit langC langCC langObjC langObjCpp langAda langFortran langGo langD langJava version; + inherit langC langCC langObjC langObjCpp langAda langFortran langGo langD version; isGNU = true; hardeningUnsupportedFlags = optional ( @@ -458,8 +359,7 @@ pipe ((callFile ./common/builder.nix {}) ({ badPlatforms = # avr-gcc8 is maintained for the `qmk` package if (is8 && targetPlatform.isAvr) then [] - else if !(is6) then [ "aarch64-darwin" ] - else platforms.darwin; + else [ "aarch64-darwin" ]; } // optionalAttrs is10 { badPlatforms = if targetPlatform != hostPlatform then [ "aarch64-darwin" ] else [ ]; }; @@ -472,11 +372,6 @@ pipe ((callFile ./common/builder.nix {}) ({ doCheck = false; # requires a lot of tools, causes a dependency cycle for stdenv } // optionalAttrs enableMultilib { dontMoveLib64 = true; -} // optionalAttrs (is6 && langJava) { - postFixup = '' - target="$(echo "$out/libexec/gcc"/*/*/ecj*)" - patchelf --set-rpath "$(patchelf --print-rpath "$target"):$out/lib" "$target" - ''; } )) ([ diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index db4a756733cb..b226975ef034 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -32,8 +32,6 @@ let atLeast10 = lib.versionAtLeast version "10"; atLeast9 = lib.versionAtLeast version "9"; atLeast8 = lib.versionAtLeast version "8"; - atLeast7 = lib.versionAtLeast version "7"; - atLeast6 = lib.versionAtLeast version "6"; is14 = majorVersion == "14"; is13 = majorVersion == "13"; is12 = majorVersion == "12"; @@ -42,7 +40,6 @@ let is9 = majorVersion == "9"; is8 = majorVersion == "8"; is7 = majorVersion == "7"; - is6 = majorVersion == "6"; inherit (lib) optionals optional; in @@ -57,7 +54,7 @@ in ## 1. Patches relevant to gcc>=12 on every platform #################################### [] -++ optional (atLeast6 && !atLeast12) ./fix-bug-80431.patch +++ optional (!atLeast12) ./fix-bug-80431.patch ++ optional (targetPlatform != hostPlatform) ./libstdc++-target.patch ++ optionals (noSysDirs) ( [(if atLeast12 then ./gcc-12-no-sys-dirs.patch else ./no-sys-dirs.patch)] ++ @@ -72,7 +69,7 @@ in ) ++ optional (atLeast12 && langAda) ./gnat-cflags-11.patch ++ optional langFortran (if atLeast12 then ./gcc-12-gfortran-driving.patch else ./gfortran-driving.patch) -++ optional atLeast7 ./ppc-musl.patch +++ [ ./ppc-musl.patch ] ++ optional (atLeast9 && langD) ./libphobos.patch @@ -177,14 +174,13 @@ in "9" = [ ../patches/9/AvailabilityInternal.h-fixincludes.patch ]; "8" = [ ../patches/8/AvailabilityInternal.h-fixincludes.patch ]; "7" = [ ../patches/7/AvailabilityInternal.h-fixincludes.patch ]; - "6" = [ ../patches/6/AvailabilityInternal.h-fixincludes.patch ]; }.${majorVersion} or []) ## Windows # Obtain latest patch with ../update-mcfgthread-patches.sh -++ optional (atLeast6 && !atLeast13 && !withoutTargetLibc && targetPlatform.isMinGW && threadsCross.model == "mcf") +++ optional (!atLeast13 && !withoutTargetLibc && targetPlatform.isMinGW && threadsCross.model == "mcf") (./. + "/${majorVersion}/Added-mcf-thread-model-support-from-mcfgthread.patch") @@ -228,7 +224,7 @@ in ## gcc 9.0 and older ############################################################################## ++ optional (majorVersion == "9") ./9/fix-struct-redefinition-on-glibc-2.36.patch -++ optional (atLeast7 && !atLeast10 && targetPlatform.isNetBSD) ./libstdc++-netbsd-ctypes.patch +++ 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. @@ -266,35 +262,8 @@ in (./. + "/${majorVersion}/gcc8-asan-glibc-2.34.patch") (./. + "/${majorVersion}/0001-Fix-build-for-glibc-2.31.patch") ] -++ optional ((is6 || is7) && targetPlatform.libc == "musl" && targetPlatform.isx86_32) (fetchpatch { +++ 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 ((is6 || is7 || is8) && !atLeast9 && targetPlatform.libc == "musl") ./libgomp-dont-force-initial-exec.patch - - - -## gcc 6.0 and older ############################################################################## - -++ optional (is6 && langGo) ./gogcc-workaround-glibc-2.36.patch -++ optional is6 ./9/fix-struct-redefinition-on-glibc-2.36.patch -++ optional (is6 && !stdenv.targetPlatform.isRedox) ./use-source-date-epoch.patch -++ optional (is6 && !stdenv.targetPlatform.isRedox) ./6/0001-Fix-build-for-glibc-2.31.patch -++ optionals (is6 && langAda) [ - ./gnat-cflags.patch - ./6/gnat-glibc234.patch -] - -# The clang-based assembler used in darwin.binutils (LLVM >11) does not support piping input. -# Fortunately, it does not exhibit the problem GCC has with the cctools assembler. -# This patch can be dropped should darwin.binutils ever implement support. -++ optional (!atLeast7 && hostPlatform.isDarwin && lib.versionAtLeast (lib.getVersion stdenv.cc) "12") ./4.9/darwin-clang-as.patch - -# Building libstdc++ with flat namespaces results in trying to link CoreFoundation, which -# defaults to the impure, system location and causes the build to fail. -++ optional (is6 && hostPlatform.isDarwin) ./6/libstdc++-disable-flat_namespace.patch - -## gcc 5.0 and older ############################################################################## - -++ optional (!atLeast6) ./parallel-bconfig.patch - +++ optional ((is7 || is8) && !atLeast9 && targetPlatform.libc == "musl") ./libgomp-dont-force-initial-exec.patch