rustc_target/spec/targets/
m68k_unknown_none_elf.rs

1use rustc_abi::Endian;
2
3use crate::spec::{CodeModel, PanicStrategy, RelocModel, Target, TargetMetadata, TargetOptions};
4
5pub(crate) fn target() -> Target {
6    let options = TargetOptions {
7        cpu: "M68010".into(),
8        max_atomic_width: None,
9        endian: Endian::Big,
10        // LLD currently does not have support for M68k
11        linker: Some("m68k-linux-gnu-ld".into()),
12        panic_strategy: PanicStrategy::Abort,
13        code_model: Some(CodeModel::Medium),
14        has_rpath: false,
15        // should be soft-float
16        llvm_floatabi: None,
17        relocation_model: RelocModel::Static,
18        ..Default::default()
19    };
20
21    Target {
22        llvm_target: "m68k".into(),
23        metadata: TargetMetadata {
24            description: Some("Motorola 680x0".into()),
25            tier: Some(3),
26            host_tools: Some(false),
27            std: Some(false),
28        },
29        pointer_width: 32,
30        data_layout: "E-m:e-p:32:16:32-i8:8:8-i16:16:16-i32:16:32-n8:16:32-a:0:16-S16".into(),
31        arch: "m68k".into(),
32        options,
33    }
34}