This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Add --coverage support


The Ada compiler doesn't use cc1_options.

Fixed thusly, tested on i586-suse-linux, applied on the mainline.


2008-11-15  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.c (cc1_options): Fix comment.
ada/
	* gcc-interface/lang-specs.h: Expand -coverage and reorder switches.


-- 
Eric Botcazou
Index: gcc.c
===================================================================
--- gcc.c	(revision 141880)
+++ gcc.c	(working copy)
@@ -823,7 +823,7 @@ static const char *cpp_options =
    output will be used by another program.  */
 static const char *cpp_debug_options = "%{d*}";
 
-/* NB: This is shared amongst all front-ends.  */
+/* NB: This is shared amongst all front-ends, except for Ada.  */
 static const char *cc1_options =
 "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
  %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*}\
Index: ada/gcc-interface/lang-specs.h
===================================================================
--- ada/gcc-interface/lang-specs.h	(revision 141880)
+++ ada/gcc-interface/lang-specs.h	(working copy)
@@ -35,14 +35,15 @@
  gnat1 %{I*} %{k8:-gnatk8} %{Wall:-gnatwa} %{w:-gnatws} %{!Q:-quiet}\
     %{nostdinc*} %{nostdlib*}\
     -dumpbase %{.adb:%b.adb}%{.ads:%b.ads}%{!.adb:%{!.ads:%b.ada}}\
-    %{O*} %{W*} %{w} %{p} %{pg:-p} %{a} %{f*} %{d*}\
-    %{gnatea:-gnatez} %{g*&m*} "
-#if defined(TARGET_VXWORKS_RTP)
-   "%{fRTS=rtp:-mrtp} "
-#endif
+    %{O*} %{W*} %{w} %{p} %{pg:-p} %{a} %{d*} %{f*}\
+    %{coverage:-fprofile-arcs -ftest-coverage} "
 #if CONFIG_DUAL_EXCEPTIONS
    "%{fRTS=sjlj:-fsjlj} "
 #endif
+   "%{gnatea:-gnatez} %{g*&m*} "
+#if defined(TARGET_VXWORKS_RTP)
+   "%{fRTS=rtp:-mrtp} "
+#endif
    "%1 %{!S:%{o*:%w%*-gnatO}} \
     %i %{S:%W{o*}%{!o*:-o %b.s}} \
     %{gnatc*|gnats*: -o %j} %{-param*} \

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]