1
# DP: Replace -O1 and -O2 with -O3, unless the env var DEB_GCC_NO_O3 is set
6
static const char *find_file_spec_function (int, const char **);
7
static const char *find_plugindir_spec_function (int, const char **);
8
static const char *print_asm_header_spec_function (int, const char **);
9
+static const char *if_env_unset_spec_function (int, const char **);
10
static const char *compare_debug_dump_opt_spec_function (int, const char **);
11
static const char *compare_debug_self_opt_spec_function (int, const char **);
12
static const char *compare_debug_auxbase_opt_spec_function (int, const char **);
14
static const char *cpp_options =
15
"%(cpp_unique_options) %1 %{m*} %{std*&ansi&trigraphs} %{W*&pedantic*} %{w}\
16
%{f*} %{g*:%{!g0:%{g*} %{!fno-working-directory:-fworking-directory}}} %{O*}\
17
+ %{O1:%:if-env-unset(DEB_GCC_NO_O3 -O3)} %{O2:%:if-env-unset(DEB_GCC_NO_O3 -O3)}\
18
%{undef} %{save-temps*:-fpch-preprocess}";
20
/* This contains cpp options which are not passed when the preprocessor
22
%1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{a*}\
23
%{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} \
24
%{!fcompare-debug-second:%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}}%{!c:%{!S:-auxbase %b}} \
25
- %{g*} %{O*} %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\
26
+ %{g*} %{O*} %{O1:%:if-env-unset(DEB_GCC_NO_O3 -O3)} %{O2:%:if-env-unset(DEB_GCC_NO_O3 -O3)}\
27
+ %{W*&pedantic*} %{w} %{std*&ansi&trigraphs}\
28
%{v:-version} %{pg:-p} %{p} %{f*} %{undef}\
29
%{Qn:-fno-ident} %{--help:--help}\
30
%{--target-help:--target-help}\
32
{ "if-exists-else", if_exists_else_spec_function },
33
{ "replace-outfile", replace_outfile_spec_function },
34
{ "version-compare", version_compare_spec_function },
35
+ { "if-env-unset", if_env_unset_spec_function },
36
{ "include", include_spec_function },
37
{ "find-file", find_file_spec_function },
38
{ "find-plugindir", find_plugindir_spec_function },
39
@@ -9105,6 +9109,20 @@
43
+/* %:if-env-unset spec function. Add the second argument, if
44
+ if the environment variable (first argument) is not set. */
46
+if_env_unset_spec_function (int argc, const char**argv)
50
+ if (getenv (argv[0]) != NULL)
57
/* %:print-asm-header spec function. Print a banner to say that the
58
following output is from the assembler. */