|
|
|
@ -5462,7 +5462,9 @@ with pkgs; |
|
|
|
|
|
|
|
|
|
clang-sierraHack = clang.override { |
|
|
|
|
name = "clang-wrapper-with-reexport-hack"; |
|
|
|
|
useMacosReexportHack = true; |
|
|
|
|
bintools = clang.bintools.override { |
|
|
|
|
useMacosReexportHack = true; |
|
|
|
|
}; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
clang_5 = llvmPackages_5.clang; |
|
|
|
@ -5491,7 +5493,7 @@ with pkgs; |
|
|
|
|
cc = build; |
|
|
|
|
isClang = true; |
|
|
|
|
inherit stdenvNoCC; |
|
|
|
|
libc = glibc; |
|
|
|
|
inherit (targetPackages.stdenv.cc) bintools libc; |
|
|
|
|
extraPackages = [ libcxx libcxxabi ]; |
|
|
|
|
nativeTools = false; |
|
|
|
|
nativeLibc = false; |
|
|
|
@ -5561,18 +5563,23 @@ with pkgs; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
wrapCCMulti = cc: |
|
|
|
|
if system == "x86_64-linux" then lowPrio (wrapCCWith { |
|
|
|
|
if system == "x86_64-linux" then let |
|
|
|
|
# Binutils with glibc multi |
|
|
|
|
bintools = cc.bintools.override { |
|
|
|
|
libc = glibc_multi; |
|
|
|
|
}; |
|
|
|
|
in lowPrio (wrapCCWith { |
|
|
|
|
cc = cc.cc.override { |
|
|
|
|
stdenv = overrideCC stdenv (wrapCCWith { |
|
|
|
|
cc = cc.cc; |
|
|
|
|
inherit bintools; |
|
|
|
|
libc = glibc_multi; |
|
|
|
|
}); |
|
|
|
|
profiledCompiler = false; |
|
|
|
|
enableMultilib = true; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
libc = glibc_multi; |
|
|
|
|
|
|
|
|
|
inherit bintools; |
|
|
|
|
extraBuildCommands = '' |
|
|
|
|
echo "dontMoveLib64=1" >> $out/nix-support/setup-hook |
|
|
|
|
''; |
|
|
|
@ -5605,6 +5612,10 @@ with pkgs; |
|
|
|
|
if targetPlatform.libc == "msvcrt" then targetPackages.windows.mingw_w64_headers |
|
|
|
|
else if targetPlatform.libc == "libSystem" then darwin.xcode |
|
|
|
|
else null; |
|
|
|
|
binutils1 = wrapBintoolsWith { |
|
|
|
|
bintools = binutils-unwrapped; |
|
|
|
|
libc = libcCross1; |
|
|
|
|
}; |
|
|
|
|
in wrapCCWith { |
|
|
|
|
name = "gcc-cross-wrapper"; |
|
|
|
|
cc = gccFun { |
|
|
|
@ -5618,9 +5629,10 @@ with pkgs; |
|
|
|
|
crossStageStatic = true; |
|
|
|
|
langCC = false; |
|
|
|
|
libcCross = libcCross1; |
|
|
|
|
targetPackages.stdenv.cc.bintools = binutils; |
|
|
|
|
targetPackages.stdenv.cc.bintools = binutils1; |
|
|
|
|
enableShared = false; |
|
|
|
|
}; |
|
|
|
|
bintools = binutils1; |
|
|
|
|
libc = libcCross1; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -5629,6 +5641,7 @@ with pkgs; |
|
|
|
|
name = "gcc-cross-wrapper"; |
|
|
|
|
cc = gccCrossStageStatic.gcc; |
|
|
|
|
libc = windows.mingw_headers2; |
|
|
|
|
inherit binutils; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 { |
|
|
|
@ -6394,7 +6407,8 @@ with pkgs; |
|
|
|
|
|
|
|
|
|
wla-dx = callPackage ../development/compilers/wla-dx { }; |
|
|
|
|
|
|
|
|
|
wrapCCWith = { name ? "", cc, libc, extraBuildCommands ? "" }: ccWrapperFun rec { |
|
|
|
|
wrapCCWith = { name ? "", cc, bintools, libc, extraBuildCommands ? "" }: |
|
|
|
|
ccWrapperFun rec { |
|
|
|
|
nativeTools = targetPlatform == hostPlatform && stdenv.cc.nativeTools or false; |
|
|
|
|
nativeLibc = targetPlatform == hostPlatform && stdenv.cc.nativeLibc or false; |
|
|
|
|
nativePrefix = stdenv.cc.nativePrefix or ""; |
|
|
|
@ -6403,14 +6417,20 @@ with pkgs; |
|
|
|
|
isGNU = cc.isGNU or false; |
|
|
|
|
isClang = cc.isClang or false; |
|
|
|
|
|
|
|
|
|
inherit name cc libc extraBuildCommands; |
|
|
|
|
inherit name cc bintools libc extraBuildCommands; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
ccWrapperFun = callPackage ../build-support/cc-wrapper; |
|
|
|
|
bintoolsWrapperFun = callPackage ../build-support/bintools-wrapper; |
|
|
|
|
|
|
|
|
|
wrapCC = cc: wrapCCWith { |
|
|
|
|
name = lib.optionalString (targetPlatform != hostPlatform) "gcc-cross-wrapper"; |
|
|
|
|
inherit cc; |
|
|
|
|
# This should be the only bintools runtime dep with this sort of logic. The |
|
|
|
|
# Others should instead delegate to the next stage's choice with |
|
|
|
|
# `targetPackages.stdenv.cc.bintools`. This one is different just to |
|
|
|
|
# provide the default choice, avoiding infinite recursion. |
|
|
|
|
bintools = if targetPlatform.isDarwin then darwin.binutils else binutils; |
|
|
|
|
libc = if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc; |
|
|
|
|
}; |
|
|
|
|
# legacy version, used for gnat bootstrapping |
|
|
|
@ -6422,6 +6442,17 @@ with pkgs; |
|
|
|
|
libc = glibc; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
wrapBintoolsWith = { bintools, libc }: bintoolsWrapperFun { |
|
|
|
|
nativeTools = targetPlatform == hostPlatform && stdenv.cc.nativeTools or false; |
|
|
|
|
nativeLibc = targetPlatform == hostPlatform && stdenv.cc.nativeLibc or false; |
|
|
|
|
nativePrefix = stdenv.cc.nativePrefix or ""; |
|
|
|
|
|
|
|
|
|
noLibc = (libc == null); |
|
|
|
|
|
|
|
|
|
inherit bintools libc; |
|
|
|
|
extraBuildCommands = ""; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
# prolog |
|
|
|
|
yap = callPackage ../development/compilers/yap { }; |
|
|
|
|
|
|
|
|
@ -7003,13 +7034,19 @@ with pkgs; |
|
|
|
|
then darwin.binutils |
|
|
|
|
else binutils-raw; |
|
|
|
|
|
|
|
|
|
binutils-raw = callPackage ../development/tools/misc/binutils { |
|
|
|
|
binutils-unwrapped = callPackage ../development/tools/misc/binutils { |
|
|
|
|
# FHS sys dirs presumably only have stuff for the build platform |
|
|
|
|
noSysDirs = (targetPlatform != buildPlatform) || noSysDirs; |
|
|
|
|
}; |
|
|
|
|
binutils-raw = wrapBintoolsWith { |
|
|
|
|
libc = if targetPlatform != hostPlatform then libcCross else stdenv.cc.libc; |
|
|
|
|
bintools = binutils-unwrapped; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
binutils_nogold = lowPrio (binutils-raw.override { |
|
|
|
|
gold = false; |
|
|
|
|
bintools = binutils-raw.bintools.override { |
|
|
|
|
gold = false; |
|
|
|
|
}; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
bison2 = callPackage ../development/tools/parsing/bison/2.x.nix { }; |
|
|
|
|