Patchwork [RFC] kernel.bbclass: unset LDFLAGS when run devshell in kernel recipe

login
register
mail settings
Submitter Nobuhiro Iwamatsu
Date Sept. 20, 2013, 5:45 a.m.
Message ID <1379655946-22508-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>
Download mbox | patch
Permalink /patch/58409/
State Accepted
Commit 029b0fef50fb118d4e09ac042338621d19a95bc8
Headers show

Comments

Nobuhiro Iwamatsu - Sept. 20, 2013, 5:45 a.m.
When user runs devshell in kernel recipe and compiles kernel,
this will fail by unrecognized option of LD.

----
$ make
...
arm-poky-linux-gnueabi-ld: unrecognized option '-Wl,-O1'
arm-poky-linux-gnueabi-ld: use the --help option for usage information
----

This set to empty LDFLAGS when user runs the devshell, and solve this problem.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
---
 meta/classes/kernel.bbclass |    5 +++++
 1 file changed, 5 insertions(+)

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 8cf66ce..0bf39e6 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -145,6 +145,11 @@  do_bundle_initramfs () {
 	fi
 }
 do_bundle_initramfs[nostamp] = "1"
+
+python do_devshell_prepend () {
+    os.environ["LDFLAGS"] = ''
+}
+
 addtask bundle_initramfs after do_compile
 
 kernel_do_compile() {