(root)/
gcc-13.2.0/
gcc/
m2/
lang-specs.h
       1  /* Definitions for specs for GNU Modula-2.
       2     Copyright (C) 2001-2023 Free Software Foundation, Inc.
       3     Contributed by Gaius Mulley.
       4  
       5  This file is part of GCC.
       6  
       7  GCC is free software; you can redistribute it and/or modify
       8  it under the terms of the GNU General Public License as published by
       9  the Free Software Foundation; either version 3, or (at your option)
      10  any later version.
      11  
      12  GCC is distributed in the hope that it will be useful,
      13  but WITHOUT ANY WARRANTY; without even the implied warranty of
      14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      15  GNU General Public License for more details.
      16  
      17  You should have received a copy of the GNU General Public License
      18  along with GCC; see the file COPYING3.  If not see
      19  <http://www.gnu.org/licenses/>.  */
      20  
      21  /* This is the contribution to the `default_compilers' array in gcc.c for
      22     GNU Modula-2.  */
      23  
      24  /* A spec for the 'integrated' preprocessor implementation for Modula-2.  */
      25  #define M2CPP \
      26    "%{E|M|MM|fcpp: %{E} -fcpp-begin " \
      27    "      %{!E:-E} %(cpp_unique_options) -traditional-cpp -ansi " \
      28    "      -fcpp-end %{B*} %{save-temps*} ; \
      29       : %{v} %I %{B*} %{save-temps*} } "
      30  
      31  /* We have three modes:
      32     1. When the preprocessing step is explict and there is no following
      33        compilation.  Here we do a similar process to cc1 -E where most of
      34        the compilation is short-circuited.
      35     2. When we are mimicking an integrated preprocessor.  Here we use the
      36        modula-2 'fcpp' to construct a command line for the preprocessor and
      37        snarf save-temps and dumpdir inputs to try and be consistent.
      38     3. We can consume a pre-processed modula-2 source.  */
      39  
      40    {".mod", "@modula-2", 0, 0, 0},
      41    {"@modula-2",
      42     /* For preprocessing we use cc1 but wrap it in cc1gm2.  */
      43     "%{E|M|MM:\
      44        cc1gm2 " M2CPP " %{!fcpp:-fcpp;:%{fcpp}} %{fm2-pathname*} %i } \
      45      %{!E:%{!M:%{!MM:\
      46        cc1gm2 " M2CPP " %(cc1_options) %{fm2-pathname*} %i %{c} \
      47        %{!fcpp:%{MD|MMD|MF*: \
      48  		%eto generate dependencies you must specify '-fcpp' }} \
      49        %{!fsyntax-only:%(invoke_as)} \
      50      }}}", 0, 0, 0},
      51    {".m2i", "@modula-2-cpp-output", 0, 0, 0},
      52    {"@modula-2-cpp-output",
      53     "%{!M:%{!MM:%{!E: \
      54        cc1gm2 %<fcpp %(cc1_options) %{v} %I -fmod=.mod.m2i -fdef=.def.m2i \
      55          %{fm2-pathname*} \
      56  	-fpreprocessed %i %{c} \
      57      %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},