public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] modula-2: Handle pass '-v' option to the compiler.
@ 2023-01-13  0:19 Iain Sandoe
  2023-01-13  1:43 ` Gaius Mulley
  0 siblings, 1 reply; 2+ messages in thread
From: Iain Sandoe @ 2023-01-13  0:19 UTC (permalink / raw)
  To: gcc-patches; +Cc: gaiusmod2

Tested on x86-64-darwin21.
OK for trunk?
Iain

--- 8< ---

Somehow this setting had been missed, and we really need the verbose
flag to enable useful debug output.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

gcc/m2/ChangeLog:

	* gm2-gcc/m2options.h (M2Options_SetVerbose): Export the
	function.
	* gm2-lang.cc: Handle OPT_v, passing it to the compiler.
	* lang-specs.h: Pass -v to cc1gm2.
---
 gcc/m2/gm2-gcc/m2options.h | 1 +
 gcc/m2/gm2-lang.cc         | 3 +++
 gcc/m2/lang-specs.h        | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/gcc/m2/gm2-gcc/m2options.h b/gcc/m2/gm2-gcc/m2options.h
index 4b32c911b09..beaa460ffa9 100644
--- a/gcc/m2/gm2-gcc/m2options.h
+++ b/gcc/m2/gm2-gcc/m2options.h
@@ -106,6 +106,7 @@ EXTERN int M2Options_GetCpp (void);
 EXTERN int M2Options_GetM2g (void);
 EXTERN void M2Options_SetM2g (int value);
 EXTERN void M2Options_SetLowerCaseKeywords (int value);
+EXTERN void M2Options_SetVerbose (int value);
 EXTERN void M2Options_SetUnusedVariableChecking (int value);
 EXTERN void M2Options_SetUnusedParameterChecking (int value);
 EXTERN void M2Options_SetStrictTypeChecking (int value);
diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc
index 49f93901d3c..073d1dd55db 100644
--- a/gcc/m2/gm2-lang.cc
+++ b/gcc/m2/gm2-lang.cc
@@ -451,6 +451,9 @@ gm2_langhook_handle_option (
     case OPT_save_temps_:
       M2Options_SetSaveTempsDir (arg);
       return 1;
+    case OPT_v:
+      M2Options_SetVerbose (value);
+      return 1;
     default:
       if (insideCppArgs)
 	{
diff --git a/gcc/m2/lang-specs.h b/gcc/m2/lang-specs.h
index 0a34b0bc6d7..bf882649b21 100644
--- a/gcc/m2/lang-specs.h
+++ b/gcc/m2/lang-specs.h
@@ -34,6 +34,6 @@ along with GCC; see the file COPYING3.  If not see
   {"@modula-2",
       "cc1gm2 " M2CPP
       "      %(cc1_options) %{B*} %{c*} %{+e*} %{I*} "
-      "      %{i*} %{save-temps*} "
+      "      %{i*} %{save-temps*} %{v} "
       "      %i %{!fsyntax-only:%(invoke_as)}",
       0, 0, 0},
-- 
2.37.1 (Apple Git-137.1)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] modula-2: Handle pass '-v' option to the compiler.
  2023-01-13  0:19 [PATCH] modula-2: Handle pass '-v' option to the compiler Iain Sandoe
@ 2023-01-13  1:43 ` Gaius Mulley
  0 siblings, 0 replies; 2+ messages in thread
From: Gaius Mulley @ 2023-01-13  1:43 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: gcc-patches, iain

Iain Sandoe <iains.gcc@gmail.com> writes:

> Tested on x86-64-darwin21.
> OK for trunk?
> Iain

yes LGTM,

thanks,
Gaius

> --- 8< ---
>
> Somehow this setting had been missed, and we really need the verbose
> flag to enable useful debug output.
>
> Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
>
> gcc/m2/ChangeLog:
>
> 	* gm2-gcc/m2options.h (M2Options_SetVerbose): Export the
> 	function.
> 	* gm2-lang.cc: Handle OPT_v, passing it to the compiler.
> 	* lang-specs.h: Pass -v to cc1gm2.
> ---
>  gcc/m2/gm2-gcc/m2options.h | 1 +
>  gcc/m2/gm2-lang.cc         | 3 +++
>  gcc/m2/lang-specs.h        | 2 +-
>  3 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/gcc/m2/gm2-gcc/m2options.h b/gcc/m2/gm2-gcc/m2options.h
> index 4b32c911b09..beaa460ffa9 100644
> --- a/gcc/m2/gm2-gcc/m2options.h
> +++ b/gcc/m2/gm2-gcc/m2options.h
> @@ -106,6 +106,7 @@ EXTERN int M2Options_GetCpp (void);
>  EXTERN int M2Options_GetM2g (void);
>  EXTERN void M2Options_SetM2g (int value);
>  EXTERN void M2Options_SetLowerCaseKeywords (int value);
> +EXTERN void M2Options_SetVerbose (int value);
>  EXTERN void M2Options_SetUnusedVariableChecking (int value);
>  EXTERN void M2Options_SetUnusedParameterChecking (int value);
>  EXTERN void M2Options_SetStrictTypeChecking (int value);
> diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc
> index 49f93901d3c..073d1dd55db 100644
> --- a/gcc/m2/gm2-lang.cc
> +++ b/gcc/m2/gm2-lang.cc
> @@ -451,6 +451,9 @@ gm2_langhook_handle_option (
>      case OPT_save_temps_:
>        M2Options_SetSaveTempsDir (arg);
>        return 1;
> +    case OPT_v:
> +      M2Options_SetVerbose (value);
> +      return 1;
>      default:
>        if (insideCppArgs)
>  	{
> diff --git a/gcc/m2/lang-specs.h b/gcc/m2/lang-specs.h
> index 0a34b0bc6d7..bf882649b21 100644
> --- a/gcc/m2/lang-specs.h
> +++ b/gcc/m2/lang-specs.h
> @@ -34,6 +34,6 @@ along with GCC; see the file COPYING3.  If not see
>    {"@modula-2",
>        "cc1gm2 " M2CPP
>        "      %(cc1_options) %{B*} %{c*} %{+e*} %{I*} "
> -      "      %{i*} %{save-temps*} "
> +      "      %{i*} %{save-temps*} %{v} "
>        "      %i %{!fsyntax-only:%(invoke_as)}",
>        0, 0, 0},

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-13  1:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-13  0:19 [PATCH] modula-2: Handle pass '-v' option to the compiler Iain Sandoe
2023-01-13  1:43 ` Gaius Mulley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).