Commit 8f0097d7 authored by Maxime Perrotin's avatar Maxime Perrotin

Update gpr files for C++ compilation flags

parent c25434f1
Pipeline #1932 passed with stage
in 9 minutes and 1 second
......@@ -21,7 +21,7 @@ simulate:
debug_native:
@@TABLE@@
gprbuild -p -P @_LOWER:Partition_Names_@.gpr -XCFG="Debug" -cargs:C -DSTATIC=""
gprbuild -v -p -P @_LOWER:Partition_Names_@.gpr -XCFG="Debug" -cargs:C -DSTATIC=""
@@END_TABLE@@
debug_rtems_leon3_with_ada:
......
......@@ -146,36 +146,26 @@ project @_CAPITALIZE:Name_@ is
"remote_configuration.cc");
package Compiler is
Common_C_Switches :=
("-DTARGET=native",
"-DPOSIX",
"-D_POSIX_SOURCE",
"-D_GNU_SOURCE",
"-Wall",
"-Wextra",
"-fdiagnostics-show-option",
"-Wcast-align",
"-Wswitch")
& external_as_list("@_UPPER:Name_@_USER_CFLAGS", " ")
& external_as_list("USER_CFLAGS", " ");
case Build is
when "Release" =>
for Default_Switches ("C") use
("-g",
"-O2",
"-DTARGET=native",
"-DPOSIX",
"-D_POSIX_SOURCE",
"-D_GNU_SOURCE",
"-Wall",
"-Wextra",
"-fdiagnostics-show-option",
"-Wcast-align",
"-Wswitch")
& external_as_list("@_UPPER:Name_@_USER_CFLAGS", " ")
& external_as_list("USER_CFLAGS", " ");
for Default_Switches ("C") use Common_C_Switches & ("-O2", "-DNDEBUG");
for Default_Switches ("C++") use Common_C_Switches & ("-O2", "-DNDEBUG");
when "Debug" =>
for Default_Switches ("C") use
("-g",
"-DTARGET=native",
"-DPOSIX",
"-D_POSIX_SOURCE",
"-D_GNU_SOURCE",
"-Wall",
"-Wextra",
"-fdiagnostics-show-option",
"-Wcast-align",
"-Wswitch")
& external_as_list("@_UPPER:Name_@_USER_CFLAGS", " ")
& external_as_list("USER_CFLAGS", " ");
for Default_Switches ("C") use Common_C_Switches & ("-g", "-O0");
for Default_Switches ("C++") use Common_C_Switches & ("-g", "-O0");
end case;
-- Increase command line size to avoid using --specs and support ccache
-- Disable for now - does not work with gprbuild in debian9
......@@ -183,7 +173,7 @@ project @_CAPITALIZE:Name_@ is
end Compiler;
package Linker is
for Default_Switches ("C") use
Common_LD_Switches :=
("-g",
"-lrt",
"-lpthread",
......@@ -191,6 +181,15 @@ project @_CAPITALIZE:Name_@ is
"-Wl,-gc-sections")
& external_as_list("@_UPPER:Name_@_USER_LDFLAGS", " ")
& external_as_list("USER_LDFLAGS", " ");
case Build is
when "Release" =>
for Default_Switches ("C") use Common_LD_Switches;
for Default_Switches ("C++") use Common_LD_Switches;
when "Debug" =>
for Default_Switches ("C") use Common_LD_Switches & "-g";
for Default_Switches ("C++") use Common_LD_Switches & "-g";
end case;
end Linker;
package Builder is
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment