summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2011-05-09 10:53:43 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-11 17:10:45 +0100
commitb4a5bed917569975f2d702d3db55dd8e6c92e5fa (patch)
tree2ba8a0380d847385a1e804ea46475d44fd59ba4e /meta
parentdba803d10c0151755ed107cba71b6f31b9660933 (diff)
downloadopenembedded-core-b4a5bed917569975f2d702d3db55dd8e6c92e5fa.tar.gz
kexec-tools: fix compiler errors with gcc 4.6.0
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/fix_for_compiling_with_gcc-4.6.0.patch40
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.2.bb3
2 files changed, 42 insertions, 1 deletions
diff --git a/meta/recipes-kernel/kexec/kexec-tools/fix_for_compiling_with_gcc-4.6.0.patch b/meta/recipes-kernel/kexec/kexec-tools/fix_for_compiling_with_gcc-4.6.0.patch
new file mode 100644
index 0000000000..658699b014
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/fix_for_compiling_with_gcc-4.6.0.patch
@@ -0,0 +1,40 @@
+Upstream-Status: Pending
+
+Fix following compiler warining/errors with gcc 4.6.0.
+Nitin A Kamble <nitin.a.kamble@intel.com> 2011/05/09
+
+| kexec/kexec.c: In function 'my_exec':
+| kexec/kexec.c:818:6: warning: variable 'result' set but not used [-Wunused-but-set-variable]
+
+| ccache i586-poky-linux-gcc -march=i586 --sysroot=/build_disk/poky_build/build_gcc_4.6.0/tmp/sysroots/qemux86 --no-undefined -nostartfiles -nostdlib -nodefaultlibs -e purgatory_start -r -o purgatory/purgatory.ro purgatory/purgatory.o purgatory/printf.o purgatory/string.o purgatory/arch/i386/entry32-16.o purgatory/arch/i386/entry32-16-debug.o purgatory/arch/i386/entry32.o purgatory/arch/i386/setup-x86.o purgatory/arch/i386/stack.o purgatory/arch/i386/compat_x86_64.o purgatory/arch/i386/purgatory-x86.o purgatory/arch/i386/console-x86.o purgatory/arch/i386/vga.o purgatory/arch/i386/pic.o purgatory/arch/i386/crashdump_backup.o purgatory/sha256.o
+| i586-poky-linux-gcc: error: unrecognized option '--no-undefined'
+| make: *** [purgatory/purgatory.ro] Error 1
+| ERROR: oe_runmake failed
+
+
+Index: kexec-tools-2.0.2/kexec/kexec.c
+===================================================================
+--- kexec-tools-2.0.2.orig/kexec/kexec.c
++++ kexec-tools-2.0.2/kexec/kexec.c
+@@ -815,7 +815,7 @@ static int my_shutdown(void)
+ */
+ static int my_exec(void)
+ {
+- int result;
++ int __attribute__((__unused__)) result;
+
+ result = kexec_reboot();
+ /* I have failed if I make it here */
+Index: kexec-tools-2.0.2/purgatory/Makefile
+===================================================================
+--- kexec-tools-2.0.2.orig/purgatory/Makefile
++++ kexec-tools-2.0.2/purgatory/Makefile
+@@ -56,7 +56,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATO
+ -I$(srcdir)/include \
+ -I$(shell $(CC) -print-file-name=include)
+ $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
+- --no-undefined -nostartfiles -nostdlib -nodefaultlibs \
++ -Wl,--no-undefined -nostartfiles -nostdlib -nodefaultlibs \
+ -e purgatory_start -r
+
+ $(PURGATORY): $(PURGATORY_OBJS)
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.2.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.2.bb
index 0d15b5b862..caed8160e2 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.2.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.2.bb
@@ -2,7 +2,8 @@ require kexec-tools.inc
export LDFLAGS = "-L${STAGING_LIBDIR}"
EXTRA_OECONF = " --with-zlib=yes"
-PR = "r0"
+PR = "r1"
+SRC_URI += " file://fix_for_compiling_with_gcc-4.6.0.patch"
SRC_URI[md5sum] = "bc401cf3262b25ff7c9a51fc76c8ab91"
SRC_URI[sha256sum] = "549ab65c18a2229b6bf21b6875ca6bbe0e579bca08c3543ce6aaf8287a0b4188"