Commit 256a105a by Doug Evans

(default_compilers): Pass -MG to cpp if present.

(option_map): New option --print-missing-file-dependencies/-MG.

From-SVN: r7392
parent 44f51d4a
...@@ -503,7 +503,7 @@ static struct compiler default_compilers[] = ...@@ -503,7 +503,7 @@ static struct compiler default_compilers[] =
{"@c", {"@c",
"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ "cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%{!undef:%{!ansi:%p} %P} %{trigraphs} \ %{!undef:%{!ansi:%p} %P} %{trigraphs} \
...@@ -524,7 +524,7 @@ static struct compiler default_compilers[] = ...@@ -524,7 +524,7 @@ static struct compiler default_compilers[] =
{"-", {"-",
"%{E:cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ "%{E:cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%{!undef:%{!ansi:%p} %P} %{trigraphs}\ %{!undef:%{!ansi:%p} %P} %{trigraphs}\
...@@ -537,7 +537,7 @@ static struct compiler default_compilers[] = ...@@ -537,7 +537,7 @@ static struct compiler default_compilers[] =
{"@objective-c", {"@objective-c",
"cpp -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ "cpp -lang-objc %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__OBJC__ -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ -undef -D__OBJC__ -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%{!undef:%{!ansi:%p} %P} %{trigraphs}\ %{!undef:%{!ansi:%p} %P} %{trigraphs}\
...@@ -561,7 +561,7 @@ static struct compiler default_compilers[] = ...@@ -561,7 +561,7 @@ static struct compiler default_compilers[] =
"%{!E:%eCompilation of header file requested} \ "%{!E:%eCompilation of header file requested} \
cpp %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ cpp %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} \ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__}\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
%{!undef:%{!ansi:%p} %P} %{trigraphs}\ %{!undef:%{!ansi:%p} %P} %{trigraphs}\
...@@ -576,7 +576,7 @@ static struct compiler default_compilers[] = ...@@ -576,7 +576,7 @@ static struct compiler default_compilers[] =
{"@c++", {"@c++",
"cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ "cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
%{C:%{!E:%eGNU C++ does not support -C without using -E}}\ %{C:%{!E:%eGNU C++ does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} \ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
-undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\ -undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
%{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\ %{ansi:-trigraphs -$ -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
%c %{O*:%{!O0:-D__OPTIMIZE__}} %{traditional} %{ftraditional:-traditional}\ %c %{O*:%{!O0:-D__OPTIMIZE__}} %{traditional} %{ftraditional:-traditional}\
...@@ -624,7 +624,7 @@ static struct compiler default_compilers[] = ...@@ -624,7 +624,7 @@ static struct compiler default_compilers[] =
{"@assembler-with-cpp", {"@assembler-with-cpp",
"cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
%{C:%{!E:%eGNU C does not support -C without using -E}}\ %{C:%{!E:%eGNU C does not support -C without using -E}}\
%{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{trigraphs} \ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} %{trigraphs}\
-undef -$ %{!undef:%p %P} -D__ASSEMBLER__ \ -undef -$ %{!undef:%p %P} -D__ASSEMBLER__ \
%c %{O*:%{!O0:-D__OPTIMIZE__}} %{traditional} %{ftraditional:-traditional}\ %c %{O*:%{!O0:-D__OPTIMIZE__}} %{traditional} %{ftraditional:-traditional}\
%{traditional-cpp:-traditional}\ %{traditional-cpp:-traditional}\
...@@ -765,6 +765,7 @@ struct option_map option_map[] = ...@@ -765,6 +765,7 @@ struct option_map option_map[] =
{"--user-dependencies", "-MM", 0}, {"--user-dependencies", "-MM", 0},
{"--write-dependencies", "-MD", 0}, {"--write-dependencies", "-MD", 0},
{"--write-user-dependencies", "-MMD", 0}, {"--write-user-dependencies", "-MMD", 0},
{"--print-missing-file-dependencies", "-MG", 0},
{"--optimize", "-O", "oj"}, {"--optimize", "-O", "oj"},
{"--no-line-commands", "-P", 0}, {"--no-line-commands", "-P", 0},
{"--assemble", "-S", 0}, {"--assemble", "-S", 0},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment