mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-17 15:34:18 +08:00
Add custom target for compiling relibc-freestanding for riscv64gc
This commit is contained in:
parent
fce1ea9e43
commit
5e3bcaee08
@ -234,6 +234,7 @@ else
|
||||
export PATH="$(PREFIX_FREESTANDING_PATH):$$PATH" && \
|
||||
export CARGO="env -u CARGO -u RUSTUP_TOOLCHAIN cargo" && \
|
||||
export CC_$(subst -,_,$(TARGET))="$(GNU_TARGET)-gcc -isystem $(ROOT)/$@.partial/$(GNU_TARGET)/include" && \
|
||||
export RUST_TARGET_PATH="$(ROOT)/targets" && \
|
||||
$(MAKE) clean && \
|
||||
$(MAKE) -j 1 all && \
|
||||
$(MAKE) -j 1 install DESTDIR="$(ROOT)/$@.partial/$(GNU_TARGET)"
|
||||
|
||||
3
targets/README
Normal file
3
targets/README
Normal file
@ -0,0 +1,3 @@
|
||||
This contains a target definition for targets that Redox supports but have not
|
||||
yet been added to the upstream rust, specifically for compiling relibc in
|
||||
freestanding mode.
|
||||
41
targets/riscv64gc-unknown-redox.json
Normal file
41
targets/riscv64gc-unknown-redox.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"arch": "riscv64",
|
||||
"code-model": "medium",
|
||||
"cpu": "generic-rv64",
|
||||
"crt-objects-fallback": "false",
|
||||
"crt-static-allows-dylibs": true,
|
||||
"crt-static-default": true,
|
||||
"crt-static-respected": true,
|
||||
"data-layout": "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128",
|
||||
"dynamic-linking": true,
|
||||
"env": "relibc",
|
||||
"features": "+m,+a,+f,+d,+c",
|
||||
"has-rpath": true,
|
||||
"has-thread-local": true,
|
||||
"late-link-args": {
|
||||
"gnu-cc": [
|
||||
"-lgcc"
|
||||
],
|
||||
"gnu-lld-cc": [
|
||||
"-lgcc"
|
||||
]
|
||||
},
|
||||
"linker-flavor": "gnu-cc",
|
||||
"llvm-abiname": "lp64d",
|
||||
"llvm-target": "riscv64-unknown-redox",
|
||||
"max-atomic-width": 64,
|
||||
"metadata": {
|
||||
"description": null,
|
||||
"host_tools": null,
|
||||
"std": null,
|
||||
"tier": null
|
||||
},
|
||||
"os": "redox",
|
||||
"plt-by-default": false,
|
||||
"position-independent-executables": true,
|
||||
"relro-level": "full",
|
||||
"target-family": [
|
||||
"unix"
|
||||
],
|
||||
"target-pointer-width": "64"
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user