Skip to content

Commit

Permalink
Add bareboard safe target
Browse files Browse the repository at this point in the history
  • Loading branch information
dinkelk committed Aug 6, 2024
1 parent 9713c59 commit 6fcea3f
Showing 1 changed file with 29 additions and 0 deletions.
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 6fcea3f

Please sign in to comment.