summaryrefslogtreecommitdiff
path: root/toolchain/gcc/patches/4.4.7/933-avr32_bug_7435.patch
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-09-09 21:35:03 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-09-09 21:38:05 +0200
commitfe3ec0b2af8d02c1d5f198c119b80a335d89eb0f (patch)
treeba38555cad08c89745638d6b8becaff6cd83b390 /toolchain/gcc/patches/4.4.7/933-avr32_bug_7435.patch
parent3b9f9fc8e3468e0930fe1ab952cbae3894c256f0 (diff)
add toolchain support for avr32
Diffstat (limited to 'toolchain/gcc/patches/4.4.7/933-avr32_bug_7435.patch')
-rw-r--r--toolchain/gcc/patches/4.4.7/933-avr32_bug_7435.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/toolchain/gcc/patches/4.4.7/933-avr32_bug_7435.patch b/toolchain/gcc/patches/4.4.7/933-avr32_bug_7435.patch
new file mode 100644
index 000000000..78106619c
--- /dev/null
+++ b/toolchain/gcc/patches/4.4.7/933-avr32_bug_7435.patch
@@ -0,0 +1,32 @@
+--- a/gcc/config/avr32/avr32.c
++++ b/gcc/config/avr32/avr32.c
+@@ -243,14 +243,14 @@ void
+ 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";
+ }
+@@ -298,6 +298,12 @@ avr32_override_options (void)
+ 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. */