commit f408b7a2be6ae7bface1afd4113750d06d14a605
parent 823fafffb29f492a514a8f27afc76255b4c12d6f
Author: Drew DeVault <sir@cmpwn.com>
Date: Tue, 6 Apr 2021 08:49:27 -0400
format::elf: add HOST_MACHINE, HOST_ABI
Diffstat:
4 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/format/elf/+linux.ha b/format/elf/+linux.ha
@@ -0,0 +1 @@
+export def HOST_ABI: ident_abi = ident_abi::SYSV;
diff --git a/format/elf/+x86_64.ha b/format/elf/+x86_64.ha
@@ -0,0 +1 @@
+export def HOST_MACHINE: elf_machine = elf_machine::X86_64;
diff --git a/scripts/gen-stdlib b/scripts/gen-stdlib
@@ -248,6 +248,8 @@ fmt() {
format_elf() {
gen_srcs format::elf \
+ '$(ARCH).ha' \
+ '$(PLATFORM).ha' \
types.ha
gen_ssa format::elf
}
diff --git a/stdlib.mk b/stdlib.mk
@@ -399,6 +399,8 @@ $(HARECACHE)/fmt/fmt.ssa: $(stdlib_fmt_srcs) $(stdlib_rt) $(stdlib_bufio) $(stdl
# format::elf
stdlib_format_elf_srcs= \
+ $(STDLIB)/format/elf/$(ARCH).ha \
+ $(STDLIB)/format/elf/$(PLATFORM).ha \
$(STDLIB)/format/elf/types.ha
$(HARECACHE)/format/elf/format_elf.ssa: $(stdlib_format_elf_srcs) $(stdlib_rt)
@@ -1213,6 +1215,8 @@ $(TESTCACHE)/fmt/fmt.ssa: $(testlib_fmt_srcs) $(testlib_rt) $(testlib_bufio) $(t
# format::elf
testlib_format_elf_srcs= \
+ $(STDLIB)/format/elf/$(ARCH).ha \
+ $(STDLIB)/format/elf/$(PLATFORM).ha \
$(STDLIB)/format/elf/types.ha
$(TESTCACHE)/format/elf/format_elf.ssa: $(testlib_format_elf_srcs) $(testlib_rt)