[commit, spu] Update errors for bad -march / -mtune values

Ulrich Weigand uweigand@de.ibm.com
Mon Jan 3 23:22:00 GMT 2011


Hello,

the gcc.dg/march.c and gcc.dg/mtune.c testcases fail on SPU since
they expect a particular format of the error messages when using
-march or -mtune with an unknown architecture string.

Since there doesn't seem to be any reason why SPU shouldn't use
the same message as other platforms, I've updated the back-end
to issue the same error as i386.

Tested on spu-elf.
Committed to mainline.

Bye,
Ulrich

ChangeLog:

	* config/spu/spu.c (spu_option_override): Update error text
	for bad -march= / -mtune= values.


Index: gcc/config/spu/spu.c
===================================================================
*** gcc/config/spu/spu.c	(revision 168294)
--- gcc/config/spu/spu.c	(working copy)
*************** spu_option_override (void)
*** 541,547 ****
        else if (strcmp (&spu_arch_string[0], "celledp") == 0)
          spu_arch = PROCESSOR_CELLEDP;
        else
!         error ("unknown architecture %qs", &spu_arch_string[0]);
      }
  
    /* Determine processor to tune for.  */
--- 541,547 ----
        else if (strcmp (&spu_arch_string[0], "celledp") == 0)
          spu_arch = PROCESSOR_CELLEDP;
        else
!         error ("bad value (%s) for -march= switch", spu_arch_string);
      }
  
    /* Determine processor to tune for.  */
*************** spu_option_override (void)
*** 552,558 ****
        else if (strcmp (&spu_tune_string[0], "celledp") == 0)
          spu_tune = PROCESSOR_CELLEDP;
        else
!         error ("unknown architecture %qs", &spu_tune_string[0]);
      }
  
    /* Change defaults according to the processor architecture.  */
--- 552,558 ----
        else if (strcmp (&spu_tune_string[0], "celledp") == 0)
          spu_tune = PROCESSOR_CELLEDP;
        else
!         error ("bad value (%s) for -mtune= switch", spu_tune_string);
      }
  
    /* Change defaults according to the processor architecture.  */
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com



More information about the Gcc-patches mailing list