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, spu: adjust -mwarn-reloc behaviour


Currently, gcc emits a run-time relocation error whenever -mwarn-reloc
is not passed (or, when -mno-warn-reloc is passed).  There is an option
to explicitly control this behaviour, so I feel that the option should
be consulted.  :-)

Okay for mainline?

2008-12-01  Ben Elliston  <bje@au.ibm.com>

        * config/spu/spu.c (reloc_diagnostic): Produce a run-time
        relocations diagnostic error if the -merror-reloc option is
        enabled rather than when -mwarn-reloc is not set.
        * config/spu/spu.opt (merror-reloc): Enable by default.

Index: config/spu/spu.c
===================================================================
--- config/spu/spu.c    (revision 142300)
+++ config/spu/spu.c    (working copy)
@@ -4787,7 +4787,7 @@ reloc_diagnostic (rtx x)
 
   if (TARGET_WARN_RELOC)
     warning (0, msg, loc_decl, decl);
-  else
+  else if (TARGET_ERROR_RELOC)
     error (msg, loc_decl, decl);
 }
 
Index: config/spu/spu.opt
===================================================================
--- config/spu/spu.opt  (revision 142300)
+++ config/spu/spu.opt  (working copy)
@@ -20,7 +20,7 @@ Target Report Mask(WARN_RELOC)
 Emit warnings when run-time relocations are generated
 
 merror-reloc
-Target Report Mask(ERROR_RELOC)
+Target Report Mask(ERROR_RELOC) Init(1)
 Emit errors when run-time relocations are generated
 
 mbranch-cost=



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