diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2025-02-11 01:26:43 +0000 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2025-02-11 01:26:43 +0000 |
commit | 3c5422e719d1fbabccaa9b63605171ea8bdfe57e (patch) | |
tree | 4cb9730c1494333982b9bcd7abbd8c0c7f001e8c /gcc | |
parent | a7ccad4a2e08651fbf3628a45cd1d06785192a79 (diff) | |
download | gcc-3c5422e719d1fbabccaa9b63605171ea8bdfe57e.zip gcc-3c5422e719d1fbabccaa9b63605171ea8bdfe57e.tar.gz gcc-3c5422e719d1fbabccaa9b63605171ea8bdfe57e.tar.bz2 |
PR modula2/118761: gm2 driver doesnt behave as gcc for -fhelp=BLA
This patch enables the gm2 driver to handle -fsyntax-only -fhelp=optimizers,
for example, correctly without terminating with gm2: fatal error:
no input files.
gcc/m2/ChangeLog:
PR modula2/118761
* gm2spec.cc (lang_specific_driver): Add case clauses for
OPT__help, OPT__help_ set in_added_libraries to 0 and early
return.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/m2/gm2spec.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/m2/gm2spec.cc b/gcc/m2/gm2spec.cc index a9dc470..868e5c5 100644 --- a/gcc/m2/gm2spec.cc +++ b/gcc/m2/gm2spec.cc @@ -576,6 +576,12 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, args[i] |= SKIPOPT; /* We will add the option if it is needed. */ m2_path_name = decoded_options[i].arg; break; + case OPT__help: + case OPT__help_: + /* Let gcc.cc handle this, as it has a really + cool facility for handling --help and --verbose --help. */ + *in_added_libraries = 0; + return; case OPT_I: args[i] |= SKIPOPT; /* We will add the option if it is needed. */ push_back_Ipath (decoded_options[i].arg); |