Patchwork kernel.bbclass: Add dependency on binutils

login
register
mail settings
Submitter Mike Crowe
Date May 20, 2013, 12:22 p.m.
Message ID <1369052565-26170-1-git-send-email-mac@mcrowe.com>
Download mbox | patch
Permalink /patch/50139/
State Accepted
Commit 37beb7bdab78de5253a894f35afafa34c13a00f5
Headers show

Comments

Mike Crowe - May 20, 2013, 12:22 p.m.
Compiling the Linux kernel requires binutils; kernel.bbclass uses
INHIBIT_DEFAULT_DEPS so it had better depend on binutils explicitly.

(The lack of this dependency isn't always a problem because binutils
is required to build gcc-cross but if gcc-cross is reconstructed from
the sstate cache then gcc-cross's dependency on binutils-cross is
ignored due to being in the safe dependency list in
setscene_depvalid.)

Signed-off-by: Mike Crowe <mac@mcrowe.com>
Acked-by: Phil Blundell <philb@gnu.org>
---
 meta/classes/kernel.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Khem Raj - May 20, 2013, 5:37 p.m.
On May 20, 2013, at 5:22 AM, Mike Crowe <mac@mcrowe.com> wrote:

> Compiling the Linux kernel requires binutils; kernel.bbclass uses
> INHIBIT_DEFAULT_DEPS so it had better depend on binutils explicitly.
> 
> (The lack of this dependency isn't always a problem because binutils
> is required to build gcc-cross but if gcc-cross is reconstructed from
> the sstate cache then gcc-cross's dependency on binutils-cross is
> ignored due to being in the safe dependency list in
> setscene_depvalid.)

what good is cross-gcc without cross-binutils. Could it be fixed in gcc recipes instead so
it pulls binutils-cross 

> 
> Signed-off-by: Mike Crowe <mac@mcrowe.com>
> Acked-by: Phil Blundell <philb@gnu.org>
> ---
> meta/classes/kernel.bbclass |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index ffb0b11..38973db 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -1,7 +1,7 @@
> inherit linux-kernel-base module_strip kernel-module-split
> 
> PROVIDES += "virtual/kernel"
> -DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross"
> +DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross"
> 
> # we include gcc above, we dont need virtual/libc
> INHIBIT_DEFAULT_DEPS = "1"
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Mike Crowe - May 20, 2013, 8:29 p.m.
On Mon, May 20, 2013 at 10:37:08AM -0700, Khem Raj wrote:
> 
> On May 20, 2013, at 5:22 AM, Mike Crowe <mac@mcrowe.com> wrote:
> 
> > Compiling the Linux kernel requires binutils; kernel.bbclass uses
> > INHIBIT_DEFAULT_DEPS so it had better depend on binutils explicitly.
> > 
> > (The lack of this dependency isn't always a problem because binutils
> > is required to build gcc-cross but if gcc-cross is reconstructed from
> > the sstate cache then gcc-cross's dependency on binutils-cross is
> > ignored due to being in the safe dependency list in
> > setscene_depvalid.)
> 
> what good is cross-gcc without cross-binutils. Could it be fixed in gcc recipes instead so
> it pulls binutils-cross 

Perhaps it could do when considering requiring binutils to be an
implementation detail of gcc. Unfortunately sstate.bbclass doesn't honour
the dependency (presumably because other recipes that depend on binutils
directly don't wish to bring in all the binutils build dependencies
unnecessarily.) What is the best way to avoid this?

But, kernel compilation also requires the ability to call binutils directly
so it doesn't feel completely wrong for the kernel class to depend on
binutils directly too.

Mike.
Richard Purdie - May 20, 2013, 10:25 p.m.
On Mon, 2013-05-20 at 10:37 -0700, Khem Raj wrote:
> On May 20, 2013, at 5:22 AM, Mike Crowe <mac@mcrowe.com> wrote:
> 
> > Compiling the Linux kernel requires binutils; kernel.bbclass uses
> > INHIBIT_DEFAULT_DEPS so it had better depend on binutils explicitly.
> > 
> > (The lack of this dependency isn't always a problem because binutils
> > is required to build gcc-cross but if gcc-cross is reconstructed from
> > the sstate cache then gcc-cross's dependency on binutils-cross is
> > ignored due to being in the safe dependency list in
> > setscene_depvalid.)
> 
> what good is cross-gcc without cross-binutils. Could it be fixed in gcc recipes instead so
> it pulls binutils-cross 

This needs fixing in the logic in sstate.bbclass.

Cheers,

Richard

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index ffb0b11..38973db 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -1,7 +1,7 @@ 
 inherit linux-kernel-base module_strip kernel-module-split
 
 PROVIDES += "virtual/kernel"
-DEPENDS += "virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross"
+DEPENDS += "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}gcc kmod-native depmodwrapper-cross"
 
 # we include gcc above, we dont need virtual/libc
 INHIBIT_DEFAULT_DEPS = "1"