Unverified Commit b60aa0e0 authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

Merge pull request #199883 from Mic92/mingw

cross/mingw: make threading library configureable
parents eaae0777 890d0576
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ assert langGo -> langCC;
assert langAda -> gnatboot != null;

# threadsCross is just for MinGW
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
assert threadsCross != {} -> stdenv.targetPlatform.isWindows;

# profiledCompiler builds inject non-determinism in one of the compilation stages.
# If turned on, we can't provide reproducible builds anymore
@@ -65,7 +65,7 @@ let majorVersion = "10";
      ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch

      # Obtain latest patch with ../update-mcfgthread-patches.sh
      ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch
      ++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch

      ++ optional (buildPlatform.system == "aarch64-darwin" && targetPlatform != buildPlatform) (fetchpatch {
        url = "https://raw.githubusercontent.com/richard-vd/musl-cross-make/5e9e87f06fc3220e102c29d3413fbbffa456fcd6/patches/gcc-${version}/0008-darwin-aarch64-self-host-driver.patch";
@@ -179,7 +179,7 @@ stdenv.mkDerivation ({
    ++ (optional (zlib != null) zlib)
    ;

  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
  depsTargetTarget = optional (!crossStageStatic && threadsCross != {} && threadsCross.package != null) threadsCross.package;

  NIX_LDFLAGS = lib.optionalString  hostPlatform.isSunOS "-lm -ldl";

@@ -199,7 +199,7 @@ stdenv.mkDerivation ({
      lib
      stdenv
      targetPackages
      crossStageStatic libcCross
      crossStageStatic libcCross threadsCross
      version

      gmp mpfr libmpc isl
+4 −4
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ assert langGo -> langCC;
assert langAda -> gnatboot != null;

# threadsCross is just for MinGW
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
assert threadsCross != {} -> stdenv.targetPlatform.isWindows;

# profiledCompiler builds inject non-determinism in one of the compilation stages.
# If turned on, we can't provide reproducible builds anymore
@@ -76,7 +76,7 @@ let majorVersion = "11";
      })

      # Obtain latest patch with ../update-mcfgthread-patches.sh
      ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch;
      ++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch;

    /* Cross-gcc settings (build == host != target) */
    crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
@@ -187,7 +187,7 @@ stdenv.mkDerivation ({
    ++ (optional (zlib != null) zlib)
    ;

  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
  depsTargetTarget = optional (!crossStageStatic && threadsCross != {} && threadsCross.package != null) threadsCross.package;

  NIX_LDFLAGS = lib.optionalString  hostPlatform.isSunOS "-lm -ldl";

@@ -207,7 +207,7 @@ stdenv.mkDerivation ({
      lib
      stdenv
      targetPackages
      crossStageStatic libcCross
      crossStageStatic libcCross threadsCross
      version

      gmp mpfr libmpc isl
+4 −4
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ assert langAda -> gnatboot != null;
assert !langD;

# threadsCross is just for MinGW
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
assert threadsCross != {} -> stdenv.targetPlatform.isWindows;

# profiledCompiler builds inject non-determinism in one of the compilation stages.
# If turned on, we can't provide reproducible builds anymore
@@ -71,7 +71,7 @@ let majorVersion = "12";
      ++ optional langD ../libphobos.patch

      # Obtain latest patch with ../update-mcfgthread-patches.sh
      ++ optional (!crossStageStatic && targetPlatform.isMinGW) ./Added-mcf-thread-model-support-from-mcfgthread.patch;
      ++ optional (!crossStageStatic && targetPlatform.isMinGW && threadsCross.model == "mcf") ./Added-mcf-thread-model-support-from-mcfgthread.patch;

    /* Cross-gcc settings (build == host != target) */
    crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt";
@@ -180,7 +180,7 @@ stdenv.mkDerivation ({
    ++ (optional (zlib != null) zlib)
    ;

  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
  depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross.package;

  NIX_LDFLAGS = lib.optionalString  hostPlatform.isSunOS "-lm -ldl";

@@ -201,7 +201,7 @@ stdenv.mkDerivation ({
      lib
      stdenv
      targetPackages
      crossStageStatic libcCross
      crossStageStatic libcCross threadsCross
      version

      gmp mpfr libmpc isl
+3 −3
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ assert stdenv.buildPlatform.isDarwin -> gnused != null;
assert langGo -> langCC;

# threadsCross is just for MinGW
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
assert threadsCross != {} -> stdenv.targetPlatform.isWindows;

# profiledCompiler builds inject non-determinism in one of the compilation stages.
# If turned on, we can't provide reproducible builds anymore
@@ -188,7 +188,7 @@ stdenv.mkDerivation ({
    ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
    ;

  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
  depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross;

  preConfigure = import ../common/pre-configure.nix {
    inherit lib;
@@ -204,7 +204,7 @@ stdenv.mkDerivation ({
      lib
      stdenv
      targetPackages
      crossStageStatic libcCross
      crossStageStatic libcCross threadsCross
      version

      gmp mpfr libmpc isl
+3 −3
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ assert stdenv.buildPlatform.isDarwin -> gnused != null;
assert langGo -> langCC;

# threadsCross is just for MinGW
assert threadsCross != null -> stdenv.targetPlatform.isWindows;
assert threadsCross != {} -> stdenv.targetPlatform.isWindows;

# profiledCompiler builds inject non-determinism in one of the compilation stages.
# If turned on, we can't provide reproducible builds anymore
@@ -208,7 +208,7 @@ stdenv.mkDerivation ({
    ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
    ;

  depsTargetTarget = optional (!crossStageStatic && threadsCross != null) threadsCross;
  depsTargetTarget = optional (!crossStageStatic && threadsCross != {}) threadsCross;

  preConfigure = import ../common/pre-configure.nix {
    inherit lib;
@@ -224,7 +224,7 @@ stdenv.mkDerivation ({
      lib
      stdenv
      targetPackages
      crossStageStatic libcCross
      crossStageStatic libcCross threadsCross
      version

      gmp mpfr libmpc isl
Loading