]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/m2/lang-specs.h
Update copyright years.
[thirdparty/gcc.git] / gcc / m2 / lang-specs.h
CommitLineData
1eee94d3 1/* Definitions for specs for GNU Modula-2.
a945c346 2 Copyright (C) 2001-2024 Free Software Foundation, Inc.
1eee94d3
GM
3 Contributed by Gaius Mulley.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along 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
80cf2c5e 24/* A spec for the 'integrated' preprocessor implementation for Modula-2. */
47b269ca 25#define M2CPP \
ef6696af 26 "%{E|M|MM|fcpp: %{E} %{MF} -fcpp-begin " \
80cf2c5e
IS
27 " %{!E:-E} %(cpp_unique_options) -traditional-cpp -ansi " \
28 " -fcpp-end %{B*} %{save-temps*} ; \
83979240 29 : %{v} %I %{B*} %{save-temps*} } "
80cf2c5e 30
ef6696af
GM
31#define MDMMD \
32 " %{MD:-MD %{!o:%b.d}%{o*:%.d%*} %{!MT:-MT %b%O} %{MT} %{MQ} %{MF}} " \
33 " %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*} %{!MT:-MT %b%O} %{MT} %{MQ} %{MF}} "
34
80cf2c5e
IS
35/* We have three modes:
36 1. When the preprocessing step is explict and there is no following
37 compilation. Here we do a similar process to cc1 -E where most of
38 the compilation is short-circuited.
39 2. When we are mimicking an integrated preprocessor. Here we use the
40 modula-2 'fcpp' to construct a command line for the preprocessor and
41 snarf save-temps and dumpdir inputs to try and be consistent.
42 3. We can consume a pre-processed modula-2 source. */
1eee94d3
GM
43
44 {".mod", "@modula-2", 0, 0, 0},
45 {"@modula-2",
80cf2c5e
IS
46 /* For preprocessing we use cc1 but wrap it in cc1gm2. */
47 "%{E|M|MM:\
05652ac4 48 cc1gm2 " M2CPP " %{!fcpp:-fcpp;:%{fcpp}} %{fm2-pathname*} %i } \
80cf2c5e 49 %{!E:%{!M:%{!MM:\
ef6696af 50 cc1gm2 " M2CPP MDMMD " %(cc1_options) %{fm2-pathname*} %i %{c} \
80cf2c5e
IS
51 %{!fsyntax-only:%(invoke_as)} \
52 }}}", 0, 0, 0},
53 {".m2i", "@modula-2-cpp-output", 0, 0, 0},
54 {"@modula-2-cpp-output",
55 "%{!M:%{!MM:%{!E: \
05652ac4
GM
56 cc1gm2 %<fcpp %(cc1_options) %{v} %I -fmod=.mod.m2i -fdef=.def.m2i \
57 %{fm2-pathname*} \
80cf2c5e
IS
58 -fpreprocessed %i %{c} \
59 %{!fsyntax-only:%(invoke_as)}}}}", 0, 0, 0},