From d475adc71ba14740e1fe9c19493df7275d0737c4 Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Wed, 8 Feb 2017 12:53:26 -0500 Subject: go-native: rename to go-initial-native With the new per recipe sysroots we were having build issues since the bootstrap version of go (go-native 1.4) was being found and not the go-cross (1.6) we are expecting. This results in errors such as the following when building packages such as containerd: _cgo_.o: decoding dwarf section info at offset 0x4: unsupported version 0 This is caused by the dependency tree built up to prepare the per recipe sysroot. Since recipes like containerd DEPEND on go-cross and go-cross DEPENDS on go-native both are installed but unlike the old global sysroot the dependency parsing order results in go-native being last, overwriting go-cross. You can see this by running a devshell for containerd and running 'go version'. By adding '-initial' in the name we exploit functionality in sstate.bbclass that is already in place to handle gcc-initial and similar. This results in only explicit DEPENDS on go-native being enforced, so in the case of containerd we only get a dependency on go-cross and we therefor get go 1.6 as expected. Signed-off-by: Mark Asselstine Signed-off-by: Bruce Ashfield --- recipes-devtools/go-cross/go-cross.inc | 4 +++- recipes-devtools/go-cross/go-initial-native_1.4.bb | 2 ++ recipes-devtools/go-cross/go-native_1.4.bb | 2 -- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 recipes-devtools/go-cross/go-initial-native_1.4.bb delete mode 100644 recipes-devtools/go-cross/go-native_1.4.bb diff --git a/recipes-devtools/go-cross/go-cross.inc b/recipes-devtools/go-cross/go-cross.inc index 7f74903a..857fbd54 100644 --- a/recipes-devtools/go-cross/go-cross.inc +++ b/recipes-devtools/go-cross/go-cross.inc @@ -1,7 +1,9 @@ inherit cross # libgcc is required for the target specific libraries to build properly -DEPENDS += "go-native libgcc virtual/${TARGET_PREFIX}gcc" +DEPENDS += "go-initial-native libgcc virtual/${TARGET_PREFIX}gcc" + +do_compile[depends] += "go-initial-native:do_populate_sysroot" # Prevent runstrip from running because you get errors when the host arch != target arch #INHIBIT_PACKAGE_STRIP = "1" diff --git a/recipes-devtools/go-cross/go-initial-native_1.4.bb b/recipes-devtools/go-cross/go-initial-native_1.4.bb new file mode 100644 index 00000000..cf186e78 --- /dev/null +++ b/recipes-devtools/go-cross/go-initial-native_1.4.bb @@ -0,0 +1,2 @@ +require go-native.inc +require go-${PV}.inc diff --git a/recipes-devtools/go-cross/go-native_1.4.bb b/recipes-devtools/go-cross/go-native_1.4.bb deleted file mode 100644 index cf186e78..00000000 --- a/recipes-devtools/go-cross/go-native_1.4.bb +++ /dev/null @@ -1,2 +0,0 @@ -require go-native.inc -require go-${PV}.inc -- cgit v1.2.3-54-g00ecf