3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #236598 from trofi/gcc-13-mcfgthreads

pkgsCross.mingwW64.windows.mcfgthreads: add gcc13 compatible version
This commit is contained in:
Sergei Trofimovich 2023-06-11 18:04:16 +01:00 committed by GitHub
commit b3ab40b9ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 54 additions and 20 deletions

View file

@ -27,8 +27,8 @@ stdenvNoCC.mkDerivation (finalAttrs:
--subst-var-by bash ${bash} \
--subst-var-by dxvk32 ${dxvk32} \
--subst-var-by dxvk64 ${dxvk64} \
--subst-var-by mcfgthreads32 "${pkgsCross.mingw32.windows.mcfgthreads}" \
--subst-var-by mcfgthreads64 "${pkgsCross.mingwW64.windows.mcfgthreads}"
--subst-var-by mcfgthreads32 "${pkgsCross.mingw32.windows.mcfgthreads_pre_gcc_13}" \
--subst-var-by mcfgthreads64 "${pkgsCross.mingwW64.windows.mcfgthreads_pre_gcc_13}"
chmod a+x $out/bin/setup_dxvk.sh
declare -A dxvks=( [x32]=${dxvk32} [x64]=${dxvk64} )
for arch in "''${!dxvks[@]}"; do

View file

@ -33,6 +33,10 @@ lib.makeScope newScope (self: with self; {
stdenv = crossThreadsStdenv;
};
mcfgthreads_pre_gcc_13 = callPackage ./mcfgthreads/pre_gcc_13.nix {
stdenv = crossThreadsStdenv;
};
mcfgthreads = callPackage ./mcfgthreads {
stdenv = crossThreadsStdenv;
};

View file

@ -2,22 +2,17 @@
stdenv.mkDerivation {
pname = "mcfgthreads";
version = "git";
version = "unstable-2023-06-06";
src = fetchFromGitHub {
owner = "lhmouse";
repo = "mcfgthread";
rev = "c446cf4fcdc262fc899a188a4bb7136284c34222";
sha256 = "1ib90lrd4dz8irq4yvzwhxqa86i5vxl2q2z3z04sf1i8hw427p2f";
rev = "f0a335ce926906d634c787249a89220045bf0f7e";
hash = "sha256-PLGIyoLdWgWvkHgRe0vHLIvnCxFpmHtbjS8xRhNM9Xw=";
};
outputs = [ "out" "dev" ];
# Don't want prebuilt binaries sneaking in.
postUnpack = ''
rm -r "$sourceRoot/debug" "$sourceRoot/release"
'';
nativeBuildInputs = [
autoreconfHook
];

View file

@ -0,0 +1,24 @@
{ stdenv, fetchFromGitHub, autoreconfHook }:
stdenv.mkDerivation {
pname = "mcfgthreads";
version = "git"; # unstable-2021-03-12, not in any branch
src = fetchFromGitHub {
owner = "lhmouse";
repo = "mcfgthread";
rev = "c446cf4fcdc262fc899a188a4bb7136284c34222";
sha256 = "1ib90lrd4dz8irq4yvzwhxqa86i5vxl2q2z3z04sf1i8hw427p2f";
};
outputs = [ "out" "dev" ];
# Don't want prebuilt binaries sneaking in.
postUnpack = ''
rm -r "$sourceRoot/debug" "$sourceRoot/release"
'';
nativeBuildInputs = [
autoreconfHook
];
}

View file

@ -15114,7 +15114,7 @@ with pkgs;
profiledCompiler = false;
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { };
isl = if !stdenv.isDarwin then isl_0_14 else null;
cloog = if !stdenv.isDarwin then cloog else null;
@ -15128,7 +15128,7 @@ with pkgs;
profiledCompiler = false;
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { };
isl = if !stdenv.isDarwin then isl_0_11 else null;
@ -15145,7 +15145,7 @@ with pkgs;
profiledCompiler = false;
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { };
# gcc 10 is too strict to cross compile gcc <= 8
stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv;
@ -15164,7 +15164,7 @@ with pkgs;
profiledCompiler = false;
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { };
# gcc 10 is too strict to cross compile gcc <= 8
stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv;
@ -15179,7 +15179,7 @@ with pkgs;
profiledCompiler = false;
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { };
# gcc 10 is too strict to cross compile gcc <= 8
stdenv = if (stdenv.targetPlatform != stdenv.buildPlatform) && stdenv.cc.isGNU then gcc7Stdenv else stdenv;
@ -15194,7 +15194,7 @@ with pkgs;
profiledCompiler = false;
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { };
isl = if !stdenv.isDarwin then isl_0_20 else null;
}));
@ -15206,7 +15206,7 @@ with pkgs;
profiledCompiler = false;
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { };
isl = if !stdenv.isDarwin then isl_0_20 else null;
}));
@ -15218,7 +15218,7 @@ with pkgs;
profiledCompiler = false;
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { };
isl = if !stdenv.isDarwin then isl_0_20 else null;
}));
@ -15230,7 +15230,7 @@ with pkgs;
profiledCompiler = false;
libcCross = if stdenv.targetPlatform != stdenv.buildPlatform then libcCross else null;
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross else { };
threadsCross = if stdenv.targetPlatform != stdenv.buildPlatform then threadsCross_pre_gcc_13 else { };
isl = if !stdenv.isDarwin then isl_0_20 else null;
}));
@ -16841,7 +16841,10 @@ with pkgs;
# want the C++ library to be explicitly chosen by the caller, and null by
# default.
libcxx ? null
, extraPackages ? lib.optional (cc.isGNU or false && stdenv.targetPlatform.isMinGW) threadsCross.package
, extraPackages ? lib.optional (cc.isGNU or false && stdenv.targetPlatform.isMinGW)
(if lib.versionAtLeast cc.version "13"
then threadsCross.package
else threadsCross_pre_gcc_13.package)
, nixSupport ? {}
, ...
} @ extraArgs:
@ -20814,6 +20817,14 @@ with pkgs;
libcCross = assert stdenv.targetPlatform != stdenv.buildPlatform; libcCrossChooser stdenv.targetPlatform.libc;
threadsCross_pre_gcc_13 = if stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false)
then {
# other possible values: win32 or posix
model = "mcf";
# For win32 or posix set this to null
package = targetPackages.windows.mcfgthreads_pre_gcc_13 or windows.mcfgthreads_pre_gcc_13;
} else { };
threadsCross = if stdenv.targetPlatform.isMinGW && !(stdenv.targetPlatform.useLLVM or false)
then {
# other possible values: win32 or posix