From: Sven Van Asbroeck Date: Tue, 13 Apr 2021 14:19:27 +0000 (-0400) Subject: arm: add Rust target.json X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=52a55644da69decdb619b7325b604b31fafb0b76;p=users%2Fjedix%2Flinux-maple.git arm: add Rust target.json This is simply based on output from: $ rustc +nightly -Z unstable-options \ --target=arm-unknown-linux-gnueabi \ --print target-spec-json Changes made: - removed "unsupported-abis" (does not build) - added "function-sections": false (all kernel functions should go in the .text section) - added "relocation-model": "static" (kernel does not support .data.rel.ro sections) Note that the vanilla `arm-unknown-linux-gnueabi` triple lets rustc generate the armv6 instruction set. Signed-off-by: Sven Van Asbroeck [normalized title] Signed-off-by: Miguel Ojeda --- diff --git a/arch/arm/rust/target.json b/arch/arm/rust/target.json new file mode 100644 index 0000000000000..37710eb727b1c --- /dev/null +++ b/arch/arm/rust/target.json @@ -0,0 +1,28 @@ +{ + "arch": "arm", + "crt-static-respected": true, + "data-layout": "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64", + "dynamic-linking": true, + "env": "gnu", + "executables": true, + "features": "+strict-align,+v6", + "function-sections": false, + "has-elf-tls": true, + "has-rpath": true, + "is-builtin": true, + "linker-is-gnu": true, + "llvm-target": "arm-unknown-linux-gnueabi", + "max-atomic-width": 64, + "os": "linux", + "position-independent-executables": true, + "pre-link-args": { + "gcc": [ + "-Wl,--as-needed", + "-Wl,-z,noexecstack" + ] + }, + "relocation-model": "static", + "target-family": "unix", + "target-mcount": "\u0001__gnu_mcount_nc", + "target-pointer-width": "32" +}