forked from M-Labs/artiq
rust: find json file using CARGO_TRIPLE
This commit is contained in:
parent
0898e101e2
commit
b3e315e24a
|
@ -11,7 +11,7 @@ all:: bootloader.bin
|
||||||
$(RUSTOUT)/libbootloader.a:
|
$(RUSTOUT)/libbootloader.a:
|
||||||
$(cargo) --target-dir ./cargo \
|
$(cargo) --target-dir ./cargo \
|
||||||
--manifest-path $(BOOTLOADER_DIRECTORY)/Cargo.toml \
|
--manifest-path $(BOOTLOADER_DIRECTORY)/Cargo.toml \
|
||||||
--target $(BOOTLOADER_DIRECTORY)/../riscv32ima-unknown-none-elf.json
|
--target $(BOOTLOADER_DIRECTORY)/../$(CARGO_TRIPLE).json
|
||||||
|
|
||||||
bootloader.elf: $(RUSTOUT)/libbootloader.a
|
bootloader.elf: $(RUSTOUT)/libbootloader.a
|
||||||
$(link) -T $(BOOTLOADER_DIRECTORY)/bootloader.ld
|
$(link) -T $(BOOTLOADER_DIRECTORY)/bootloader.ld
|
||||||
|
|
|
@ -22,7 +22,7 @@ all:: ksupport.elf
|
||||||
$(RUSTOUT)/libksupport.a:
|
$(RUSTOUT)/libksupport.a:
|
||||||
$(cargo) --target-dir ./cargo \
|
$(cargo) --target-dir ./cargo \
|
||||||
--manifest-path $(KSUPPORT_DIRECTORY)/Cargo.toml \
|
--manifest-path $(KSUPPORT_DIRECTORY)/Cargo.toml \
|
||||||
--target $(KSUPPORT_DIRECTORY)/../riscv32ima-unknown-none-elf.json
|
--target $(KSUPPORT_DIRECTORY)/../$(CARGO_TRIPLE).json
|
||||||
|
|
||||||
ksupport.elf: $(RUSTOUT)/libksupport.a glue.o
|
ksupport.elf: $(RUSTOUT)/libksupport.a glue.o
|
||||||
$(link) -T $(KSUPPORT_DIRECTORY)/ksupport.ld \
|
$(link) -T $(KSUPPORT_DIRECTORY)/ksupport.ld \
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
"arch": "riscv32",
|
||||||
|
"code-model": "medium",
|
||||||
|
"cpu": "generic-rv32",
|
||||||
|
"crt-static-respected": true,
|
||||||
|
"data-layout": "e-m:e-p:32:32-i64:64-n32-S128",
|
||||||
|
"dynamic-linking": true,
|
||||||
|
"executables": true,
|
||||||
|
"features": "+m,+a,+f,+d",
|
||||||
|
"has-elf-tls": true,
|
||||||
|
"has-rpath": true,
|
||||||
|
"llvm-abiname": "ilp32d",
|
||||||
|
"llvm-target": "riscv32-unknown-linux",
|
||||||
|
"max-atomic-width": 32,
|
||||||
|
"position-independent-executables": true,
|
||||||
|
"pre-link-args": {
|
||||||
|
"gcc": [
|
||||||
|
"-Wl,--as-needed",
|
||||||
|
"-Wl,-z,noexecstack"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"relro-level": "full",
|
||||||
|
"target-family": "unix",
|
||||||
|
"target-pointer-width": "32",
|
||||||
|
"unsupported-abis": [
|
||||||
|
"cdecl",
|
||||||
|
"stdcall",
|
||||||
|
"fastcall",
|
||||||
|
"vectorcall",
|
||||||
|
"thiscall",
|
||||||
|
"aapcs",
|
||||||
|
"win64",
|
||||||
|
"sysv64",
|
||||||
|
"ptx-kernel",
|
||||||
|
"msp430-interrupt",
|
||||||
|
"x86-interrupt",
|
||||||
|
"amdgpu-kernel"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
|
@ -29,4 +29,3 @@
|
||||||
"amdgpu-kernel"
|
"amdgpu-kernel"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ all:: runtime.bin runtime.fbi
|
||||||
$(RUSTOUT)/libruntime.a:
|
$(RUSTOUT)/libruntime.a:
|
||||||
$(cargo) --target-dir ./cargo \
|
$(cargo) --target-dir ./cargo \
|
||||||
--manifest-path $(RUNTIME_DIRECTORY)/Cargo.toml \
|
--manifest-path $(RUNTIME_DIRECTORY)/Cargo.toml \
|
||||||
--target $(RUNTIME_DIRECTORY)/../riscv32ima-unknown-none-elf.json
|
--target $(RUNTIME_DIRECTORY)/../$(CARGO_TRIPLE).json
|
||||||
|
|
||||||
runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o
|
runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o
|
||||||
$(link) -T $(RUNTIME_DIRECTORY)/runtime.ld \
|
$(link) -T $(RUNTIME_DIRECTORY)/runtime.ld \
|
||||||
|
|
|
@ -13,7 +13,7 @@ all:: satman.bin satman.fbi
|
||||||
$(RUSTOUT)/libsatman.a:
|
$(RUSTOUT)/libsatman.a:
|
||||||
$(cargo) --target-dir ./cargo \
|
$(cargo) --target-dir ./cargo \
|
||||||
--manifest-path $(SATMAN_DIRECTORY)/Cargo.toml \
|
--manifest-path $(SATMAN_DIRECTORY)/Cargo.toml \
|
||||||
--target $(SATMAN_DIRECTORY)/../riscv32ima-unknown-none-elf.json
|
--target $(SATMAN_DIRECTORY)/../$(CARGO_TRIPLE).json
|
||||||
|
|
||||||
satman.elf: $(RUSTOUT)/libsatman.a
|
satman.elf: $(RUSTOUT)/libsatman.a
|
||||||
$(link) -T $(SATMAN_DIRECTORY)/satman.ld
|
$(link) -T $(SATMAN_DIRECTORY)/satman.ld
|
||||||
|
|
Loading…
Reference in New Issue