-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cross-compilation for tboot-sign
- Loading branch information
Showing
5 changed files
with
40 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
diff --git a/lib/std/Build/Step/Compile.zig b/lib/std/Build/Step/Compile.zig | ||
index 314db765cb..c4b4dbacc4 100644 | ||
--- a/lib/std/Build/Step/Compile.zig | ||
+++ b/lib/std/Build/Step/Compile.zig | ||
@@ -703,8 +703,9 @@ fn runPkgConfig(self: *Compile, lib_name: []const u8) !PkgConfigResult { | ||
}; | ||
|
||
var code: u8 = undefined; | ||
+ const pkg_config_exe = b.graph.env_map.get("PKG_CONFIG") orelse "pkg-config"; | ||
const stdout = if (b.runAllowFail(&[_][]const u8{ | ||
- "pkg-config", | ||
+ pkg_config_exe, | ||
pkg_name, | ||
"--cflags", | ||
"--libs", | ||
@@ -1824,7 +1825,8 @@ pub fn doAtomicSymLinks( | ||
} | ||
|
||
fn execPkgConfigList(self: *std.Build, out_code: *u8) (PkgConfigError || RunError)![]const PkgConfigPkg { | ||
- const stdout = try self.runAllowFail(&[_][]const u8{ "pkg-config", "--list-all" }, out_code, .Ignore); | ||
+ const pkg_config_exe = self.graph.env_map.get("PKG_CONFIG") orelse "pkg-config"; | ||
+ const stdout = try self.runAllowFail(&[_][]const u8{ pkg_config_exe, "--list-all" }, out_code, .Ignore); | ||
var list = ArrayList(PkgConfigPkg).init(self.allocator); | ||
errdefer list.deinit(); | ||
var line_it = mem.tokenizeAny(u8, stdout, "\r\n"); |