This commit adds a new common command-line option to the compiler driver (-static-libga68) as well as several other front-end specific options.
Signed-off-by: Jose E. Marchesi <[email protected]> gcc/ChangeLog * algol68/lang.opt: New file. * algol68/lang.opt.urls: Generate. * common.opt: New option -static-libga68. * common.opt.urls: Generate. * gcc.cc: Handle OPT_static_libga68. * regenerate-opt-urls.py (PER_LANGUAGE_OPTION_INDEXES): Add Algol68. --- gcc/algol68/lang.opt | 102 +++++++++++++++++++++++++++++++++++++ gcc/algol68/lang.opt.urls | 41 +++++++++++++++ gcc/common.opt | 3 ++ gcc/common.opt.urls | 3 ++ gcc/gcc.cc | 2 + gcc/regenerate-opt-urls.py | 3 +- 6 files changed, 153 insertions(+), 1 deletion(-) create mode 100644 gcc/algol68/lang.opt create mode 100644 gcc/algol68/lang.opt.urls diff --git a/gcc/algol68/lang.opt b/gcc/algol68/lang.opt new file mode 100644 index 00000000000..cb13724ffb5 --- /dev/null +++ b/gcc/algol68/lang.opt @@ -0,0 +1,102 @@ +; Options for the Algol 68 front end. +; Copyright (C) 2025 Free Software Foundation, Inc. +; +; GCC is free software; you can redistribute it and/or modify it under +; the terms of the GNU General Public License as published by the Free +; Software Foundation; either version 3, or (at your option) any later +; version. +; +; GCC is distributed in the hope that it will be useful, but WITHOUT ANY +; WARRANTY; without even the implied warranty of MERCHANTABILITY or +; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +; for more details. +; +; You should have received a copy of the GNU General Public License +; along with GCC; see the file COPYING3. If not see +; <http://www.gnu.org/licenses/>. + +; See the GCC internals manual for a description of this file's format. + +; Please try to keep this file in ASCII collating order. + +; Describes command-line options used by this frontend + +Language +Algol68 + +I +Algol68 Joined Separate +; Documented in c-family/c.opt + +Wextensions +Algol68 Warning Var(warn_algol68_extensions) LangEnabledBy(Algol68, Wextra) +Warn for usage of non-portable extensions of Algol 68. + +Wvoiding +Algol68 Warning Var(warn_algol68_voiding) LangEnabledBy(Algol68, Wextra) +Warn when voiding occurs. + +Wextra +Algol68 Warning +; Documented in common.opt + +Wscope +Algol68 Warning Var(warn_algol68_scope) +Warn for potential name scope violations. + +Whidden-declarations +Algol68 Warning Var(warn_algol68_hidden_declarations) +Warn for hidden declarations in inner scopes. + +fbrackets +Algol68 Var(flag_brackets) +-fbrackets Consider [ .. ] and { .. } as being equivalent to ( .. ). + +fassert +Algol68 Var(flag_assert) +Generate code for assert contracts. + +fcheck= +Algol68 RejectNegative JoinedOrMissing +-fcheck=[...] Specify which runtime checks are to be performed. + +fa68-dump-modes +Algol68 Var(flag_a68_dump_modes) +Dump Algol 68 modes after parsing. + +fa68-dump-ast +Algol68 Var(flag_a68_dump_ast) +Dump Algol 68 parse tree after parsing. + +static-libga68 +Driver +Link the GNU Algol run-time library statically in the compilation. + +shared-libga68 +Driver +Link the GNU Algol 68 run-time library dynamically in the compilation. + +std=algol68 +Algol68 +Compile strict Algol 68 as defined by the Revised Report + +std=gnu68 +Algol68 +Accept GNU extensions to Algol 68 + +; Stropping regimes. + +fstropping= +Algol68 Joined RejectNegative Enum(stropping_regime) Var(flag_stropping_regime) +-fstropping=[upper|supper] Stropping regime to expect in Algol 68 programs. + +Enum +Name(stropping_regime) Type(int) UnknownError(unknown stropping_regime setting %qs) + +EnumValue +Enum(stropping_regime) String(upper) Value(0) + +EnumValue +Enum(stropping_regime) String(supper) Value(1) + +; This comment is to ensure we retain the blank line above. diff --git a/gcc/algol68/lang.opt.urls b/gcc/algol68/lang.opt.urls new file mode 100644 index 00000000000..df303b98f6a --- /dev/null +++ b/gcc/algol68/lang.opt.urls @@ -0,0 +1,41 @@ +; Autogenerated by regenerate-opt-urls.py from gcc/algol68/lang.opt and generated HTML + +I +UrlSuffix(gcc/Directory-Options.html#index-I) LangUrlSuffix_D(gdc/Directory-Options.html#index-I) LangUrlSuffix_Algol68(ga68/Directory-options.html#index-I) + +Wextensions +LangUrlSuffix_Algol68(ga68/Warnings-options.html#index-Wextensions) + +Wvoiding +LangUrlSuffix_Algol68(ga68/Warnings-options.html#index-Wno-voiding) + +Wextra +UrlSuffix(gcc/Warning-Options.html#index-Wextra) LangUrlSuffix_D(gdc/Warnings.html#index-Wextra) LangUrlSuffix_Fortran(gfortran/Error-and-Warning-Options.html#index-Wextra) + +Wscope +LangUrlSuffix_Algol68(ga68/Warnings-options.html#index-Wno-scope) + +Whidden-declarations +LangUrlSuffix_Algol68(ga68/Warnings-options.html#index-Whidden-declarations) + +fbrackets +LangUrlSuffix_Algol68(ga68/Dialect-options.html#index-fbrackets) + +fassert +LangUrlSuffix_D(gdc/Runtime-Options.html#index-fassert) LangUrlSuffix_Algol68(ga68/Runtime-options.html#index-fassert) + +fcheck= +LangUrlSuffix_Fortran(gfortran/Code-Gen-Options.html#index-fcheck) LangUrlSuffix_Algol68(ga68/Runtime-options.html#index-fcheck) + +fa68-dump-modes +LangUrlSuffix_Algol68(ga68/Developer-options.html#index-fa68-dump-modes) + +fa68-dump-ast +LangUrlSuffix_Algol68(ga68/Developer-options.html#index-fa68-dump-ast) + +static-libga68 +LangUrlSuffix_Algol68(ga68/Linking-options.html#index-static-libga68) + +shared-libga68 +LangUrlSuffix_Algol68(ga68/Linking-options.html#index-shared-libga68) + diff --git a/gcc/common.opt b/gcc/common.opt index 9b8fbf6a684..c7440ba4623 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3968,6 +3968,9 @@ Driver Joined static Driver +static-libga68 +Driver + static-libgcc Driver diff --git a/gcc/common.opt.urls b/gcc/common.opt.urls index 828db53d3e6..76805744839 100644 --- a/gcc/common.opt.urls +++ b/gcc/common.opt.urls @@ -1934,6 +1934,9 @@ UrlSuffix(gcc/Overall-Options.html#index-specs) ; duplicate: 'gcc/Darwin-Options.html#index-static-1' ; duplicate: 'gcc/Link-Options.html#index-static' +static-libga68 +LangUrlSuffix_Algol68(ga68/Linking-options.html#index-static-libga68) + static-libgcc UrlSuffix(gcc/Link-Options.html#index-static-libgcc) diff --git a/gcc/gcc.cc b/gcc/gcc.cc index eae7f07d962..540958de797 100644 --- a/gcc/gcc.cc +++ b/gcc/gcc.cc @@ -4645,11 +4645,13 @@ driver_handle_option (struct gcc_options *opts, case OPT_static_libgfortran: case OPT_static_libquadmath: case OPT_static_libphobos: + case OPT_static_libga68: case OPT_static_libgm2: case OPT_static_libstdc__: /* These are always valid; gcc.cc itself understands the first two gfortranspec.cc understands -static-libgfortran, libgfortran.spec handles -static-libquadmath, + a68spec.cc understands -static-libga68, d-spec.cc understands -static-libphobos, gm2spec.cc understands -static-libgm2, and g++spec.cc understands -static-libstdc++. */ diff --git a/gcc/regenerate-opt-urls.py b/gcc/regenerate-opt-urls.py index 2daa1d603f0..bda91905ace 100755 --- a/gcc/regenerate-opt-urls.py +++ b/gcc/regenerate-opt-urls.py @@ -361,7 +361,8 @@ def write_url_file(index, optfile, dstfile): PER_LANGUAGE_OPTION_INDEXES = [ ('gcc/Option-Index.html', None), ('gdc/Option-Index.html', 'D'), - ('gfortran/Option-Index.html', 'Fortran') + ('gfortran/Option-Index.html', 'Fortran'), + ('ga68/Option-Index.html', 'Algol68'), ] def main(args): -- 2.30.2
