From 7f195586c0170ba6ec71c01ab73d465b94d6dbbd Mon Sep 17 00:00:00 2001 From: Bernhard Walle Date: Tue, 27 Mar 2012 13:08:57 +0200 Subject: cross-gcc: Fix compilation with host gcc 4.7 Tested on a fresh Arch Linux installation. Signed-off-by: Bernhard Walle Signed-off-by: Michael Olbrich --- ...tfields-vs.-inline-asm-memory-constraints.patch | 2 +- .../0002-Fix-compilation-with-host-gcc-4.7.patch | 35 ++++++++++++++++++++++ patches/gcc-4.6.2/series | 3 +- patches/gcc-linaro-4.6-2011.11/series | 4 ++- 4 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 patches/gcc-4.6.2/0002-Fix-compilation-with-host-gcc-4.7.patch (limited to 'patches') diff --git a/patches/gcc-4.6.2/0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch b/patches/gcc-4.6.2/0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch index 7850236..b262326 100644 --- a/patches/gcc-4.6.2/0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch +++ b/patches/gcc-4.6.2/0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch @@ -14,7 +14,7 @@ Patch taken from Debian Signed-off-by: Michael Olbrich --- gcc/expr.c | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) + 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/expr.c b/gcc/expr.c index c4a00aa..03f51f4 100644 diff --git a/patches/gcc-4.6.2/0002-Fix-compilation-with-host-gcc-4.7.patch b/patches/gcc-4.6.2/0002-Fix-compilation-with-host-gcc-4.7.patch new file mode 100644 index 0000000..2527f37 --- /dev/null +++ b/patches/gcc-4.6.2/0002-Fix-compilation-with-host-gcc-4.7.patch @@ -0,0 +1,35 @@ +From: Bernhard Walle +Date: Mon, 26 Mar 2012 21:30:06 +0200 +Subject: [PATCH] Fix compilation with host gcc 4.7 + +From upstream SVN +http://gcc.gnu.org/viewcvs?view=revision&revision=184239 +http://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=35e5dc9fa7f94c0cab5897abfd677034b584539c + +Fixes PR #51969 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51969). + +Signed-off-by: Bernhard Walle +--- + gcc/gengtype.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/gcc/gengtype.c b/gcc/gengtype.c +index abf17f8..6c0ca4a 100644 +--- a/gcc/gengtype.c ++++ b/gcc/gengtype.c +@@ -3594,14 +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; + newv.name = ACONCAT ((v->name, ".", field_name, NULL)); diff --git a/patches/gcc-4.6.2/series b/patches/gcc-4.6.2/series index a39fc16..7261325 100644 --- a/patches/gcc-4.6.2/series +++ b/patches/gcc-4.6.2/series @@ -2,6 +2,7 @@ #tag:base #tag:upstream --start-number 1 0001-Volatile-bitfields-vs.-inline-asm-memory-constraints.patch +0002-Fix-compilation-with-host-gcc-4.7.patch #tag:OSELAS.toolchain --start-number 100 0100-no-host-includes.patch 0101-arm-softfloat.patch @@ -17,4 +18,4 @@ 0302-libiberty-pic.patch 0303-libstdc-pic.patch 0304-gcc-i386-use-pure64-CLFS-patch.patch -# fafe6c53dbc3db9d6019dec03d36185a - git-ptx-patches magic +# 6d8f5b9330726a3711dfaf70517361c8 - git-ptx-patches magic diff --git a/patches/gcc-linaro-4.6-2011.11/series b/patches/gcc-linaro-4.6-2011.11/series index f38fc0f..96b7b54 100644 --- a/patches/gcc-linaro-4.6-2011.11/series +++ b/patches/gcc-linaro-4.6-2011.11/series @@ -1,5 +1,7 @@ # generated by git-ptx-patches #tag:base +#tag:upstream --start-number 1 +../gcc-4.6.2/0002-Fix-compilation-with-host-gcc-4.7.patch #tag:OSELAS.toolchain --start-number 100 ../gcc-4.6.2/0100-no-host-includes.patch ../gcc-4.6.2/0101-arm-softfloat.patch @@ -14,4 +16,4 @@ ../gcc-4.6.2/0301-flatten-switch-stmt-into-if-else-chain-for-Os.patch ../gcc-4.6.2/0302-libiberty-pic.patch ../gcc-4.6.2/0303-libstdc-pic.patch -# 19cc4f8bfbc9cbec87de32579a9f88fd - git-ptx-patches magic +# c5647f7546073b493385ebc9cc02ad59 - git-ptx-patches magic -- cgit v1.2.3