Simplify bootstrap recipe

This commit is contained in:
Jeremy Soller 2022-08-19 10:05:54 -06:00
parent 546134337b
commit 5fc093ca9a

View File

@ -5,18 +5,6 @@ git = "https://gitlab.redox-os.org/redox-os/bootstrap.git"
template = "custom"
script = """
ARCH="$(echo "${TARGET}" | cut -d - -f1)"
case "${ARCH}" in
i686)
NASM_FORMAT=elf32
;;
*)
NASM_FORMAT=elf64
;;
esac
nasm \
-o "${COOKBOOK_BUILD}/asm.o" \
-f "${NASM_FORMAT}" \
"${COOKBOOK_SOURCE}/src/${ARCH}.asm"
cargo \
-Zbuild-std=core,alloc,compiler_builtins \
-Zbuild-std-features=compiler-builtins-mem rustc \
@ -31,6 +19,5 @@ mkdir -v "${COOKBOOK_STAGE}/boot"
-o "${COOKBOOK_STAGE}/boot/bootstrap" \
--gc-sections \
-T "${COOKBOOK_SOURCE}/src/${ARCH}.ld" \
"${COOKBOOK_BUILD}/asm.o" \
"${COOKBOOK_BUILD}/${TARGET}/release/libbootstrap.a"
"""