assemble.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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=rv32i asm.S -o bin/$crate.o
  7. ar crs bin/riscv32i.a bin/$crate.o
  8. riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32ic asm.S -o bin/$crate.o
  9. ar crs bin/riscv32ic.a bin/$crate.o
  10. riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64i asm.S -o bin/$crate.o
  11. ar crs bin/riscv64i.a bin/$crate.o
  12. riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64ic asm.S -o bin/$crate.o
  13. ar crs bin/riscv64ic.a bin/$crate.o
  14. riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32if asm.S -o bin/$crate.o
  15. ar crs bin/riscv32if.a bin/$crate.o
  16. riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32ifc asm.S -o bin/$crate.o
  17. ar crs bin/riscv32ifc.a bin/$crate.o
  18. riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64if asm.S -o bin/$crate.o
  19. ar crs bin/riscv64if.a bin/$crate.o
  20. riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64ifc asm.S -o bin/$crate.o
  21. ar crs bin/riscv64ifc.a bin/$crate.o
  22. riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifd asm.S -o bin/$crate.o
  23. ar crs bin/riscv32ifd.a bin/$crate.o
  24. riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifdc asm.S -o bin/$crate.o
  25. ar crs bin/riscv32ifdc.a bin/$crate.o
  26. riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifd asm.S -o bin/$crate.o
  27. ar crs bin/riscv64ifd.a bin/$crate.o
  28. riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifdc asm.S -o bin/$crate.o
  29. ar crs bin/riscv64ifdc.a bin/$crate.o
  30. rm bin/$crate.o