assemble.sh 671 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. set -euxo pipefail
  3. crate=riscv
  4. # remove existing blobs because otherwise this will append object files to the old blobs
  5. rm -f bin/*.a
  6. riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32imac asm.S -o bin/$crate.o
  7. riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32imac asm32.S -o bin/$crate-32.o
  8. ar crs bin/riscv32imac-unknown-none-elf.a bin/$crate.o bin/$crate-32.o
  9. ar crs bin/riscv32imc-unknown-none-elf.a bin/$crate.o bin/$crate-32.o
  10. riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64imac asm.S -o bin/$crate.o
  11. ar crs bin/riscv64imac-unknown-none-elf.a bin/$crate.o
  12. ar crs bin/riscv64gc-unknown-none-elf.a bin/$crate.o
  13. rm bin/$crate.o
  14. rm bin/$crate-32.o