[oe-commits] Robert Yang : kexec-tools: fix recompile error

git at git.openembedded.org git at git.openembedded.org
Mon Aug 11 09:55:08 UTC 2014


Module: openembedded-core.git
Branch: master
Commit: 674e14555e6912453a96747ff017f49ac9350a52
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=674e14555e6912453a96747ff017f49ac9350a52

Author: Robert Yang <liezhi.yang at windriver.com>
Date:   Wed Aug  6 20:05:22 2014 -0700

kexec-tools: fix recompile error

Fixed:
NOTE: make -j 32
make: *** No rule to make target `/path/to/sysroot/4.9.0/include/stddef.h', needed by `kexec/kexec.o'.  Stop.

This happens when upgrade gcc from 4.9.0 to 4.9.1, and the kexec/kexec.d
isn't regenerated when recompile, the content of it are:

[snip]
kexec/kexec.o: /path/to/sysroot/4.9.0/include/stddef.h
[snip]

And Makefile includes the kexec/kexec.d file if it exists, so there
would be errors when /path/to/sysroot/4.9.0/include/stddef.h doesn't
exist.

Remove kexec/kexec.d and other similar files will fix the problem.

Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/recipes-kernel/kexec/kexec-tools.inc | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/meta/recipes-kernel/kexec/kexec-tools.inc b/meta/recipes-kernel/kexec/kexec-tools.inc
index 50b448c..7e3b7ad 100644
--- a/meta/recipes-kernel/kexec/kexec-tools.inc
+++ b/meta/recipes-kernel/kexec/kexec-tools.inc
@@ -15,3 +15,14 @@ inherit autotools-brokensep
 COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux|freebsd.*)'
 
 INSANE_SKIP_${PN} = "arch"
+
+do_compile_prepend() {
+    # Remove the '*.d' file to make sure the recompile is OK
+    for dep in `find ${B} -type f -name '*.d'`; do
+        dep_no_d="`echo $dep | sed 's#.d$##'`"
+        # Remove file.d when there is a file.o
+        if [ -f "$dep_no_d.o" ]; then
+            rm -f $dep
+        fi
+    done
+}



More information about the Openembedded-commits mailing list