gcc: Fix after merge
- NIX_CC_CROSS is now completely gone! - NIX_CC is defined reliably, so no manual def needed - stdenv.ccCross -> stdenv.cc, also removing need for "or" fallback
This commit is contained in:
parent
974b9201a5
commit
51948eab94
@ -25,6 +25,7 @@
|
|||||||
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
, libpthread ? null, libpthreadCross ? null # required for GNU/Hurd
|
||||||
, stripped ? true
|
, stripped ? true
|
||||||
, buildPlatform, hostPlatform, targetPlatform
|
, buildPlatform, hostPlatform, targetPlatform
|
||||||
|
, buildPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert langJava -> zip != null && unzip != null
|
assert langJava -> zip != null && unzip != null
|
||||||
@ -275,7 +276,7 @@ stdenv.mkDerivation ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
${optionalString (!(crossMingw && crossStageStatic))
|
${optionalString (!(crossMingw && crossStageStatic))
|
||||||
"--with-native-system-header-dir=${getDev (stdenv.ccCross or stdenv.cc).libc}/include"}
|
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
|
||||||
${ # Trick that should be taken out once we have a mips64el-linux not loongson2f
|
${ # Trick that should be taken out once we have a mips64el-linux not loongson2f
|
||||||
if targetPlatform == hostPlatform && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""}
|
if targetPlatform == hostPlatform && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""}
|
||||||
${if langAda then " --enable-libada" else ""}
|
${if langAda then " --enable-libada" else ""}
|
||||||
@ -331,8 +332,7 @@ stdenv.mkDerivation ({
|
|||||||
dontStrip = true;
|
dontStrip = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_BUILD_CC = stdenv.cc;
|
NIX_BUILD_CC = buildPackages.stdenv.cc;
|
||||||
NIX_CC_CROSS = stdenv.ccCross or null;
|
|
||||||
|
|
||||||
# Needed for the cross compilation to work
|
# Needed for the cross compilation to work
|
||||||
AR = "ar";
|
AR = "ar";
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
, gnused ? null
|
, gnused ? null
|
||||||
, darwin ? null
|
, darwin ? null
|
||||||
, buildPlatform, hostPlatform, targetPlatform
|
, buildPlatform, hostPlatform, targetPlatform
|
||||||
|
, buildPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert langJava -> zip != null && unzip != null
|
assert langJava -> zip != null && unzip != null
|
||||||
@ -339,7 +340,7 @@ stdenv.mkDerivation ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
${optionalString (!(crossMingw && crossStageStatic))
|
${optionalString (!(crossMingw && crossStageStatic))
|
||||||
"--with-native-system-header-dir=${getDev (stdenv.ccCross or stdenv.cc).libc}/include"}
|
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
|
||||||
${if langAda then " --enable-libada" else ""}
|
${if langAda then " --enable-libada" else ""}
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
@ -404,8 +405,7 @@ stdenv.mkDerivation ({
|
|||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_BUILD_CC = stdenv.cc;
|
NIX_BUILD_CC = buildPackages.stdenv.cc;
|
||||||
NIX_CC_CROSS = stdenv.ccCross or null;
|
|
||||||
|
|
||||||
# Needed for the cross compilation to work
|
# Needed for the cross compilation to work
|
||||||
AR = "ar";
|
AR = "ar";
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
, gnused ? null
|
, gnused ? null
|
||||||
, darwin ? null
|
, darwin ? null
|
||||||
, buildPlatform, hostPlatform, targetPlatform
|
, buildPlatform, hostPlatform, targetPlatform
|
||||||
|
, buildPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert langJava -> zip != null && unzip != null
|
assert langJava -> zip != null && unzip != null
|
||||||
@ -345,7 +346,7 @@ stdenv.mkDerivation ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
${optionalString (!(crossMingw && crossStageStatic))
|
${optionalString (!(crossMingw && crossStageStatic))
|
||||||
"--with-native-system-header-dir=${getDev (stdenv.ccCross or stdenv.cc).libc}/include"}
|
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
|
||||||
${if langAda then " --enable-libada" else ""}
|
${if langAda then " --enable-libada" else ""}
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
@ -410,8 +411,7 @@ stdenv.mkDerivation ({
|
|||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_BUILD_CC = stdenv.cc;
|
NIX_BUILD_CC = buildPackages.stdenv.cc;
|
||||||
NIX_CC_CROSS = stdenv.ccCross or null;
|
|
||||||
|
|
||||||
# Needed for the cross compilation to work
|
# Needed for the cross compilation to work
|
||||||
AR = "ar";
|
AR = "ar";
|
||||||
|
@ -295,7 +295,6 @@ stdenv.mkDerivation ({
|
|||||||
++ (optionals langJava [ boehmgc zip unzip ])
|
++ (optionals langJava [ boehmgc zip unzip ])
|
||||||
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs))
|
||||||
++ (optionals (targetPlatform != hostPlatform) [binutils])
|
++ (optionals (targetPlatform != hostPlatform) [binutils])
|
||||||
++ (optionals (buildPlatform != hostPlatform) [buildPackages.stdenv.cc])
|
|
||||||
++ (optionals langAda [gnatboot])
|
++ (optionals langAda [gnatboot])
|
||||||
++ (optionals langVhdl [gnat])
|
++ (optionals langVhdl [gnat])
|
||||||
|
|
||||||
@ -362,7 +361,7 @@ stdenv.mkDerivation ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
${optionalString (!(crossMingw && crossStageStatic))
|
${optionalString (!(crossMingw && crossStageStatic))
|
||||||
"--with-native-system-header-dir=${getDev (stdenv.ccCross or stdenv.cc).libc}/include"}
|
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
|
||||||
${if langAda then " --enable-libada" else ""}
|
${if langAda then " --enable-libada" else ""}
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
@ -431,8 +430,7 @@ stdenv.mkDerivation ({
|
|||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_BUILD_CC = stdenv.cc;
|
NIX_BUILD_CC = buildPackages.stdenv.cc;
|
||||||
NIX_CC_CROSS = stdenv.ccCross or null;
|
|
||||||
|
|
||||||
# Needed for the cross compilation to work
|
# Needed for the cross compilation to work
|
||||||
AR = "ar";
|
AR = "ar";
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
, cloog # unused; just for compat with gcc4, as we override the parameter on some places
|
||||||
, darwin ? null
|
, darwin ? null
|
||||||
, buildPlatform, hostPlatform, targetPlatform
|
, buildPlatform, hostPlatform, targetPlatform
|
||||||
|
, buildPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert langJava -> zip != null && unzip != null
|
assert langJava -> zip != null && unzip != null
|
||||||
@ -342,7 +343,7 @@ stdenv.mkDerivation ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
${optionalString (!(crossMingw && crossStageStatic))
|
${optionalString (!(crossMingw && crossStageStatic))
|
||||||
"--with-native-system-header-dir=${getDev (stdenv.ccCross or stdenv.cc).libc}/include"}
|
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
|
||||||
${if langAda then " --enable-libada" else ""}
|
${if langAda then " --enable-libada" else ""}
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
@ -407,8 +408,7 @@ stdenv.mkDerivation ({
|
|||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_BUILD_CC = stdenv.cc;
|
NIX_BUILD_CC = buildPackages.stdenv.cc;
|
||||||
NIX_CC_CROSS = stdenv.ccCross or null;
|
|
||||||
|
|
||||||
# Needed for the cross compilation to work
|
# Needed for the cross compilation to work
|
||||||
AR = "ar";
|
AR = "ar";
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
, darwin ? null
|
, darwin ? null
|
||||||
, flex ? null
|
, flex ? null
|
||||||
, buildPlatform, hostPlatform, targetPlatform
|
, buildPlatform, hostPlatform, targetPlatform
|
||||||
|
, buildPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert langJava -> zip != null && unzip != null
|
assert langJava -> zip != null && unzip != null
|
||||||
@ -343,7 +344,7 @@ stdenv.mkDerivation ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
${optionalString (!(crossMingw && crossStageStatic))
|
${optionalString (!(crossMingw && crossStageStatic))
|
||||||
"--with-native-system-header-dir=${getDev (stdenv.ccCross or stdenv.cc).libc}/include"}
|
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
|
||||||
${if langAda then " --enable-libada" else ""}
|
${if langAda then " --enable-libada" else ""}
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
@ -408,8 +409,7 @@ stdenv.mkDerivation ({
|
|||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_BUILD_CC = stdenv.cc;
|
NIX_BUILD_CC = buildPackages.stdenv.cc;
|
||||||
NIX_CC_CROSS = stdenv.ccCross or null;
|
|
||||||
|
|
||||||
# Needed for the cross compilation to work
|
# Needed for the cross compilation to work
|
||||||
AR = "ar";
|
AR = "ar";
|
||||||
|
@ -5,11 +5,6 @@ oldOpts="$(shopt -po nounset)" || true
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
|
||||||
if test -n "${NIX_CC_CROSS-}"; then
|
|
||||||
export NIX_CC="$NIX_CC_CROSS"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
export NIX_FIXINC_DUMMY="$NIX_BUILD_TOP/dummy"
|
export NIX_FIXINC_DUMMY="$NIX_BUILD_TOP/dummy"
|
||||||
mkdir "$NIX_FIXINC_DUMMY"
|
mkdir "$NIX_FIXINC_DUMMY"
|
||||||
|
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
, darwin ? null
|
, darwin ? null
|
||||||
, flex ? null
|
, flex ? null
|
||||||
, buildPlatform, hostPlatform, targetPlatform
|
, buildPlatform, hostPlatform, targetPlatform
|
||||||
|
, buildPackages
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert langJava -> zip != null && unzip != null
|
assert langJava -> zip != null && unzip != null
|
||||||
@ -343,7 +344,7 @@ stdenv.mkDerivation ({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
${optionalString (!(crossMingw && crossStageStatic))
|
${optionalString (!(crossMingw && crossStageStatic))
|
||||||
"--with-native-system-header-dir=${getDev (stdenv.ccCross or stdenv.cc).libc}/include"}
|
"--with-native-system-header-dir=${getDev stdenv.cc.libc}/include"}
|
||||||
${if langAda then " --enable-libada" else ""}
|
${if langAda then " --enable-libada" else ""}
|
||||||
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""}
|
||||||
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
${if targetPlatform != hostPlatform then crossConfigureFlags else ""}
|
||||||
@ -408,8 +409,7 @@ stdenv.mkDerivation ({
|
|||||||
buildFlags = "";
|
buildFlags = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_BUILD_CC = stdenv.cc;
|
NIX_BUILD_CC = buildPackages.stdenv.cc;
|
||||||
NIX_CC_CROSS = stdenv.ccCross or null;
|
|
||||||
|
|
||||||
# Needed for the cross compilation to work
|
# Needed for the cross compilation to work
|
||||||
AR = "ar";
|
AR = "ar";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user