Skip to content

Commit e643caf

Browse files
committed
disable verbose warning
1 parent d361624 commit e643caf

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed

chainloader.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
(import ./overlay.nix {
77
inherit withCcache;
88
smp = false; # No SMP for chainloader
9+
disableTargetWarning = true;
910
})
1011
],
1112
pkgs ? import nixpkgs {
@@ -47,5 +48,5 @@ stdenv.mkDerivation rec {
4748
nativeBuildInputs = [
4849
pkgs.buildPackages.cmake
4950
pkgs.buildPackages.nasm
50-
];
51+
] ++ [ pkgs.pkgsIncludeOS.suppressTargetWarningHook ];
5152
}

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
smp ? false, # Enable multcore support (SMP)
33
nixpkgs ? ./pinned.nix,
44
overlays ? [
5-
(import ./overlay.nix { inherit withCcache; inherit smp; } )
5+
(import ./overlay.nix { inherit withCcache; inherit smp; disableTargetWarning = true; } )
66
],
77
pkgs ? import nixpkgs { config = {}; inherit overlays; }
88
}:

overlay.nix

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
withCcache, # Enable ccache. Requires correct permissions, see below.
3+
disableTargetWarning ? true, # TODO: see https://github.com/NixOS/nixpkgs/issues/395191
34
smp, # Enable multicore support (SMP)
45
} :
56
final: prev: {
@@ -69,9 +70,21 @@ final: prev: {
6970
echo "====="
7071
'';
7172
};
73+
74+
suppressTargetWarningHook = prev.writeTextFile {
75+
name = "suppress-target-warning-hook";
76+
destination = "/nix-support/setup-hook";
77+
text = ''
78+
# see https://github.com/NixOS/nixpkgs/issues/395191
79+
# delete this hook and downstream references once resolved
80+
81+
export NIX_CC_WRAPPER_SUPPRESS_TARGET_WARNING=1
82+
'';
83+
};
7284
in {
7385
# self.callPackage will use this stdenv.
7486
stdenv = final.stdenvIncludeOS.includeos_stdenv;
87+
inherit suppressTargetWarningHook;
7588

7689
# Deps
7790
uzlib = self.callPackage ./deps/uzlib/default.nix { };
@@ -140,7 +153,8 @@ final: prev: {
140153
nativeBuildInputs = [
141154
prev.buildPackages.cmake
142155
prev.buildPackages.nasm
143-
] ++ prev.lib.optionals withCcache [self.ccacheWrapper ccacheNoticeHook];
156+
] ++ prev.lib.optionals disableTargetWarning [suppressTargetWarningHook]
157+
++ prev.lib.optionals withCcache [self.ccacheWrapper ccacheNoticeHook];
144158

145159
buildInputs = [
146160
self.botan2

unikernel.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ includeos.stdenv.mkDerivation rec {
4949
nativeBuildInputs = [
5050
includeos.pkgs.buildPackages.nasm
5151
includeos.pkgs.buildPackages.cmake
52-
];
52+
] ++ [ includeos.pkgs.pkgsIncludeOS.suppressTargetWarningHook ];
5353

5454
buildInputs = [
5555
includeos

0 commit comments

Comments
 (0)