This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch] Fix for PR31316


This patch fixes the case where a user specifies -S when compiling a
header file and the driver ends up passing down multiple -o options.

Regards,

Ryan Mansfield

gcc/ChangeLog:

2009-06-16 Ryan Mansfield <rmansfield@qnx.com>

        PR driver/31316
        * gcc.c (default_compilers): Do not output to temporary file if -S
        is specified.

Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c (revision 148490)
+++ gcc/gcc.c (working copy)
@@ -1066,11 +1066,11 @@
%(cpp_options) -o %{save-temps*:%b.i} %{!save-temps*:%g.i} \n\
cc1 -fpreprocessed %{save-temps*:%b.i} %{!save-temps*:%g.i} \
%(cc1_options)\
- -o %g.s %{!o*:--output-pch=%i.gch}\
+ %{!S:-o %g.s} %{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}%V}\
%{!save-temps*:%{!traditional-cpp:%{!no-integrated-cpp:\
cc1 %(cpp_unique_options) %(cc1_options)\
- -o %g.s %{!o*:--output-pch=%i.gch}\
+ %{!S:-o %g.s} %{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}%V}}}}}}", 0, 0, 0},
{".i", "@cpp-output", 0, 1, 0},
{"@cpp-output",




gcc/cp/ChangeLog:

2009-06-16 Ryan Mansield <rmansfield@qnx.com>

PR driver/31316
* lang-specs.h (default_compilers): Do not output to temporary file if -S
is specified.


Index: gcc/cp/lang-specs.h
===================================================================
--- gcc/cp/lang-specs.h (revision 148490)
+++ gcc/cp/lang-specs.h (working copy)
@@ -48,7 +48,7 @@
cc1plus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.ii} %{!save-temps:%g.ii}}\
%{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
%(cc1_options) %2 %{+e1*}\
- %{!fsyntax-only:-o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}}",
+ %{!fsyntax-only: %{!S:-o %g.s} %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{"@c++",
"%{E|M|MM:cc1plus -E %(cpp_options) %2 %(cpp_debug_options)}\




gcc/objc/ChangeLog:


2009-06-16 Ryan Mansield <rmansfield@qnx.com>



PR driver/31316
* lang-specs.h (default_compilers): Do not output to temporary file if -S
is specified.



Index: gcc/objc/lang-specs.h
===================================================================
--- gcc/objc/lang-specs.h (revision 148490)
+++ gcc/objc/lang-specs.h (working copy)
@@ -46,9 +46,9 @@
%eGNU Objective C no longer supports traditional compilation}\
%{save-temps|no-integrated-cpp:cc1obj -E %(cpp_options) -o %{save-temps:%b.mi} %{!save-temps:%g.mi} \n\
cc1obj -fpreprocessed %b.mi %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
- -o %g.s %{!o*:--output-pch=%i.gch}\
+ %{!S:-o %g.s} %{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}%V}\
%{!save-temps:%{!no-integrated-cpp:\
cc1obj %(cpp_unique_options) %(cc1_options) %{print-objc-runtime-info} %{gen-decls}\
- -o %g.s %{!o*:--output-pch=%i.gch}\
+ %{!S:-o %g.s} %{!o*:--output-pch=%i.gch}\
%W{o*:--output-pch=%*}%V}}}}}", 0, 0, 0},



gcc/objcp/ChangeLog:


2009-06-16 Ryan Mansield <rmansfield@qnx.com>

PR driver/31316
* lang-specs.h (default_compilers): Do not output to temporary file if -S
is specified.


Index: gcc/objcp/lang-specs.h
===================================================================
--- gcc/objcp/lang-specs.h (revision 148490)
+++ gcc/objcp/lang-specs.h (working copy)
@@ -37,7 +37,7 @@
cc1objplus %{save-temps|no-integrated-cpp:-fpreprocessed %{save-temps:%b.mii} %{!save-temps:%g.mii}}\
%{!save-temps:%{!no-integrated-cpp:%(cpp_unique_options)}}\
%(cc1_options) %2 %{+e1*}\
- -o %g.s %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
+ %{!S:-o %g.s} %{!o*:--output-pch=%i.gch} %W{o*:--output-pch=%*}%V}}}",
CPLUSPLUS_CPP_SPEC, 0, 0},
{"@objective-c++",
"%{E|M|MM:cc1objplus -E %(cpp_options) %2 %(cpp_debug_options)}\



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]