Commit de4388c6 authored by Emily's avatar Emily
Browse files

{cc-wrapper,gcc}: drop unused logic and patches

parent a42d18b4
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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
         {
+3 −10
Original line number Diff line number Diff line
@@ -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;
      })));
+0 −1
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@ let
    version:
    stdenv.buildPlatform.isDarwin
    && stdenv.buildPlatform.isx86_64
    && lib.versionAtLeast version "6"
    && lib.versionOlder version "10";
in

+0 −21
Original line number Diff line number Diff line
@@ -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
      # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>.
      "--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"
+0 −15
Original line number Diff line number Diff line
@@ -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 ];
}
Loading