forked from AdaCore/bb-runtimes
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathruntime_build.gpr
34 lines (27 loc) · 1.21 KB
/
runtime_build.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
project Runtime_Build is
for Languages use ("Ada", "C", "Asm_Cpp");
for Library_Auto_Init use "False";
for Library_Name use "gnat";
for Library_Kind use "static";
for Library_Dir use "adalib";
for Object_Dir use "obj";
for Source_Dirs use ("adainclude");
package Compiler is
CFLAGS := ("-O2", "-fcallgraph-info=su,da",
"-ffunction-sections", "-fdata-sections");
ALL_ADAFLAGS := ("-gnatpgn", "-nostdinc") & CFLAGS;
ALL_CFLAGS := ("-DIN_RTS") & CFLAGS;
NO_SIBLING_ADAFLAGS :=("-fno-optimize-sibling-calls");
NO_REORDER_ADAFLAGS :=("-fno-toplevel-reorder");
for Switches ("C") use ALL_CFLAGS;
for Switches ("Ada") use ALL_ADAFLAGS;
for Switches ("s-traceb.adb") use ALL_ADAFLAGS & ("-g")
& NO_SIBLING_ADAFLAGS & ("-fno-inline-functions-called-once");
for Switches ("s-tasdeb.adb") use ALL_ADAFLAGS & ("-g", "-O0");
for Switches ("a-except.adb") use ALL_ADAFLAGS
& ("-g", "-O1", "-fno-inline") & NO_REORDER_ADAFLAGS;
for Switches ("s-excdeb.adb") use ALL_ADAFLAGS & ("-g", "-O0");
for Switches ("s-assert.adb") use ALL_ADAFLAGS & ("-g");
for Switches ("a-tags.adb") use ALL_ADAFLAGS & ("-g");
end Compiler;
end Runtime_Build;