From 8c087a2295bd143518d2e83c55349fc09d0a7558 Mon Sep 17 00:00:00 2001 From: Felix Ruess Date: Sat, 23 Feb 2013 22:13:06 +0100 Subject: [PATCH] paparazzi-arm-multilib: add patch to build toolchain with gcc4.7 --- linux/paparazzi-arm-multilib/Makefile | 4 +++- linux/paparazzi-arm-multilib/debian/changelog | 8 ++++++++ .../patches/patch-gcc-gengtype-fix.diff | 19 +++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 linux/paparazzi-arm-multilib/patches/patch-gcc-gengtype-fix.diff diff --git a/linux/paparazzi-arm-multilib/Makefile b/linux/paparazzi-arm-multilib/Makefile index 27f7c54..d078c3c 100644 --- a/linux/paparazzi-arm-multilib/Makefile +++ b/linux/paparazzi-arm-multilib/Makefile @@ -151,10 +151,12 @@ $(stamp)gcc-extract: $(GCCSRC) $(stamp)init-dirs tar xaf $< -C src touch $@ -# Patch to add multilib support +# Patch to add multilib support and fix gengtype subscripted value error $(stamp)gcc-patch: $(stamp)gcc-extract cd src/gcc-* && \ patch -p0 -i ../../patches/patch-gcc-config-arm-t-arm-elf.diff + cd src/gcc-* && \ + patch -p1 -i ../../patches/patch-gcc-gengtype-fix.diff touch $@ # Configure diff --git a/linux/paparazzi-arm-multilib/debian/changelog b/linux/paparazzi-arm-multilib/debian/changelog index a1c5713..7693713 100644 --- a/linux/paparazzi-arm-multilib/debian/changelog +++ b/linux/paparazzi-arm-multilib/debian/changelog @@ -1,3 +1,11 @@ +paparazzi-arm-multilib (1.2.4-1) unstable; urgency=low + + * add patch to fix subscripted value error in gengtype + so we can build the toolchain with gcc 4.7 + see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51969 + + -- Felix Ruess Sat, 23 Feb 2013 22:15:01 +0100 + paparazzi-arm-multilib (1.2.3-1) unstable; urgency=low * compile gdb with python support diff --git a/linux/paparazzi-arm-multilib/patches/patch-gcc-gengtype-fix.diff b/linux/paparazzi-arm-multilib/patches/patch-gcc-gengtype-fix.diff new file mode 100644 index 0000000..47b8f31 --- /dev/null +++ b/linux/paparazzi-arm-multilib/patches/patch-gcc-gengtype-fix.diff @@ -0,0 +1,19 @@ +diff --git a/gcc/gengtype.c b/gcc/gengtype.c +index abf17f8..550d3bb 100644 +--- a/gcc/gengtype.c ++++ b/gcc/gengtype.c +@@ -3594,13 +3594,13 @@ write_field_root (outf_p f, pair_p v, type_p type, const char *name, + int has_length, struct fileloc *line, const char *if_marked, + bool emit_pch, type_p field_type, const char *field_name) + { ++ struct pair newv; + /* If the field reference is relative to V, rather than to some + subcomponent of V, we can mark any subarrays with a single stride. + We're effectively treating the field as a global variable in its + own right. */ + if (v && type == v->type) + { +- struct pair newv; + + newv = *v; + newv.type = field_type;