1 2 3 4 5 6 7 8 9 10 11
12 /*!
13 * ======== Linux86.xdc ========
14 * Native 32-bit x86 Linux target (ILP32)
15 *
16 * This module defines the native target for 32-bit (ILP32) Linux
17 * on an x86 platform.
18 */
19 metaonly module Linux86 inherits gnu.targets.ITarget {
20 override readonly config string name = "Linux86";
21 override readonly config string os = "Linux";
22 override readonly config string suffix = "86U";
23 override readonly config string isa = "i686";
24 override readonly config xdc.bld.ITarget.Model model= {
25 endian: "little"
26 };
27 override readonly config string rts = "gnu.targets.rts86U";
28 override config string platform = "host.platforms.PC";
29
30 31 32
33 override readonly config xdc.bld.ITarget2.Command ar = {
34 cmd: "$(rootDir)/bin/ar",
35 opts: "cr"
36 };
37
38 /*!
39 * ======== cc ========
40 * The command used to compile C/C++ source files into object files
41 *
42 * The `-m32` flag is required to ensure that this target supports
43 * 32-bit Linux systems.
44 */
45 override readonly config xdc.bld.ITarget2.Command cc = {
46 cmd: "$(rootDir)/$(LONGNAME) -c -MD -MF $@.dep",
47 opts: "-m32"
48 };
49
50 /*!
51 * ======== lnk ========
52 * The command used to link executables.
53 *
54 * The `-m32` flag is required to ensure that this target supports
55 * 32-bit Linux systems.
56 */
57 override readonly config xdc.bld.ITarget2.Command lnk = {
58 cmd: "$(rootDir)/$(LONGNAME)",
59 opts: "-m32"
60 };
61
62 63 64
65 override config xdc.bld.ITarget2.Options ccOpts = {
66 prefix: "-fPIC -Wunused",
67 suffix: "-Dfar="
68 };
69
70 71 72 73 74 75 76 77 78
79 override config string includeOpts = "-isystem $(rootDir)/include";
80
81 82 83
84 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
85 t_IArg : { size: 4, align: 4 },
86 t_Char : { size: 1, align: 1 },
87 t_Double : { size: 8, align: 4 },
88 t_Float : { size: 4, align: 4 },
89 t_Fxn : { size: 4, align: 4 },
90 t_Int : { size: 4, align: 4 },
91 t_Int8 : { size: 1, align: 1 },
92 t_Int16 : { size: 2, align: 2 },
93 t_Int32 : { size: 4, align: 4 },
94 t_Int64 : { size: 8, align: 4 },
95 t_Long : { size: 4, align: 4 },
96 t_LDouble : { size: 12, align: 4 },
97 t_LLong : { size: 8, align: 4 },
98 t_Ptr : { size: 4, align: 4 },
99 t_Short : { size: 2, align: 2 },
100 t_Size : { size: 4, align: 4 },
101 };
102 }
103 104 105 106
107