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 * ======== cc ========
32 * The command used to compile C/C++ source files into object files
33 *
34 * The `-m32` flag is required to ensure that this target supports
35 * 32-bit Linux systems.
36 */
37 override readonly config xdc.bld.ITarget2.Command cc = {
38 cmd: "$(rootDir)/bin/gcc -c -MD -MF $@.dep",
39 opts: "-m32"
40 };
41
42 /*!
43 * ======== asm ========
44 * The command used to assembles assembly source files into object files
45 */
46 override readonly config xdc.bld.ITarget2.Command asm = {
47 cmd: "$(rootDir)/bin/gcc -c -x assembler",
48 opts: "-m32"
49 };
50
51 /*!
52 * ======== lnk ========
53 * The command used to link executables.
54 *
55 * The `-m32` flag is required to ensure that this target supports
56 * 32-bit Linux systems.
57 */
58 override readonly config xdc.bld.ITarget2.Command lnk = {
59 cmd: "$(rootDir)/bin/gcc",
60 opts: "-m32"
61 };
62
63 64 65
66 override config xdc.bld.ITarget2.Options ccOpts = {
67 prefix: "-fPIC -Wunused",
68 suffix: "-Dfar="
69 };
70
71 72 73 74 75 76 77 78 79
80 override config string includeOpts = "-isystem $(rootDir)/include";
81
82 83 84
85 override readonly config xdc.bld.ITarget.StdTypes stdTypes = {
86 t_IArg : { size: 4, align: 4 },
87 t_Char : { size: 1, align: 1 },
88 t_Double : { size: 8, align: 4 },
89 t_Float : { size: 4, align: 4 },
90 t_Fxn : { size: 4, align: 4 },
91 t_Int : { size: 4, align: 4 },
92 t_Int8 : { size: 1, align: 1 },
93 t_Int16 : { size: 2, align: 2 },
94 t_Int32 : { size: 4, align: 4 },
95 t_Int64 : { size: 8, align: 4 },
96 t_Long : { size: 4, align: 4 },
97 t_LDouble : { size: 12, align: 4 },
98 t_LLong : { size: 8, align: 4 },
99 t_Ptr : { size: 4, align: 4 },
100 t_Short : { size: 2, align: 2 },
101 t_Size : { size: 4, align: 4 },
102 };
103 }
104 105 106 107
108