mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-11 14:43:47 +00:00
freebsd: set BOOTSTRAPPING
when building for Linux
FreeBSD loves to access system headers for platform-specific builtins. This is fine on FreeBSD but often breaks when building utilities for Linux. `BOOTSTRAPPING` disables using most of these headers. Instead of adding workarounds to every package, just set `BOOTSTRAPPING` when the host platform is not FreeBSD.
This commit is contained in:
parent
ee9ea4f6ef
commit
623ecef987
@ -23,6 +23,4 @@ mkDerivation {
|
||||
install
|
||||
m4
|
||||
];
|
||||
|
||||
BOOTSTRAPPING = !stdenv.hostPlatform.isFreeBSD;
|
||||
}
|
||||
|
@ -35,5 +35,4 @@ mkDerivation (
|
||||
|
||||
MK_TESTS = "no";
|
||||
}
|
||||
// lib.optionalAttrs (!stdenv.hostPlatform.isFreeBSD) { BOOTSTRAPPING = 1; }
|
||||
)
|
||||
|
@ -92,6 +92,7 @@ lib.makeOverridable (
|
||||
# Since STRIP in `makeFlags` has to be a flag, not the binary itself
|
||||
STRIPBIN = "${stdenv'.cc.bintools.targetPrefix}strip";
|
||||
}
|
||||
// lib.optionalAttrs (!stdenv.hostPlatform.isFreeBSD) { BOOTSTRAPPING = true; }
|
||||
// lib.optionalAttrs stdenv'.hostPlatform.isDarwin { MKRELRO = "no"; }
|
||||
// lib.optionalAttrs (stdenv'.cc.isClang or false) {
|
||||
HAVE_LLVM = lib.versions.major (lib.getVersion stdenv'.cc.cc);
|
||||
|
@ -13,8 +13,6 @@ mkDerivation {
|
||||
"lib/libiconv_modules/mapper_std"
|
||||
];
|
||||
|
||||
BOOTSTRAPPING = !stdenv.hostPlatform.isFreeBSD;
|
||||
|
||||
extraNativeBuildInputs = [
|
||||
byacc
|
||||
flex
|
||||
|
@ -1,5 +1,4 @@
|
||||
{
|
||||
stdenv,
|
||||
mkDerivation,
|
||||
byacc,
|
||||
flex,
|
||||
@ -10,8 +9,6 @@ mkDerivation {
|
||||
|
||||
extraPaths = [ "lib/libc/iconv" ];
|
||||
|
||||
BOOTSTRAPPING = !stdenv.hostPlatform.isFreeBSD;
|
||||
|
||||
extraNativeBuildInputs = [
|
||||
byacc
|
||||
flex
|
||||
|
Loading…
Reference in New Issue
Block a user