-
Notifications
You must be signed in to change notification settings - Fork 4
/
cubit.gpr
100 lines (82 loc) · 2.84 KB
/
cubit.gpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
project CuBit is
for Languages use ("Ada", "yasm");
for Object_Dir use "build";
for Source_Dirs use ("src", "src/filesystem", "src/services");
-- @TODO add src/test for "test" builds
for Main use ("kmain.adb");
for Runtime ("Ada") use "runtime";
for Library_Dir use "";
for Excluded_Source_Files use ("init.asm");
-- So gprbuild finds our .asm files
package Naming is
for Body_Suffix ("yasm") use ".asm";
end Naming;
-- For gprbuild
package Builder is
for Default_Switches ("Ada") use
(
"-g", -- debug info
"-gnatp", -- suppress all checks
--"-gnata", -- Enable assertions
"-gnatwa", -- print all warnings...
"-gnatw.X", -- disable warnings for No_Exception_Propagation
"-gnatd.v", -- SPARK elaboration model
--"-fstack-check", -- For debug builds only, can break things.
"-s", -- recompile on compiler switch changes
"-v", -- verbose
"-z", -- no main subprogram
"-nostdlib"
);
end Builder;
-- For compiler & assembler
package Compiler is
-- Ada info
for Default_Switches ("Ada") use
(
"-fstack-usage", -- Output .su file with stack info
--"-fomit-frame-pointer", -- A little faster
"-mno-red-zone",
"-fno-pic",
"-mcmodel=kernel", -- all kernel code in top 2GiB of memory
--"-O2",
"-mno-sse", -- not supported
"-mno-sse2",
"-I-" -- don't look for source files in the same folder
);
-- Assembler info
for Driver ("yasm") use "yasm";
for Object_File_Suffix ("yasm") use ".o";
for Object_File_Switches ("yasm") use ("-o", "");
for Required_Switches ("yasm") use ("");
--for Dependency_Switches ("yasm") use ("");
for Default_Switches ("yasm") use
(
"--arch=x86",
"-felf64",
"--dformat=dwarf2"
);
end Compiler;
-- For binder
package Binder is
for Default_Switches ("Ada") use
(
"-n", -- No main subprogram
"-d_C" -- diagnose circularity errors
);
end Binder;
-- gnattest
package Gnattest is
for Harness_Dir use "unittests";
end Gnattest;
-- For linker
-- package Linker is
-- for Required_Switches use
-- (
-- "-nostdlib",
-- "-static",
-- "-n",
-- "-v",
-- "-T../src/linker.ld"
-- );
-- end Linker;
end CuBit;