From 64a47c3d0afa14a4fb34695d9e84e530921791d5 Mon Sep 17 00:00:00 2001 From: Nitin A Kamble Date: Tue, 10 May 2011 22:35:38 -0700 Subject: dtc: fix compilation with gcc 4.6.0 (From OE-Core rev: e5cb0d5101f4bbfb516236fa95a1b50e27a2d21c) Signed-off-by: Nitin A Kamble Signed-off-by: Richard Purdie --- .../dtc/fix_for_compilation_with_gcc_4.6.0.patch | 51 ++++++++++++++++++++++ meta/recipes-kernel/dtc/dtc_git.inc | 5 ++- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-kernel/dtc/dtc/fix_for_compilation_with_gcc_4.6.0.patch (limited to 'meta/recipes-kernel/dtc') diff --git a/meta/recipes-kernel/dtc/dtc/fix_for_compilation_with_gcc_4.6.0.patch b/meta/recipes-kernel/dtc/dtc/fix_for_compilation_with_gcc_4.6.0.patch new file mode 100644 index 0000000000..b34894d926 --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc/fix_for_compilation_with_gcc_4.6.0.patch @@ -0,0 +1,51 @@ +Upstream-Status: Pending + +Fix following compilation errors with gcc 4.6.0 +| dtc.c: In function 'main': +| dtc.c:100:17: error: variable 'check' set but not used [-Werror=unused-but-set-variable] +| cc1: all warnings being treated as errors +| +| make: *** [dtc.o] Error 1 +| make: *** Waiting for unfinished jobs.... +| flattree.c: In function 'flat_read_mem_reserve': +| flattree.c:700:14: error: variable 'p' set but not used [-Werror=unused-but-set-variable] +| cc1: all warnings being treated as errors +| +| make: *** [flattree.o] Error 1 +| ERROR: oe_runmake failed + +Nitin A Kamble 2011/05/10 + +Index: git/dtc.c +=================================================================== +--- git.orig/dtc.c ++++ git/dtc.c +@@ -97,7 +97,7 @@ int main(int argc, char *argv[]) + const char *inform = "dts"; + const char *outform = "dts"; + const char *outname = "-"; +- int force = 0, check = 0; ++ int force = 0, __attribute__((__unused__)) check = 0; + const char *arg; + int opt; + FILE *outf = NULL; +Index: git/flattree.c +=================================================================== +--- git.orig/flattree.c ++++ git/flattree.c +@@ -697,7 +697,6 @@ static struct reserve_info *flat_read_me + { + struct reserve_info *reservelist = NULL; + struct reserve_info *new; +- const char *p; + struct fdt_reserve_entry re; + + /* +@@ -706,7 +705,6 @@ static struct reserve_info *flat_read_me + * + * First pass, count entries. + */ +- p = inb->ptr; + while (1) { + flat_read_chunk(inb, &re, sizeof(re)); + re.address = fdt64_to_cpu(re.address); diff --git a/meta/recipes-kernel/dtc/dtc_git.inc b/meta/recipes-kernel/dtc/dtc_git.inc index 6b7acd53ba..2400cfe52f 100644 --- a/meta/recipes-kernel/dtc/dtc_git.inc +++ b/meta/recipes-kernel/dtc/dtc_git.inc @@ -1,7 +1,8 @@ -SRC_URI = "git://www.jdl.com/software/dtc.git;protocol=git" +SRC_URI = "git://www.jdl.com/software/dtc.git;protocol=git \ + file://fix_for_compilation_with_gcc_4.6.0.patch" SRCREV = "73dca9ae0b9abe6924ba640164ecce9f8df69c5a" PV = "1.2.0+git${SRCPV}" -PR = "r2" +PR = "r3" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf