Browse Source

Merge #93

93: Remove riscv target post fix triple information from asm archive name r=almindor a=MabezDev

For RISCV targets that don't have `unknown-none-elf` in their name. The only bit that matters is the first section anyways.

Co-authored-by: Scott Mabin <scott@mabez.dev>
bors[bot] 3 years ago
parent
commit
dc0bc37e76
15 changed files with 26 additions and 24 deletions
  1. 12 12
      assemble.ps1
  2. 12 12
      assemble.sh
  3. BIN
      bin/riscv32i.a
  4. BIN
      bin/riscv32ic.a
  5. BIN
      bin/riscv32if.a
  6. BIN
      bin/riscv32ifc.a
  7. BIN
      bin/riscv32ifd.a
  8. BIN
      bin/riscv32ifdc.a
  9. BIN
      bin/riscv64i.a
  10. BIN
      bin/riscv64ic.a
  11. BIN
      bin/riscv64if.a
  12. BIN
      bin/riscv64ifc.a
  13. BIN
      bin/riscv64ifd.a
  14. BIN
      bin/riscv64ifdc.a
  15. 2 0
      build.rs

+ 12 - 12
assemble.ps1

@@ -6,39 +6,39 @@ Remove-Item -Force bin/*.a
 $crate = "riscv"
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32i asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv32i-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv32i.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32ic asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv32ic-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv32ic.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64i asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv64i-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv64i.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64ic asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv64ic-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv64ic.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32if asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv32if-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv32if.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32ifc asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv32ifc-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv32ifc.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64if asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv64if-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv64if.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64ifc asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv64ifc-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv64ifc.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifd asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv32ifd-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv32ifd.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifdc asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv32ifdc-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv32ifdc.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifd asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv64ifd-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv64ifd.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifdc asm.S -o bin/$crate.o
-riscv64-unknown-elf-ar crs bin/riscv64ifdc-unknown-none-elf.a bin/$crate.o
+riscv64-unknown-elf-ar crs bin/riscv64ifdc.a bin/$crate.o
 
 Remove-Item bin/$crate.o

+ 12 - 12
assemble.sh

@@ -8,39 +8,39 @@ crate=riscv
 rm -f bin/*.a
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32i asm.S -o bin/$crate.o
-ar crs bin/riscv32i-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv32i.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32 -march=rv32ic asm.S -o bin/$crate.o
-ar crs bin/riscv32ic-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv32ic.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64i asm.S -o bin/$crate.o
-ar crs bin/riscv64i-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv64i.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64 -march=rv64ic asm.S -o bin/$crate.o
-ar crs bin/riscv64ic-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv64ic.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32if asm.S -o bin/$crate.o
-ar crs bin/riscv32if-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv32if.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32f -march=rv32ifc asm.S -o bin/$crate.o
-ar crs bin/riscv32ifc-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv32ifc.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64if asm.S -o bin/$crate.o
-ar crs bin/riscv64if-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv64if.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64f -march=rv64ifc asm.S -o bin/$crate.o
-ar crs bin/riscv64ifc-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv64ifc.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifd asm.S -o bin/$crate.o
-ar crs bin/riscv32ifd-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv32ifd.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=ilp32d -march=rv32ifdc asm.S -o bin/$crate.o
-ar crs bin/riscv32ifdc-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv32ifdc.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifd asm.S -o bin/$crate.o
-ar crs bin/riscv64ifd-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv64ifd.a bin/$crate.o
 
 riscv64-unknown-elf-gcc -c -mabi=lp64d -march=rv64ifdc asm.S -o bin/$crate.o
-ar crs bin/riscv64ifdc-unknown-none-elf.a bin/$crate.o
+ar crs bin/riscv64ifdc.a bin/$crate.o
 
 rm bin/$crate.o

BIN
bin/riscv32if-unknown-none-elf.a → bin/riscv32i.a


BIN
bin/riscv32ifc-unknown-none-elf.a → bin/riscv32ic.a


BIN
bin/riscv32ifd-unknown-none-elf.a → bin/riscv32if.a


BIN
bin/riscv32ifdc-unknown-none-elf.a → bin/riscv32ifc.a


BIN
bin/riscv32i-unknown-none-elf.a → bin/riscv32ifd.a


BIN
bin/riscv32ic-unknown-none-elf.a → bin/riscv32ifdc.a


BIN
bin/riscv64ifd-unknown-none-elf.a → bin/riscv64i.a


BIN
bin/riscv64ic-unknown-none-elf.a → bin/riscv64ic.a


BIN
bin/riscv64if-unknown-none-elf.a → bin/riscv64if.a


BIN
bin/riscv64ifc-unknown-none-elf.a → bin/riscv64ifc.a


BIN
bin/riscv64i-unknown-none-elf.a → bin/riscv64ifd.a


BIN
bin/riscv64ifdc-unknown-none-elf.a → bin/riscv64ifdc.a


+ 2 - 0
build.rs

@@ -14,6 +14,8 @@ fn main() {
         target.retain_extensions("ifdc");
 
         let target = target.to_string();
+        // capture riscvNNxxxxx only
+        let target = target.split("-").next().unwrap();
 
         fs::copy(
             format!("bin/{}.a", target),