mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-19 20:21:14 +00:00
0801041b52
Hardcode qbe and harec to avoid the overhead of wrapping hare with a bash script. By doing that, we also had to change how `makeFlags` were defined: Now only part of the `<ARCH>_<TOOL>` make variables are conditioned to the enableCrossCompilation. The ones belonging to the build platform are passed unconditionally. Add qbe and harec to propagatedBuildInputs. Some build frameworks may rely on having harec and qbe available on PATH by setting `HAREC` and `QBE` to relative paths --- e. g., `haredo`.
25 lines
813 B
Diff
25 lines
813 B
Diff
diff --git a/cmd/hare/build.ha b/cmd/hare/build.ha
|
|
index b2ac6518..417b46c6 100644
|
|
--- a/cmd/hare/build.ha
|
|
+++ b/cmd/hare/build.ha
|
|
@@ -37,7 +37,7 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
|
|
case let ncpu: size =>
|
|
yield ncpu;
|
|
},
|
|
- version = build::get_version(os::tryenv("HAREC", "harec"))?,
|
|
+ version = build::get_version(os::tryenv("HAREC", "@harec@"))?,
|
|
arch = arch.qbe_name,
|
|
platform = build::get_platform(os::sysname())?,
|
|
...
|
|
@@ -145,8 +145,8 @@ fn build(name: str, cmd: *getopt::command) (void | error) = {
|
|
set_arch_tags(&ctx.ctx.tags, arch);
|
|
|
|
ctx.cmds = ["",
|
|
- os::tryenv("HAREC", "harec"),
|
|
- os::tryenv("QBE", "qbe"),
|
|
+ os::tryenv("HAREC", "@harec@"),
|
|
+ os::tryenv("QBE", "@qbe@"),
|
|
os::tryenv("AS", arch.as_cmd),
|
|
os::tryenv("LD", arch.ld_cmd),
|
|
];
|