[oe-commits] [openembedded-core] 01/09: go-cross: avoid libgcc dependency

git at git.openembedded.org git at git.openembedded.org
Tue Apr 11 20:26:53 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit d6d2b5b208a8c3de6e4f4ec1a4990a49251e2a75
Author: Patrick Ohly <patrick.ohly at intel.com>
AuthorDate: Tue Apr 11 20:38:36 2017 +0200

    go-cross: avoid libgcc dependency
    
    libgcc gets compiled differently depending on the tune flags for the
    target. That dependency would make go-cross also tune specific and
    prevent sharing it between different machines using the same
    architecture.
    
    For example, MACHINE=intel-corei7-64 and MACHINE=qemux86-64 shared the
    same go-cross-x86_64, but compiled libgcc differently.
    
    The libgcc dependency gets inherited from go.inc, but does not seem to
    be necessary for go-cross (compiling go-helloworld still succeeds).
    The dependency is left in go.inc conditionally, just in case that it
    really is relevant for the various on-target recipes which inherit
    that.
    
    Because go-cross*.bb includes go*.bb, moving the DEPENDS into a .inc
    file that only gets included for the target recipes doesn't
    work. Reshuffling the content of three .bb files seems too intrusive
    at this point.
    
    Signed-off-by: Patrick Ohly <patrick.ohly at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/go/go.inc | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/go/go.inc b/meta/recipes-devtools/go/go.inc
index 5ccbf73..25437dd 100644
--- a/meta/recipes-devtools/go/go.inc
+++ b/meta/recipes-devtools/go/go.inc
@@ -1,6 +1,13 @@
 inherit goarch
-# libgcc is required for the target specific libraries to build properly
-DEPENDS += "go-bootstrap-native libgcc"
+DEPENDS += "go-bootstrap-native"
+
+# libgcc is required for the target specific libraries to build
+# properly, but apparently not for go-cross and, more importantly,
+# also can't be used there because go-cross cannot depend on
+# the tune-specific libgcc. Otherwise go-cross also would have
+# to be tune-specific.
+DEPENDS += "${@ 'libgcc' if not oe.utils.inherits(d, 'cross') else ''}"
+
 # Prevent runstrip from running because you get errors when the host arch != target arch
 INHIBIT_PACKAGE_STRIP = "1"
 INHIBIT_SYSROOT_STRIP = "1"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list