Skip to content

Commit

Permalink
Merge pull request #66 from dinkelk/bareboard_updates
Browse files Browse the repository at this point in the history
Bareboard Target Updates
  • Loading branch information
dinkelk authored Aug 6, 2024
2 parents 819fa42 + 6fcea3f commit 253767d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
6 changes: 6 additions & 0 deletions redo/targets/gpr/a_bareboard_development.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ abstract project a_bareboard_development extends all "a_bareboard_production.gpr
-- This combined with Initialize_Scalars, below, greatly aids in discovering uninitializated
-- variable bugs.
("-gnatVa");

for Switches ("C") use a_bareboard_base.Compiler'Switches ("C");

for Switches ("C++") use a_bareboard_base.Compiler'Switches ("C++");

for Switches ("Asm_Cpp") use a_bareboard_base.Compiler'Switches ("Asm_Cpp");
end Compiler;

end a_bareboard_development;
4 changes: 4 additions & 0 deletions redo/targets/gpr/a_bareboard_production.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ abstract project a_bareboard_production extends all "a_bareboard_base.gpr" is
-- optimization
("-O2");

for Switches ("C++") use a_bareboard_base.Compiler'Switches ("C++") &
-- optimization
("-O2");

for Switches ("Asm_Cpp") use a_bareboard_base.Compiler'Switches ("Asm_Cpp") &
-- optimization
("-O2");
Expand Down
29 changes: 29 additions & 0 deletions redo/targets/gpr/a_bareboard_safe.gpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
abstract project a_bareboard_safe extends all "a_bareboard_base.gpr" is

-- This is a "safe" target which has no optimization and no runtime checks enabled.
-- It is meant for "fallback" images, which need to have substantially different binaries
-- than production images to work around compiler bugs and boot loops caused from Ada
-- runtime checks. It is recommended to pair this with a runtime that also has optimizations
-- disabled.
package Compiler is
-- Add preprocessor definitions and configuration pragma switches:
for Switches ("Ada") use a_bareboard_base.Compiler'Switches ("Ada") &
-- No optimization
("-O0") &
-- Suppress ALL runtime checking;
("-gnatp");

for Switches ("C") use a_bareboard_base.Compiler'Switches ("C") &
-- No optimization
("-O0");

for Switches ("C++") use a_bareboard_base.Compiler'Switches ("C++") &
-- No optimization
("-O0");

for Switches ("Asm_Cpp") use a_bareboard_base.Compiler'Switches ("Asm_Cpp") &
-- No optimization
("-O0");
end Compiler;

end a_bareboard_safe;

0 comments on commit 253767d

Please sign in to comment.