all-packages: get rid of wrapCCCross
It's unneeded
This commit is contained in:
parent
e19bb868dc
commit
1fc12241ed
@ -4,10 +4,14 @@ let
|
|||||||
|
|
||||||
self = {
|
self = {
|
||||||
emscriptenfastcomp-unwrapped = callPackage ./emscripten-fastcomp.nix {};
|
emscriptenfastcomp-unwrapped = callPackage ./emscripten-fastcomp.nix {};
|
||||||
emscriptenfastcomp-wrapped = wrapCCWith stdenv.cc.libc ''
|
emscriptenfastcomp-wrapped = wrapCCWith {
|
||||||
# hardening flags break WASM support
|
cc = self.emscriptenfastcomp-unwrapped;
|
||||||
cat > $out/nix-support/add-hardening.sh
|
libc = stdenv.cc.libc;
|
||||||
'' self.emscriptenfastcomp-unwrapped;
|
extraBuildCommands = ''
|
||||||
|
# hardening flags break WASM support
|
||||||
|
cat > $out/nix-support/add-hardening.sh
|
||||||
|
'';
|
||||||
|
};
|
||||||
emscriptenfastcomp = symlinkJoin {
|
emscriptenfastcomp = symlinkJoin {
|
||||||
name = "emscriptenfastcomp";
|
name = "emscriptenfastcomp";
|
||||||
paths = [ self.emscriptenfastcomp-wrapped self.emscriptenfastcomp-unwrapped ];
|
paths = [ self.emscriptenfastcomp-wrapped self.emscriptenfastcomp-unwrapped ];
|
||||||
|
@ -5388,17 +5388,22 @@ with pkgs;
|
|||||||
};
|
};
|
||||||
|
|
||||||
wrapCCMulti = cc:
|
wrapCCMulti = cc:
|
||||||
if system == "x86_64-linux" then lowPrio (
|
if system == "x86_64-linux" then lowPrio (wrapCCWith {
|
||||||
let
|
cc = cc.cc.override {
|
||||||
extraBuildCommands = ''
|
stdenv = overrideCC stdenv (wrapCCWith {
|
||||||
echo "dontMoveLib64=1" >> $out/nix-support/setup-hook
|
cc = cc.cc;
|
||||||
'';
|
libc = glibc_multi;
|
||||||
in wrapCCWith glibc_multi extraBuildCommands (cc.cc.override {
|
});
|
||||||
stdenv = overrideCC stdenv (wrapCCWith glibc_multi "" cc.cc);
|
|
||||||
profiledCompiler = false;
|
profiledCompiler = false;
|
||||||
enableMultilib = true;
|
enableMultilib = true;
|
||||||
}))
|
};
|
||||||
else throw "Multilib ${cc.name} not supported on ‘${system}’";
|
|
||||||
|
libc = glibc_multi;
|
||||||
|
|
||||||
|
extraBuildCommands = ''
|
||||||
|
echo "dontMoveLib64=1" >> $out/nix-support/setup-hook
|
||||||
|
'';
|
||||||
|
}) else throw "Multilib ${cc.name} not supported on ‘${system}’";
|
||||||
|
|
||||||
gcc_multi = wrapCCMulti gcc;
|
gcc_multi = wrapCCMulti gcc;
|
||||||
|
|
||||||
@ -5425,7 +5430,8 @@ with pkgs;
|
|||||||
if targetPlatform.libc == "msvcrt" then __targetPackages.windows.mingw_w64_headers
|
if targetPlatform.libc == "msvcrt" then __targetPackages.windows.mingw_w64_headers
|
||||||
else if targetPlatform.libc == "libSystem" then darwin.xcode
|
else if targetPlatform.libc == "libSystem" then darwin.xcode
|
||||||
else null;
|
else null;
|
||||||
in wrapCCCross {
|
in wrapCCWith {
|
||||||
|
name = "gcc-cross-wrapper";
|
||||||
cc = gcc.cc.override {
|
cc = gcc.cc.override {
|
||||||
crossStageStatic = true;
|
crossStageStatic = true;
|
||||||
langCC = false;
|
langCC = false;
|
||||||
@ -5437,12 +5443,14 @@ with pkgs;
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Only needed for mingw builds
|
# Only needed for mingw builds
|
||||||
gccCrossMingw2 = assert targetPlatform != buildPlatform; wrapCCCross {
|
gccCrossMingw2 = assert targetPlatform != buildPlatform; wrapCCWith {
|
||||||
|
name = "gcc-cross-wrapper";
|
||||||
cc = gccCrossStageStatic.gcc;
|
cc = gccCrossStageStatic.gcc;
|
||||||
libc = windows.mingw_headers2;
|
libc = windows.mingw_headers2;
|
||||||
};
|
};
|
||||||
|
|
||||||
gccCrossStageFinal = assert targetPlatform != buildPlatform; wrapCCCross {
|
gccCrossStageFinal = assert targetPlatform != buildPlatform; wrapCCWith {
|
||||||
|
name = "gcc-cross-wrapper";
|
||||||
cc = gcc.cc.override {
|
cc = gcc.cc.override {
|
||||||
crossStageStatic = false;
|
crossStageStatic = false;
|
||||||
};
|
};
|
||||||
@ -6198,19 +6206,24 @@ with pkgs;
|
|||||||
|
|
||||||
wla-dx = callPackage ../development/compilers/wla-dx { };
|
wla-dx = callPackage ../development/compilers/wla-dx { };
|
||||||
|
|
||||||
wrapCCWith = libc: extraBuildCommands: baseCC: ccWrapperFun {
|
wrapCCWith = { name ? "", cc, libc, extraBuildCommands ? "" }: ccWrapperFun {
|
||||||
nativeTools = stdenv.cc.nativeTools or false;
|
nativeTools = targetPlatform == hostPlatform && stdenv.cc.nativeTools or false;
|
||||||
nativeLibc = stdenv.cc.nativeLibc or false;
|
nativeLibc = targetPlatform == hostPlatform && stdenv.cc.nativeLibc or false;
|
||||||
nativePrefix = stdenv.cc.nativePrefix or "";
|
nativePrefix = stdenv.cc.nativePrefix or "";
|
||||||
cc = baseCC;
|
noLibc = (libc == null);
|
||||||
isGNU = baseCC.isGNU or false;
|
|
||||||
isClang = baseCC.isClang or false;
|
isGNU = cc.isGNU or false;
|
||||||
inherit libc extraBuildCommands;
|
isClang = cc.isClang or false;
|
||||||
|
|
||||||
|
inherit name cc libc extraBuildCommands;
|
||||||
};
|
};
|
||||||
|
|
||||||
ccWrapperFun = callPackage ../build-support/cc-wrapper;
|
ccWrapperFun = callPackage ../build-support/cc-wrapper;
|
||||||
|
|
||||||
wrapCC = wrapCCWith stdenv.cc.libc "";
|
wrapCC = cc: wrapCCWith {
|
||||||
|
inherit cc;
|
||||||
|
inherit (stdenv.cc) libc;
|
||||||
|
};
|
||||||
# legacy version, used for gnat bootstrapping
|
# legacy version, used for gnat bootstrapping
|
||||||
wrapGCC-old = baseGCC: callPackage ../build-support/gcc-wrapper-old {
|
wrapGCC-old = baseGCC: callPackage ../build-support/gcc-wrapper-old {
|
||||||
nativeTools = stdenv.cc.nativeTools or false;
|
nativeTools = stdenv.cc.nativeTools or false;
|
||||||
@ -6220,20 +6233,6 @@ with pkgs;
|
|||||||
libc = glibc;
|
libc = glibc;
|
||||||
};
|
};
|
||||||
|
|
||||||
wrapCCCross =
|
|
||||||
{cc, libc, binutils, name ? "gcc-cross-wrapper"}:
|
|
||||||
|
|
||||||
ccWrapperFun {
|
|
||||||
nativeTools = false;
|
|
||||||
nativeLibc = false;
|
|
||||||
noLibc = (libc == null);
|
|
||||||
|
|
||||||
isGNU = cc.isGNU or false;
|
|
||||||
isClang = cc.isClang or false;
|
|
||||||
|
|
||||||
inherit cc binutils libc name;
|
|
||||||
};
|
|
||||||
|
|
||||||
# prolog
|
# prolog
|
||||||
yap = callPackage ../development/compilers/yap { };
|
yap = callPackage ../development/compilers/yap { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user