PR driver/11810
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Nov 2009 15:47:00 +0000 (15:47 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Nov 2009 15:47:00 +0000 (15:47 +0000)
* gcc.c (SWITCHES_NEED_SPACES): Define to "o".
* config/alpha/osf.h (SWITCHES_NEED_SPACES): Remove here.
* config/mips/iris.h (SWITCHES_NEED_SPACES): Remove here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153900 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/alpha/osf.h
gcc/config/mips/iris.h
gcc/gcc.c

index 1367409..b9735ef 100644 (file)
@@ -1,3 +1,10 @@
+2009-11-03  Mark Mitchell  <mark@codesourcery.com>
+
+       PR driver/11810
+       * gcc.c (SWITCHES_NEED_SPACES): Define to "o".
+       * config/alpha/osf.h (SWITCHES_NEED_SPACES): Remove here.
+       * config/mips/iris.h (SWITCHES_NEED_SPACES): Remove here.
+
 2009-11-04  Richard Earnshaw  <rearnsha@arm.com>
 
        PR target/40835
index 2b5165c..81c12aa 100644 (file)
@@ -167,10 +167,6 @@ __enable_execute_stack (void *addr)                                        \
 #define LD_INIT_SWITCH "-init"
 #define LD_FINI_SWITCH "-fini"
 
-/* The linker needs a space after "-o".  This allows -oldstyle_liblookup to
-   be passed to ld.  */
-#define SWITCHES_NEED_SPACES "o"
-
 /* Select a format to encode pointers in exception handling data.  CODE
    is 0 for data, 1 for code labels, 2 for function pointers.  GLOBAL is
    true if the symbol may be affected by dynamic relocations.
index fce8217..373691e 100644 (file)
@@ -63,9 +63,6 @@ along with GCC; see the file COPYING3.  If not see
 #undef ASM_FINISH_DECLARE_OBJECT
 #define ASM_FINISH_DECLARE_OBJECT mips_finish_declare_object
 
-/* The linker needs a space after "-o".  */
-#define SWITCHES_NEED_SPACES "o"
-
 /* Specify wchar_t types.  */
 #undef WCHAR_TYPE
 #define WCHAR_TYPE (Pmode == DImode ? "int" : "long int")
index b033d62..0f74dd0 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -684,9 +684,15 @@ proper position among the other output files.  */
 #endif
 
 /* config.h can define SWITCHES_NEED_SPACES to control which options
-   require spaces between the option and the argument.  */
+   require spaces between the option and the argument.
+
+   We define SWITCHES_NEED_SPACES to include "o" by default.  This
+   causes "-ofoo.o" to be split into "-o foo.o" during the initial
+   processing of the command-line, before being seen by the specs
+   machinery.  This makes sure we record "foo.o" as the temporary file
+   to be deleted in the case of error, rather than "-ofoo.o".  */
 #ifndef SWITCHES_NEED_SPACES
-#define SWITCHES_NEED_SPACES ""
+#define SWITCHES_NEED_SPACES "o"
 #endif
 
 /* config.h can define ENDFILE_SPEC to override the default crtn files.  */