New WP85 16.x toolchain fails to build from source

when i try build the toolchain it fails the following patch fixes it up this is with the new poky 2.2 for WP85 V16

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc

index 078d752…eae9c03 100644
— a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers.inc
@@ -76,3 +76,5 @@ RRECOMMENDS_${PN}-dbg = “${PN}-dev (= ${EXTENDPKGV})”

INHIBIT_DEFAULT_DEPS = “1”
DEPENDS += “unifdef-native”
+
+FILES_${PN}-dev = “/opt/swi”

There a few other tweaks needed to get it to build / changed the above

  indent prefdiff --git a/meta/recipes-core/glibc/glibc.inc b/meta/recipes-core/glibc/glibc.inc

index 7bae0e9…8eab90d 100644
— a/meta/recipes-core/glibc/glibc.inc
+++ b/meta/recipes-core/glibc/glibc.inc
@@ -84,3 +84,5 @@ do_configure_append_arm () {
echo “CFLAGS-abort.c = -fasynchronous-unwind-tables” >> ${B}/configparms
echo “CFLAGS-raise.c = -fasynchronous-unwind-tables” >> ${B}/configparms
}
+
+INSANE_SKIP_${PN} += “installed-vs-shipped”
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index f540b4d…4efce11 100644
— a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -105,3 +105,5 @@ target_prefix ?= “${prefix}”

The real WORKDIR location isn’t a dependency for the shared workdir.

src_patches[vardepsexclude] = “WORKDIR”
should_apply[vardepsexclude] += “PN”
+
+INSANE_SKIP_${PN} += “installed-vs-shipped”
diff --git a/meta/recipes-devtools/gcc/libgcc.inc b/meta/recipes-devtools/gcc/libgcc.inc
index 4770394…85b41ba 100644
— a/meta/recipes-devtools/gcc/libgcc.inc
+++ b/meta/recipes-devtools/gcc/libgcc.inc
@@ -41,4 +41,5 @@ do_package_write_deb[depends] += “virtual/${MLPREFIX}libc:do_packagedata”
do_package_write_rpm[depends] += “virtual/${MLPREFIX}libc:do_packagedata”

INSANE_SKIP_${PN}-dev = “staticdev”
+INSANE_SKIP_${PN} = “installed-vs-shipped”

diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
index 77e0870…1ced97a 100644
— a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
+++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_4.8.bb
@@ -10,3 +10,5 @@ SRC_URI_append_libc-musl = "\

SRC_URI[md5sum] = “c1af0afbd3df35c1ccdc7a5118cd2d07”
SRC_URI[sha256sum] = “3e9150065f193d3d94bcf46a1fe9f033c7ef7122ab71d75a7fb5a2f0c9a7e11a”
+
+FILES_${PN}-dev = "opt/swi/usr/include/* opt/swi/sysroots/x86_64-pokysdk-linux/usr/include/* usr/include/*"ormatted text by 4 spaces

And the kernel will not build right …

diff --git a/common/recipes-core/packagegroups/packagegroup-swi-image-target.bb b/common/recipes-core/packagegroups/packagegroup-swi-image-target.bb

index ec2d2f6…538f056 100644
— a/common/recipes-core/packagegroups/packagegroup-swi-image-target.bb
+++ b/common/recipes-core/packagegroups/packagegroup-swi-image-target.bb
comb@comb-desktop:~/ciis4-legato-yocto/yocto-SWI9X15Y_07.13.05.00/meta-swi$ cd …/meta-swi;git diff e8016b973515db7082273865f6a3aa20a11b289c meta-swi-mdm9x15/recipes-kernel/linux/linux-yocto_3.14.bb
diff --git a/meta-swi-mdm9x15/recipes-kernel/linux/linux-yocto_3.14.bb b/meta-swi-mdm9x15/recipes-kernel/linux/linux-yocto_3.14.bb
index a9bca3e…c35775c 100644
— a/meta-swi-mdm9x15/recipes-kernel/linux/linux-yocto_3.14.bb
+++ b/meta-swi-mdm9x15/recipes-kernel/linux/linux-yocto_3.14.bb
@@ -22,6 +22,7 @@ KMETA_DEFAULT_MDM9X15 ?= “meta-yocto-1.7-ref”
KMETA = “${KMETA_DEFAULT_MDM9X15}”

KSRC_linux_yocto_3_14 := “${LINUX_REPO_DIR}”
+LK_REPO = “${LINUX_REPO_DIR}”
SRC_URI = “git://${KSRC_linux_yocto_3_14};protocol=file;branch=${KBRANCH},${KMETA};name=machine,meta”

COMPATIBLE_MACHINE_swi-mdm9x15 = “(swi-mdm9x15)”

Hi @gregnietsky,
thanks for this tips,
do you still face any issue, after applying the patches? as you wrote “And the kernel will not build right …”
does it mean the final build fails?
best regards

I have got it working in the end without these patches i needed to set the SDK_PREFIX correctly its up and running working well so far.

Also need to set LEGATO_SYSROOT to build legato.

Greg