2011-07-01 19:35:21 +08:00
|
|
|
--- a/gcc/config/avr32/avr32.c
|
|
|
|
+++ b/gcc/config/avr32/avr32.c
|
2011-07-01 21:39:50 +08:00
|
|
|
@@ -243,14 +243,14 @@ void
|
2011-07-01 19:35:21 +08:00
|
|
|
avr32_override_options (void)
|
|
|
|
{
|
|
|
|
const struct part_type_s *part;
|
|
|
|
- const struct arch_type_s *arch;
|
|
|
|
+ const struct arch_type_s *arch, *part_arch;
|
|
|
|
|
|
|
|
/*Add backward compability*/
|
|
|
|
if (strcmp ("uc", avr32_arch_name)== 0)
|
|
|
|
{
|
|
|
|
fprintf (stderr, "Warning: Deprecated arch `%s' specified. "
|
|
|
|
"Please use '-march=ucr1' instead. "
|
|
|
|
- "Converting to arch 'ucr1'\n",
|
|
|
|
+ "Using arch 'ucr1'\n",
|
|
|
|
avr32_arch_name);
|
|
|
|
avr32_arch_name="ucr1";
|
|
|
|
}
|
2011-07-01 21:39:50 +08:00
|
|
|
@@ -298,6 +298,12 @@ avr32_override_options (void)
|
2011-07-01 19:35:21 +08:00
|
|
|
if (!arch->name)
|
|
|
|
avr32_arch = &avr32_arch_types[avr32_part->arch_type];
|
|
|
|
|
|
|
|
+ /* When architecture implied by -mpart and one passed in -march are
|
|
|
|
+ * conflicting, issue an error message */
|
|
|
|
+ part_arch = &avr32_arch_types[avr32_part->arch_type];
|
|
|
|
+ if (strcmp("none",avr32_part_name) && strcmp("none", avr32_arch_name) && strcmp(avr32_arch_name,part_arch->name))
|
|
|
|
+ error ("Conflicting architectures implied by -mpart and -march\n");
|
|
|
|
+
|
|
|
|
/* If optimization level is two or greater, then align start of loops to a
|
|
|
|
word boundary since this will allow folding the first insn of the loop.
|
|
|
|
Do this only for targets supporting branch prediction. */
|