Commit cb8c960e by Alexandre Oliva Committed by Alexandre Oliva

[Ada] use -gnatd_A to disable .ali on -fcompare-debug recompile

for  gcc/ada/ChangeLog

	* gcc-interface/lang-specs.h (default_compilers): When given
	fcompare-debug-second, adjust auxbase like cc1, and pass
	gnatd_A.
	* gcc-interface/misc.c (flag_compare_debug): Remove variable.
	(gnat_post_options): Do not set it.
	* lib-writ.adb (flag_compare_debug): Remove import.
	(Write_ALI): Do not test it.

From-SVN: r264732
parent f89d27f2
2018-09-30 Alexandre Oliva <oliva@adacore.com>
* gcc-interface/lang-specs.h (default_compilers): When given
fcompare-debug-second, adjust auxbase like cc1, and pass
gnatd_A.
* gcc-interface/misc.c (flag_compare_debug): Remove variable.
(gnat_post_options): Do not set it.
* lib-writ.adb (flag_compare_debug): Remove import.
(Write_ALI): Do not test it.
2018-09-28 Eric Botcazou <ebotcazou@adacore.com> 2018-09-28 Eric Botcazou <ebotcazou@adacore.com>
Pierre-Marie de Rodat <derodat@adacore.com> Pierre-Marie de Rodat <derodat@adacore.com>
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
gnat1 %{I*} %{k8:-gnatk8} %{Wall:-gnatwa} %{w:-gnatws} %{!Q:-quiet}\ gnat1 %{I*} %{k8:-gnatk8} %{Wall:-gnatwa} %{w:-gnatws} %{!Q:-quiet}\
%{nostdinc*} %{nostdlib*}\ %{nostdinc*} %{nostdlib*}\
-dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\ -dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\
%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} \ %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b) -gnatd_A} \
%{!fcompare-debug-second:%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}}} \
%{O*} %{W*} %{w} %{p} %{pg:-p} %{d*} \ %{O*} %{W*} %{w} %{p} %{pg:-p} %{d*} \
%{coverage:-fprofile-arcs -ftest-coverage} " %{coverage:-fprofile-arcs -ftest-coverage} "
#if defined(TARGET_VXWORKS_RTP) #if defined(TARGET_VXWORKS_RTP)
......
...@@ -77,9 +77,6 @@ int optimize; ...@@ -77,9 +77,6 @@ int optimize;
#undef optimize_size #undef optimize_size
int optimize_size; int optimize_size;
#undef flag_compare_debug
int flag_compare_debug;
#undef flag_short_enums #undef flag_short_enums
int flag_short_enums; int flag_short_enums;
...@@ -284,7 +281,6 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) ...@@ -284,7 +281,6 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED)
gnat_encodings = global_options.x_gnat_encodings; gnat_encodings = global_options.x_gnat_encodings;
optimize = global_options.x_optimize; optimize = global_options.x_optimize;
optimize_size = global_options.x_optimize_size; optimize_size = global_options.x_optimize_size;
flag_compare_debug = global_options.x_flag_compare_debug;
flag_stack_check = global_options.x_flag_stack_check; flag_stack_check = global_options.x_flag_stack_check;
flag_short_enums = global_options.x_flag_short_enums; flag_short_enums = global_options.x_flag_short_enums;
......
...@@ -226,10 +226,6 @@ package body Lib.Writ is ...@@ -226,10 +226,6 @@ package body Lib.Writ is
Num_Sdep : Nat := 0; Num_Sdep : Nat := 0;
-- Number of active entries in Sdep_Table -- Number of active entries in Sdep_Table
flag_compare_debug : Int;
pragma Import (C, flag_compare_debug);
-- Import from toplev.c
----------------------- -----------------------
-- Local Subprograms -- -- Local Subprograms --
----------------------- -----------------------
...@@ -1079,9 +1075,7 @@ package body Lib.Writ is ...@@ -1079,9 +1075,7 @@ package body Lib.Writ is
-- We never write an ALI file if the original operating mode was -- We never write an ALI file if the original operating mode was
-- syntax-only (-gnats switch used in compiler invocation line) -- syntax-only (-gnats switch used in compiler invocation line)
if Original_Operating_Mode = Check_Syntax if Original_Operating_Mode = Check_Syntax then
or flag_compare_debug /= 0
then
return; return;
end if; end if;
......
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