Import 80d60e7 from yoctoproject.org meta-arm
To support ARMv8 SoCs.
meta-arm has several patch files. Since they are maintained by the
upstream meta-arm community, add meta-arm to the ignore list in
run-repotest.
Change-Id: Ia87a2e947bbabd347d256eccc47a343e1c885479
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb
new file mode 100644
index 0000000..963fd60
--- /dev/null
+++ b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/androidclang_r416183b.bb
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: MIT
+#
+# Copyright (c) 2021 Arm Limited
+#
+
+SUMMARY = "Android Clang compiler"
+DESCRIPTION = "Android Clang compiler, version r416183b. This is based on Clang 12.0.5 \
+Intended usage is to build kernel images that match the output of the Android (hermetic) \
+build system"
+
+LICENSE = "MIT"
+
+LIC_FILES_CHKSUM = "file://MODULE_LICENSE_MIT;md5=d41d8cd98f00b204e9800998ecf8427e"
+
+ANDROID_CLANG_VERSION = "clang-r416183b"
+ANDROID_CLANG_HASH = "bd96dfe349c962681f0e5388af874c771ef96670"
+
+COMPATIBLE_HOST = "x86_64.*-linux"
+
+SRC_URI = "https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/${ANDROID_CLANG_HASH}/${ANDROID_CLANG_VERSION}.tar.gz;subdir=${ANDROID_CLANG_VERSION}"
+
+# We need to set the checksum to "ignore" because the tarball is dynamically generated and has a new checksum every time
+# (the contents are the same, but the time stamp differs)
+BB_STRICT_CHECKSUM = "ignore"
+
+S = "${WORKDIR}/${ANDROID_CLANG_VERSION}"
+
+FILES:${PN} = "${libexecdir} ${bindir}"
+
+do_install() {
+ install -d ${D}${libexecdir}/${ANDROID_CLANG_VERSION}/
+
+ cp --no-preserve=ownership -r ${S}/. ${D}${libexecdir}/${ANDROID_CLANG_VERSION}/
+ # Strip bad RPATHs in the embedded python3
+ chrpath -d ${D}${libexecdir}/${ANDROID_CLANG_VERSION}/python3/lib/python*/lib-dynload/*.so
+
+ install -d ${D}${bindir}
+ # Symlink all executables into bindir
+ for f in ${D}${libexecdir}/${ANDROID_CLANG_VERSION}/bin/*; do
+ ln -rs $f ${D}${bindir}/$(basename $f)
+ done
+}
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+INSANE_SKIP:${PN} = "already-stripped libdir staticdev file-rdeps arch dev-so"
+
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/arm-binary-toolchain.inc b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/arm-binary-toolchain.inc
new file mode 100644
index 0000000..528b006
--- /dev/null
+++ b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/arm-binary-toolchain.inc
@@ -0,0 +1,26 @@
+INHIBIT_DEFAULT_DEPS = "1"
+
+FILES:${PN} = "${libexecdir} ${bindir}"
+
+BINNAME = "${@d.getVar("BPN").strip("gcc-")}"
+
+do_install() {
+ install -d ${D}${bindir} ${D}${libexecdir}/${BPN}/
+ cp -r ${S}/. ${D}${libexecdir}/${BPN}
+
+ # Symlink all executables into bindir
+ for f in ${D}${libexecdir}/${BPN}/bin/*; do
+ ln -rs $f ${D}${bindir}/$(basename $f)
+ done
+}
+
+INSANE_SKIP:${PN} = "already-stripped libdir staticdev file-rdeps arch dev-so"
+
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+# Need to mark these as private until do_package's soname-finder only looks in $libdir
+PRIVATE_LIBS = "libgcc_s.so.1 libstdc++.so.6"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
new file mode 100644
index 0000000..138245d
--- /dev/null
+++ b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-sdk-toolchain.bb
@@ -0,0 +1,143 @@
+inherit cross-canadian
+
+require license.inc
+
+PN = "external-arm-sdk-toolchain-${TARGET_ARCH}"
+BPN = "external-arm-sdk-toolchain"
+PV = "${EAT_VER_MAIN}"
+
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_SYSROOT_STRIP = "1"
+INHIBIT_DEFAULT_DEPS = "1"
+EXCLUDE_FROM_SHLIBS = "1"
+
+LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
+
+# Skip packaging QA checks for prebuilt binaries
+INSANE_SKIP:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so staticdev file-rdeps libdir"
+INSANE_SKIP:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
+INSANE_SKIP:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "dev-so file-rdeps"
+
+# Skip file dependencies in RPM for prebuilt binaries
+SKIP_FILEDEPS = "1"
+
+PROVIDES = "\
+ gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+ gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+ binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+"
+
+PACKAGES = "\
+ gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+ gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+ binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \
+"
+
+# Adjust defaults in line with external toolchain
+bindir = "${exec_prefix}/bin"
+libdir = "${exec_prefix}/lib"
+libexecdir = "${exec_prefix}/libexec"
+datadir = "${exec_prefix}/share"
+gcclibdir = "${libdir}/gcc"
+
+FILES:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
+ ${prefix}/${EAT_TARGET_SYS}/lib/libstdc++.* \
+ ${prefix}/${EAT_TARGET_SYS}/lib/libgcc_s.* \
+ ${prefix}/${EAT_TARGET_SYS}/lib/libsupc++.* \
+ ${prefix}/${EAT_TARGET_SYS}/include \
+ ${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* \
+ ${bindir}/${TARGET_PREFIX}gcov \
+ ${bindir}/${TARGET_PREFIX}gcc* \
+ ${bindir}/${TARGET_PREFIX}g++ \
+ ${bindir}/${TARGET_PREFIX}cpp \
+ ${libexecdir}/* \
+"
+
+FILES:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
+ ${bindir}/${TARGET_PREFIX}gdb* \
+ ${datadir}/gdb/* \
+"
+
+FILES:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "\
+ ${prefix}/${EAT_TARGET_SYS}/bin/ld* \
+ ${prefix}/${EAT_TARGET_SYS}/bin/objcopy \
+ ${prefix}/${EAT_TARGET_SYS}/bin/strip \
+ ${prefix}/${EAT_TARGET_SYS}/bin/nm \
+ ${prefix}/${EAT_TARGET_SYS}/bin/ranlib \
+ ${prefix}/${EAT_TARGET_SYS}/bin/as \
+ ${prefix}/${EAT_TARGET_SYS}/bin/ar \
+ ${prefix}/${EAT_TARGET_SYS}/bin/objdump \
+ ${prefix}/${EAT_TARGET_SYS}/lib/ldscripts/* \
+ ${bindir}/${TARGET_PREFIX}ld* \
+ ${bindir}/${TARGET_PREFIX}addr2line \
+ ${bindir}/${TARGET_PREFIX}objcopy \
+ ${bindir}/${TARGET_PREFIX}readelf \
+ ${bindir}/${TARGET_PREFIX}strip \
+ ${bindir}/${TARGET_PREFIX}nm \
+ ${bindir}/${TARGET_PREFIX}ranlib \
+ ${bindir}/${TARGET_PREFIX}gprof \
+ ${bindir}/${TARGET_PREFIX}as \
+ ${bindir}/${TARGET_PREFIX}c++filt \
+ ${bindir}/${TARGET_PREFIX}ar \
+ ${bindir}/${TARGET_PREFIX}strings \
+ ${bindir}/${TARGET_PREFIX}objdump \
+ ${bindir}/${TARGET_PREFIX}size \
+"
+
+DESCRIPTION:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "The GNU cc and gcc C compilers"
+DESCRIPTION:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "gdb - GNU debugger"
+DESCRIPTION:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "A GNU collection of binary utilities"
+
+LICENSE:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GCC_LICENSE}"
+LICENSE:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_GDB_LICENSE}"
+LICENSE:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_BFD_LICENSE}"
+
+PKGV:gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GCC}"
+PKGV:gdb-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_GDB}"
+PKGV:binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "${EAT_VER_BFD}"
+
+do_install() {
+ install -d ${D}${prefix}/${EAT_TARGET_SYS}/bin
+ install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib
+ install -d ${D}${prefix}/${EAT_TARGET_SYS}/include
+ install -d ${D}${bindir}
+ install -d ${D}${libdir}
+ install -d ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
+ install -d ${D}${libexecdir}
+ install -d ${D}${datadir}/gdb
+ install -d ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include
+
+ CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
+
+ # gcc
+ for i in libstdc++.* libgcc_s.* libsupc++.*; do
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/$i ${D}${prefix}/${EAT_TARGET_SYS}/lib
+ done
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${prefix}/${EAT_TARGET_SYS}/include
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/* ${D}${gcclibdir}/${EAT_TARGET_SYS}/${EAT_VER_GCC}
+ for i in gcov gcc* g++ cpp; do
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
+ done
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/libexec/* ${D}${libexecdir}
+
+ # gdb
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}gdb* ${D}${bindir}
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/share/gdb/* ${D}${datadir}/gdb/
+
+ # binutils
+ for i in ld* objcopy strip nm ranlib as ar objdump; do
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/bin/$i ${D}${prefix}/${EAT_TARGET_SYS}/bin
+ done
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/lib/ldscripts/* ${D}${prefix}/${EAT_TARGET_SYS}/lib/ldscripts
+ for i in ld* addr2line objcopy readelf strip nm ranlib gprof as c++filt ar strings objdump size; do
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/bin/${TARGET_PREFIX}$i ${D}${bindir}
+ done
+}
+
+python () {
+ if not d.getVar("EAT_VER_MAIN", False):
+ raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
+ if d.getVar('TCLIBC', True) != "glibc":
+ raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
+}
diff --git a/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
new file mode 100644
index 0000000..dcc8ebf
--- /dev/null
+++ b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
@@ -0,0 +1,673 @@
+require recipes-core/glibc/glibc-package.inc
+
+require license.inc
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+LIC_FILES_CHKSUM = "\
+ file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \
+ file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
+"
+
+PROVIDES += "\
+ linux-libc-headers \
+ virtual/${TARGET_PREFIX}gcc \
+ virtual/${TARGET_PREFIX}g++ \
+ virtual/${TARGET_PREFIX}gcc-initial \
+ virtual/${TARGET_PREFIX}binutils \
+ virtual/${TARGET_PREFIX}libc-for-gcc \
+ virtual/${TARGET_PREFIX}compilerlibs \
+ virtual/libc \
+ virtual/libintl \
+ virtual/libiconv \
+ virtual/crypt \
+ glibc-mtrace \
+ glibc-thread-db \
+ glibc \
+ libc-mtrace \
+ gcc-runtime \
+ libgcc \
+ libg2c \
+ libg2c-dev \
+ libssp \
+ libssp-dev \
+ libssp-staticdev \
+ libgfortran \
+ libgfortran-dev \
+ libgfortran-staticdev \
+ libmudflap \
+ libmudflap-dev \
+ libgomp \
+ libgomp-dev \
+ libgomp-staticdev \
+ libitm \
+ libitm-dev \
+ libitm-staticdev \
+ libquadmath \
+ libquadmath-dev \
+ libquadmath-staticdev \
+ virtual/linux-libc-headers \
+ libgcov-staticdev \
+ virtual/libc-locale \
+"
+
+PV = "${EAT_VER_MAIN}"
+
+BINV = "${EAT_VER_GCC}"
+
+SRC_URI = "file://SUPPORTED"
+
+do_install() {
+ # Add stubs for files OE-core expects
+ install -d ${S}/nscd/
+ touch ${S}/nscd/nscd.init
+ touch ${S}/nscd/nscd.conf
+ touch ${S}/nscd/nscd.service
+ touch ${S}/../makedbs.sh
+
+ install -d ${D}${base_libdir}
+ install -d ${D}${base_sbindir}
+ install -d ${D}${bindir}
+ install -d ${D}${sbindir}
+ install -d ${D}${libdir}
+ install -d ${D}${libexecdir}
+ install -d ${D}${datadir}
+ install -d ${D}${includedir}
+ install -d ${D}/include
+ install -d ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}
+ install -d ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}
+
+ CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/* ${D}${base_libdir}
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/* ${D}${base_libdir}
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/* ${D}${libdir}
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/share/* ${D}${datadir}
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/include/* ${D}${includedir}
+
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/include/* ${D}${includedir}
+ if [ -d ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ]; then
+ mv ${D}${includedir}/c++/${EAT_VER_GCC}/${EAT_TARGET_SYS} ${D}${includedir}/c++/${EAT_VER_GCC}/${TARGET_SYS}
+ fi
+ ln -sf ../usr/include/c++ ${D}/include/c++
+
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/bin/* ${D}${bindir}
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/sbin/* ${D}${sbindir}
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/sbin/* ${D}${base_sbindir}
+ rm -rf ${D}${bindir}/gdbserver
+ sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/tzselect
+ sed -i -e 's#/arm/tools/gnu/bash/4.2/rhe6-x86_64##' ${D}${bindir}/ldd
+ sed -i -e 's#/usr/bin/bash#/bin/sh#' ${D}${bindir}/tzselect
+ sed -i -e 's#/usr/bin/bash#/bin/sh#' ${D}${bindir}/ldd
+ sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/tzselect
+ sed -i -e 's#/bin/bash#/bin/sh#' ${D}${bindir}/ldd
+
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/crt*.o ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcc* ${D}${libdir}/${TARGET_SYS}/${EAT_VER_GCC}/
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/libgcov* ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/include ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/lib/gcc/${EAT_TARGET_SYS}/${EAT_VER_GCC}/finclude ${D}${libdir}/gcc/${TARGET_SYS}/${EAT_VER_GCC}/
+
+ # fix up the copied symlinks (they are still pointing to the multiarch directory)
+ linker_name="${@bb.utils.contains("TUNE_FEATURES", "aarch64", "ld-linux-aarch64.so.1", bb.utils.contains("TUNE_FEATURES", "callconvention-hard", "ld-linux-armhf.so.3", "ld-linux.so.3",d), d)}"
+ if [ -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then
+ ln -sf ld-${EAT_VER_LIBC}.so ${D}${base_libdir}/${linker_name}
+ else
+ cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/lib/${linker_name} ${D}${base_libdir}/
+ fi
+ ln -sf ../../lib/librt.so.1 ${D}${libdir}/librt.so
+ ln -sf ../../lib/libcrypt.so.1 ${D}${libdir}/libcrypt.so
+ ln -sf ../../lib/libresolv.so.2 ${D}${libdir}/libresolv.so
+ ln -sf ../../lib/libnss_hesiod.so.2 ${D}${libdir}/libnss_hesiod.so
+ ln -sf ../../lib/libutil.so.1 ${D}${libdir}/libutil.so
+ ln -sf ../../lib/libBrokenLocale.so.1 ${D}${libdir}/libBrokenLocale.so
+ ln -sf ../../lib/libpthread.so.0 ${D}${libdir}/libpthread.so
+ ln -sf ../../lib/libthread_db.so.1 ${D}${libdir}/libthread_db.so
+ ln -sf ../../lib/libanl.so.1 ${D}${libdir}/libanl.so
+ ln -sf ../../lib/libdl.so.2 ${D}${libdir}/libdl.so
+ ln -sf ../../lib/libnss_db.so.2 ${D}${libdir}/libnss_db.so
+ ln -sf ../../lib/libnss_dns.so.2 ${D}${libdir}/libnss_dns.so
+ ln -sf ../../lib/libnss_files.so.2 ${D}${libdir}/libnss_files.so
+ ln -sf ../../lib/libnss_compat.so.2 ${D}${libdir}/libnss_compat.so
+ ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so
+ ln -sf ../../lib/libc_malloc_debug.so.0 ${D}${libdir}/libc_malloc_debug.so
+
+ # remove potential .so duplicates from base_libdir
+ # for all symlinks created above in libdir
+ rm -f ${D}${base_libdir}/librt.so
+ rm -f ${D}${base_libdir}/libcrypt.so
+ rm -f ${D}${base_libdir}/libresolv.so
+ rm -f ${D}${base_libdir}/libnss_hesiod.so
+ rm -f ${D}${base_libdir}/libutil.so
+ rm -f ${D}${base_libdir}/libBrokenLocale.so
+ rm -f ${D}${base_libdir}/libpthread.so
+ rm -f ${D}${base_libdir}/libthread_db.so
+ rm -f ${D}${base_libdir}/libanl.so
+ rm -f ${D}${base_libdir}/libdl.so
+ rm -f ${D}${base_libdir}/libnss_db.so
+ rm -f ${D}${base_libdir}/libnss_dns.so
+ rm -f ${D}${base_libdir}/libnss_files.so
+ rm -f ${D}${base_libdir}/libnss_compat.so
+ rm -f ${D}${base_libdir}/libm.so
+
+ # Move these completely to ${libdir} and delete duplicates in ${base_libdir}
+ for lib in asan hwasan atomic gfortran gomp itm lsan sanitizer stdc++ tsan ubsan; do
+ if [ -e ${D}${base_libdir}/lib${lib}.spec ] ; then
+ mv ${D}${base_libdir}/lib${lib}.spec ${D}${libdir}
+ fi
+ if [ -e ${D}${base_libdir}/lib${lib}.a ] ; then
+ mv ${D}${base_libdir}/lib${lib}.a ${D}${libdir}
+ fi
+ rm -f ${D}${base_libdir}/lib${lib}*
+ done
+
+ # Clean up duplicate libs that are both in base_libdir and libdir
+ rm -f ${D}${libdir}/libgcc*
+
+ # Besides ld-${EAT_VER_LIBC}.so, other libs can have duplicates like lib*-${EAT_VER_LIBC}.so
+ # Only remove them if both are regular files and are identical
+ for i in ${D}${base_libdir}/lib*-${EAT_VER_LIBC}.so; do
+ if [ ! -e $i ] ; then
+ continue
+ fi
+
+ f=$(echo $i | sed 's/-${EAT_VER_LIBC}//')
+ l=$(ls $f.*)
+ if [ $(readlink -f $i ) = $l ]; then
+ echo "$i is a symlink of $l, keep it"
+ elif [ $(readlink -f $l ) = $i ]; then
+ echo "$l is a symlink of $i, keep it"
+ else
+ cmp -s $i $l
+ if [ $? -eq 0 ]; then
+ echo "$i is a duplicate of $l, remove it"
+ rm $i
+ else
+ echo "$i and $l are different files, keep them both"
+ fi
+ fi
+ done
+
+ if [ -d ${D}${base_libdir}/arm-linux-gnueabi ]; then
+ rm -rf ${D}${base_libdir}/arm-linux-gnueabi
+ fi
+
+ if [ -d ${D}${base_libdir}/ldscripts ]; then
+ rm -rf ${D}${base_libdir}/ldscripts
+ fi
+
+ # Provided by libnsl2
+ rm -rf ${D}${includedir}/rpcsvc/yppasswd.*
+ # Provided by quota
+ rm -rf ${D}${includedir}/rpcsvc/rquota.*
+
+ if [ -f ${D}${libdir}/libc.so ];then
+ sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../${EAT_LIBDIR}#g" -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so
+ sed -i -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so
+ sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so
+ fi
+
+ if [ -f ${D}${base_libdir}/libc.so ];then
+ sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../lib#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/# /lib/#g" ${D}${base_libdir}/libc.so
+ if [ -f ${D}${base_libdir}/libc.so.6 ]; then
+ sed -i -e "s# /usr/${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${base_libdir}/libc.so.6
+ fi
+ fi
+
+ # Remove if empty
+ rmdir ${D}${bindir} || true
+ rmdir ${D}${sbindir} || true
+ rmdir ${D}${base_sbindir} || true
+ rmdir ${D}${libexecdir} || true
+
+ # Remove unused /usr/share/info/dir
+ rm -f ${D}${infodir}/dir
+}
+
+# External toolchain doesn't provide multilib support so make corresponding
+# install API as an empty API to avoid an unnecessary errors.
+oe_multilib_header () {
+ return
+}
+
+PACKAGES_DYNAMIC = "^locale-base-.* \
+ ^glibc-gconv-.* ^glibc-charmap-.* ^glibc-localedata-.* ^glibc-binary-localedata-.* \
+ ^${MLPREFIX}glibc-gconv$"
+
+# PACKAGES is split up according to the 'source' recipes/includes in OE-core
+# Stylistic differences are kept to make copy/pasting easier.
+
+# From gcc-runtime.inc
+
+PACKAGES += "\
+ gcc-runtime-dbg \
+ libstdc++ \
+ libstdc++-precompile-dev \
+ libstdc++-dev \
+ libstdc++-staticdev \
+ libg2c \
+ libg2c-dev \
+ libssp \
+ libssp-dev \
+ libssp-staticdev \
+ libmudflap \
+ libmudflap-dev \
+ libmudflap-staticdev \
+ libquadmath \
+ libquadmath-dev \
+ libquadmath-staticdev \
+ libgomp \
+ libgomp-dev \
+ libgomp-staticdev \
+ libatomic \
+ libatomic-dev \
+ libatomic-staticdev \
+ libitm \
+ libitm-dev \
+ libitm-staticdev \
+"
+
+# From gcc-sanitizers.inc
+
+PACKAGES += "gcc-sanitizers gcc-sanitizers-dbg"
+PACKAGES += "libasan libubsan liblsan libtsan"
+PACKAGES += "libasan-dev libubsan-dev liblsan-dev libtsan-dev"
+PACKAGES += "libasan-staticdev libubsan-staticdev liblsan-staticdev libtsan-staticdev"
+
+# From libgfortran.inc:
+
+PACKAGES += "\
+ libgfortran-dbg \
+ libgfortran \
+ libgfortran-dev \
+ libgfortran-staticdev \
+"
+
+# libgcc.inc uses ${PN}, so replace that
+
+PACKAGES += "\
+ libgcc \
+ libgcc-dev \
+ libgcc-dbg \
+"
+
+# ... and the leftovers
+
+PACKAGES =+ "\
+ ${PN}-mtrace \
+ libgcov-staticdev \
+ linux-libc-headers \
+ linux-libc-headers-dev \
+"
+
+# Re-order PACKAGES list in order to shift ${PN}-dev towards the end as
+# it is meant to pick up remaining dev libraries and headers that aren't
+# picked up by other packages. And since some static libraries needs to
+# be packaged in ${PN}-dev, so we need to keep ${PN}-staticdev later in
+# order.
+
+PACKAGES := "${@oe.utils.str_filter_out('${PN}-dev', '${PACKAGES}', d)}"
+PACKAGES := "${@oe.utils.str_filter_out('${PN}-staticdev', '${PACKAGES}', d)}"
+PACKAGES += "\
+ ${PN}-dev \
+ ${PN}-staticdev \
+"
+
+INSANE_SKIP:${PN}-dbg = "staticdev"
+INSANE_SKIP:${PN}-utils += "ldflags"
+INSANE_SKIP:libstdc++ += "ldflags"
+INSANE_SKIP:libgfortran += "ldflags"
+INSANE_SKIP:libgcc += "ldflags dev-deps"
+INSANE_SKIP:libgcc-dev += "staticdev"
+INSANE_SKIP:libgfortran += "ldflags dev-deps"
+INSANE_SKIP:libstdc++ += "ldflags dev-deps"
+INSANE_SKIP:libatomic += "ldflags"
+INSANE_SKIP:libasan += "ldflags"
+INSANE_SKIP:libubsan += "ldflags"
+INSANE_SKIP:libssp += "ldflags"
+INSANE_SKIP:libgomp += "ldflags"
+INSANE_SKIP:libitm += "ldflags"
+INSANE_SKIP:gdbserver += "ldflags"
+
+# OE-core has literally listed 'glibc' in LIBC_DEPENDENCIES :/
+RPROVIDES:${PN} = "glibc rtld(GNU_HASH)"
+# Add runtime provides for the other libc* packages as well
+RPROVIDES:${PN}-dev = "glibc-dev"
+RPROVIDES:${PN}-doc = "glibc-doc"
+RPROVIDES:${PN}-dbg = "glibc-dbg"
+RPROVIDES:${PN}-pic = "glibc-pic"
+RPROVIDES:${PN}-utils = "glibc-utils"
+RPROVIDES:${PN}-mtrace = "glibc-mtrace libc-mtrace"
+
+PKG:${PN} = "glibc"
+PKG:${PN}-dev = "glibc-dev"
+PKG:${PN}-doc = "glibc-doc"
+PKG:${PN}-dbg = "glibc-dbg"
+PKG:${PN}-pic = "glibc-pic"
+PKG:${PN}-utils = "glibc-utils"
+PKG:${PN}-mtrace = "glibc-mtrace"
+PKG:${PN}-gconv = "glibc-gconv"
+PKG:${PN}-extra-nss = "glibc-extra-nss"
+PKG:${PN}-thread-db = "glibc-thread-db"
+PKG:${PN}-pcprofile = "glibc-pcprofile"
+PKG:${PN}-staticdev = "glibc-staticdev"
+
+PKGV = "${EAT_VER_LIBC}"
+PKGV:${PN} = "${EAT_VER_LIBC}"
+PKGV:${PN}-dev = "${EAT_VER_LIBC}"
+PKGV:${PN}-doc = "${EAT_VER_LIBC}"
+PKGV:${PN}-dbg = "${EAT_VER_LIBC}"
+PKGV:${PN}-pic = "${EAT_VER_LIBC}"
+PKGV:${PN}-utils = "${EAT_VER_LIBC}"
+PKGV:${PN}-mtrace = "${EAT_VER_LIBC}"
+PKGV:${PN}-gconv = "${EAT_VER_LIBC}"
+PKGV:${PN}-extra-nss = "${EAT_VER_LIBC}"
+PKGV:${PN}-thread-db = "${EAT_VER_LIBC}"
+PKGV:${PN}-pcprofile = "${EAT_VER_LIBC}"
+PKGV:${PN}-staticdev = "${EAT_VER_LIBC}"
+PKGV:catchsegv = "${EAT_VER_LIBC}"
+PKGV:glibc-extra-nss = "${EAT_VER_LIBC}"
+PKGV:glibc-thread-db = "${EAT_VER_LIBC}"
+
+PKGV:libmemusage = "${EAT_VER_LIBC}"
+PKGV:libsegfault = "${EAT_VER_LIBC}"
+PKGV:libsotruss = "${EAT_VER_LIBC}"
+PKGV:sln = "${EAT_VER_LIBC}"
+PKGV:nscd = "${EAT_VER_LIBC}"
+PKGV:ldd = "${EAT_VER_LIBC}"
+
+PKGV:libasan-dev = "${EAT_VER_GCC}"
+PKGV:libasan = "${EAT_VER_GCC}"
+PKGV:libasan-staticdev = "${EAT_VER_GCC}"
+PKGV:libatomic-dev = "${EAT_VER_GCC}"
+PKGV:libatomic = "${EAT_VER_GCC}"
+PKGV:libatomic-staticdev = "${EAT_VER_GCC}"
+PKGV:libg2c-dev = "${EAT_VER_GCC}"
+PKGV:libg2c = "${EAT_VER_GCC}"
+PKGV:libgcc-dev = "${EAT_VER_GCC}"
+PKGV:libgcc = "${EAT_VER_GCC}"
+PKGV:libgfortran-dbg = "${EAT_VER_GCC}"
+PKGV:libgfortran-dev = "${EAT_VER_GCC}"
+PKGV:libgfortran = "${EAT_VER_GCC}"
+PKGV:libgfortran-staticdev = "${EAT_VER_GCC}"
+PKGV:libgomp-dev = "${EAT_VER_GCC}"
+PKGV:libgomp = "${EAT_VER_GCC}"
+PKGV:libgomp-staticdev = "${EAT_VER_GCC}"
+PKGV:libitm-dev = "${EAT_VER_GCC}"
+PKGV:libitm = "${EAT_VER_GCC}"
+PKGV:libitm-staticdev = "${EAT_VER_GCC}"
+PKGV:liblsan-dev = "${EAT_VER_GCC}"
+PKGV:liblsan = "${EAT_VER_GCC}"
+PKGV:liblsan-staticdev = "${EAT_VER_GCC}"
+PKGV:libmudflap-dev = "${EAT_VER_GCC}"
+PKGV:libmudflap = "${EAT_VER_GCC}"
+PKGV:libmudflap-staticdev = "${EAT_VER_GCC}"
+PKGV:libquadmath-dev = "${EAT_VER_GCC}"
+PKGV:libquadmath = "${EAT_VER_GCC}"
+PKGV:libquadmath-staticdev = "${EAT_VER_GCC}"
+PKGV:libssp-dev = "${EAT_VER_GCC}"
+PKGV:libssp = "${EAT_VER_GCC}"
+PKGV:libssp-staticdev = "${EAT_VER_GCC}"
+PKGV:libstdc++-dbg = "${EAT_VER_GCC}"
+PKGV:libstdc++-dev = "${EAT_VER_GCC}"
+PKGV:libstdc++ = "${EAT_VER_GCC}"
+PKGV:libstdc++-precompile-dev = "${EAT_VER_GCC}"
+PKGV:libstdc++-staticdev = "${EAT_VER_GCC}"
+PKGV:libtsan-dev = "${EAT_VER_GCC}"
+PKGV:libtsan = "${EAT_VER_GCC}"
+PKGV:libtsan-staticdev = "${EAT_VER_GCC}"
+PKGV:libubsan-dev = "${EAT_VER_GCC}"
+PKGV:libubsan = "${EAT_VER_GCC}"
+PKGV:libubsan-staticdev = "${EAT_VER_GCC}"
+
+PKGV:linux-libc-headers-dev = "${EAT_VER_KERNEL}"
+PKGV:linux-libc-headers = "${EAT_VER_KERNEL}"
+
+PKGV:gdbserver = "${EAT_VER_GDBSERVER}"
+
+ALLOW_EMPTY:${PN}-mtrace = "1"
+FILES:${PN}-mtrace = "${bindir}/mtrace"
+
+FILES:libgcov-staticdev = "${libdir}/gcc/${TARGET_SYS}/${BINV}/libgcov.a"
+
+FILES:libsegfault = "${base_libdir}/libSegFault*"
+
+FILES:catchsegv = "${bindir}/catchsegv"
+RDEPENDS:catchsegv = "libsegfault"
+
+# From libgfortran.inc:
+
+FILES:libgfortran = "${libdir}/libgfortran.so.*"
+FILES:libgfortran-dev = "\
+ ${libdir}/libgfortran*.so \
+ ${libdir}/libgfortran.spec \
+ ${libdir}/libgfortran.la \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/libgfortranbegin.* \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/libcaf_single* \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude/ \
+"
+FILES:libgfortran-staticdev = "${libdir}/libgfortran.a"
+
+
+# From gcc-sanitizers.inc:
+
+FILES:libasan += "${libdir}/libasan.so.* ${libdir}/libhwasan.so.*"
+FILES:libasan-dev += "\
+ ${libdir}/libasan_preinit.o \
+ ${libdir}/libasan.so \
+ ${libdir}/libhwasan.so \
+ ${libdir}/libasan.la \
+"
+FILES:libasan-staticdev += "${libdir}/libasan.a \
+ ${libdir}/libhwasan.a \
+"
+
+FILES:libubsan += "${libdir}/libubsan.so.*"
+FILES:libubsan-dev += "\
+ ${libdir}/libubsan.so \
+ ${libdir}/libubsan.la \
+"
+FILES:libubsan-staticdev += "${libdir}/libubsan.a"
+
+FILES:liblsan += "${libdir}/liblsan.so.*"
+FILES:liblsan-dev += "\
+ ${libdir}/liblsan.so \
+ ${libdir}/liblsan.la \
+ ${libdir}/liblsan_preinit.o \
+"
+FILES:liblsan-staticdev += "${libdir}/liblsan.a"
+
+FILES:libtsan += "${libdir}/libtsan.so.*"
+FILES:libtsan-dev += "\
+ ${libdir}/libtsan.so \
+ ${libdir}/libtsan.la \
+ ${libdir}/libtsan_*.o \
+"
+FILES:libtsan-staticdev += "${libdir}/libtsan.a"
+
+FILES:gcc-sanitizers = "${libdir}/*.spec ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/sanitizer/*.h"
+
+# From libgcc.inc:
+
+FILES:libgcc = "${base_libdir}/libgcc_s.so.1"
+
+FILES:libgcc-dev = "\
+ ${base_libdir}/libgcc*.so \
+ ${@oe.utils.conditional('BASETARGET_SYS', '${TARGET_SYS}', '', '${libdir}/${BASETARGET_SYS}', d)} \
+ ${libdir}/${TARGET_SYS}/${BINV}* \
+ ${libdir}/${TARGET_ARCH}${TARGET_VENDOR}* \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include \
+"
+
+FILES:linux-libc-headers = ""
+FILES:linux-libc-headers-dev = "\
+ ${includedir}/asm* \
+ ${includedir}/linux \
+ ${includedir}/mtd \
+ ${includedir}/rdma \
+ ${includedir}/scsi \
+ ${includedir}/sound \
+ ${includedir}/video \
+"
+FILES:${PN} += "\
+ ${libdir}/bin \
+ ${libdir}/locale \
+ ${libdir}/gconv/gconv-modules \
+ ${datadir}/zoneinfo \
+ ${base_libdir}/libcrypt*.so.* \
+ ${base_libdir}/libcrypt-*.so \
+ ${base_libdir}/libc.so.* \
+ ${base_libdir}/libc-*.so \
+ ${base_libdir}/libm.so.* \
+ ${base_libdir}/libmemusage.so \
+ ${base_libdir}/libm-*.so \
+ ${base_libdir}/ld*.so.* \
+ ${base_libdir}/ld-*.so \
+ ${base_libdir}/libpthread*.so.* \
+ ${base_libdir}/libpthread*.so \
+ ${base_libdir}/libpthread-*.so \
+ ${base_libdir}/libresolv*.so.* \
+ ${base_libdir}/libresolv-*.so \
+ ${base_libdir}/librt*.so.* \
+ ${base_libdir}/librt-*.so \
+ ${base_libdir}/libutil*.so.* \
+ ${base_libdir}/libutil-*.so \
+ ${base_libdir}/libnss_files*.so.* \
+ ${base_libdir}/libnss_files-*.so \
+ ${base_libdir}/libnss_compat*.so.* \
+ ${base_libdir}/libnss_compat-*.so \
+ ${base_libdir}/libnss_dns*.so.* \
+ ${base_libdir}/libnss_dns-*.so \
+ ${base_libdir}/libnss_nis*.so.* \
+ ${base_libdir}/libnss_nisplus-*.so \
+ ${base_libdir}/libnss_nisplus*.so.* \
+ ${base_libdir}/libnss_nis-*.so \
+ ${base_libdir}/libnss_hesiod*.so.* \
+ ${base_libdir}/libnss_hesiod-*.so \
+ ${base_libdir}/libdl*.so.* \
+ ${base_libdir}/libdl-*.so \
+ ${base_libdir}/libanl*.so.* \
+ ${base_libdir}/libanl-*.so \
+ ${base_libdir}/libBrokenLocale*.so.* \
+ ${base_libdir}/libBrokenLocale-*.so \
+ ${base_libdir}/libthread_db*.so.* \
+ ${base_libdir}/libthread_db-*.so \
+ ${base_libdir}/libmemusage.so \
+ ${base_libdir}/libSegFault.so \
+ ${base_libdir}/libpcprofile.so \
+ "
+
+FILES:${PN}-dbg += "${base_libdir}/debug"
+
+# From gcc-runtime.inc
+
+# include python debugging scripts
+FILES:gcc-runtime-dbg += "\
+ ${libdir}/libstdc++.so.*-gdb.py \
+ ${datadir}/gcc-${BINV}/python/libstdcxx \
+"
+
+FILES:libg2c = "${target_libdir}/libg2c.so.*"
+SUMMARY:libg2c = "Companion runtime library for g77"
+FILES:libg2c-dev = "\
+ ${libdir}/libg2c.so \
+ ${libdir}/libg2c.a \
+ ${libdir}/libfrtbegin.a \
+"
+SUMMARY:libg2c-dev = "Companion runtime library for g77 - development files"
+
+FILES:libstdc++ = "${libdir}/libstdc++.so.*"
+SUMMARY:libstdc++ = "GNU standard C++ library"
+FILES:libstdc++-dev = "\
+ /include/c++ \
+ ${includedir}/c++/ \
+ ${libdir}/libstdc++.so \
+ ${libdir}/libstdc++*.la \
+ ${libdir}/libsupc++.la \
+"
+SUMMARY:libstdc++-dev = "GNU standard C++ library - development files"
+
+FILES:libstdc++-staticdev = "\
+ ${libdir}/libstdc++*.a \
+ ${libdir}/libsupc++.a \
+"
+SUMMARY:libstdc++-staticdev = "GNU standard C++ library - static development files"
+
+FILES:libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
+SUMMARY:libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files"
+
+FILES:libssp = "${libdir}/libssp.so.*"
+SUMMARY:libssp = "GNU stack smashing protection library"
+FILES:libssp-dev = "\
+ ${libdir}/libssp*.so \
+ ${libdir}/libssp*_nonshared.a \
+ ${libdir}/libssp*.la \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp \
+"
+SUMMARY:libssp-dev = "GNU stack smashing protection library - development files"
+FILES:libssp-staticdev = "${libdir}/libssp*.a"
+SUMMARY:libssp-staticdev = "GNU stack smashing protection library - static development files"
+
+FILES:libquadmath = "${libdir}/libquadmath*.so.*"
+SUMMARY:libquadmath = "GNU quad-precision math library"
+FILES:libquadmath-dev = "\
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
+ ${libdir}/libquadmath*.so \
+ ${libdir}/libquadmath.la \
+"
+SUMMARY:libquadmath-dev = "GNU quad-precision math library - development files"
+FILES:libquadmath-staticdev = "${libdir}/libquadmath.a"
+SUMMARY:libquadmath-staticdev = "GNU quad-precision math library - static development files"
+
+# NOTE: mudflap has been removed as of gcc 4.9 and has been superseded by the address sanitiser
+FILES:libmudflap = "${libdir}/libmudflap*.so.*"
+SUMMARY:libmudflap = "Pointer debugging library for gcc"
+FILES:libmudflap-dev = "\
+ ${libdir}/libmudflap*.so \
+ ${libdir}/libmudflap.la \
+"
+SUMMARY:libmudflap-dev = "Pointer debugging library for gcc - development files"
+FILES:libmudflap-staticdev = "${libdir}/libmudflap.a"
+SUMMARY:libmudflap-staticdev = "Pointer debugging library for gcc - static development files"
+
+FILES:libgomp = "${libdir}/libgomp*${SOLIBS}"
+SUMMARY:libgomp = "GNU OpenMP parallel programming library"
+FILES:libgomp-dev = "\
+ ${libdir}/libgomp*${SOLIBSDEV} \
+ ${libdir}/libgomp*.la \
+ ${libdir}/libgomp.spec \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
+ ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
+"
+SUMMARY:libgomp-dev = "GNU OpenMP parallel programming library - development files"
+FILES:libgomp-staticdev = "${libdir}/libgomp*.a"
+SUMMARY:libgomp-staticdev = "GNU OpenMP parallel programming library - static development files"
+
+FILES:libatomic = "${libdir}/libatomic.so.*"
+SUMMARY:libatomic = "GNU C++11 atomics support library"
+FILES:libatomic-dev = "\
+ ${libdir}/libatomic.so \
+ ${libdir}/libatomic.la \
+"
+SUMMARY:libatomic-dev = "GNU C++11 atomics support library - development files"
+FILES:libatomic-staticdev = "${libdir}/libatomic.a"
+SUMMARY:libatomic-staticdev = "GNU C++11 atomics support library - static development files"
+
+FILES:libitm = "${libdir}/libitm.so.*"
+SUMMARY:libitm = "GNU transactional memory support library"
+FILES:libitm-dev = "\
+ ${libdir}/libitm.so \
+ ${libdir}/libitm.la \
+ ${libdir}/libitm.spec \
+"
+SUMMARY:libitm-dev = "GNU transactional memory support library - development files"
+FILES:libitm-staticdev = "${libdir}/libitm.a"
+SUMMARY:libitm-staticdev = "GNU transactional memory support library - static development files"
+
+EAT_VER_MAIN ??= ""
+
+python () {
+ if not d.getVar("EAT_VER_MAIN", False):
+ raise bb.parse.SkipPackage("External ARM toolchain not configured (EAT_VER_MAIN not set).")
+ if d.getVar('TCLIBC', True) != "glibc":
+ raise bb.parse.SkipPackage("incompatible with %s" % d.getVar('TCLIBC', True))
+}
diff --git a/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/files/SUPPORTED b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/files/SUPPORTED
new file mode 100644
index 0000000..9615075
--- /dev/null
+++ b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/files/SUPPORTED
@@ -0,0 +1 @@
+POSIX
diff --git a/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/gcc-aarch64-none-elf_11.2-2022.02.bb b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/gcc-aarch64-none-elf_11.2-2022.02.bb
new file mode 100644
index 0000000..2a5a4ef
--- /dev/null
+++ b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/gcc-aarch64-none-elf_11.2-2022.02.bb
@@ -0,0 +1,23 @@
+# Copyright (C) 2020 Texas Instruments Inc.
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require arm-binary-toolchain.inc
+
+COMPATIBLE_HOST = "(x86_64|aarch64).*-linux"
+
+SUMMARY = "Arm GNU Toolchain - AArch64 bare-metal target (aarch64-none-elf)"
+LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
+
+LIC_FILES_CHKSUM:aarch64 = "file://share/doc/gcc/Copying.html;md5=be4f8b5ff7319cd54f6c52db5d6f36b0"
+LIC_FILES_CHKSUM:x86-64 = "file://share/doc/gcc/Copying.html;md5=1f07179249795891179bb3798bac7887"
+
+PROVIDES = "virtual/aarch64-none-elf-gcc"
+
+SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu/${PV}/binrel/gcc-arm-${PV}-${HOST_ARCH}-${BINNAME}.tar.xz;name=gcc-${HOST_ARCH}"
+SRC_URI[gcc-aarch64.sha256sum] = "3b15725545a0211a17b63e72d4f10241f7ffbe7ce94cb9612590ceacde16992c"
+SRC_URI[gcc-x86_64.sha256sum] = "b0a015a9e8cbb44ed2fe5ad755a7a7ae254d54f93df3bf47378485b0ba8b828b"
+
+S = "${WORKDIR}/gcc-arm-${PV}-${HOST_ARCH}-${BINNAME}"
+
+UPSTREAM_CHECK_URI = "https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-a/downloads"
+UPSTREAM_CHECK_REGEX = "gcc-arm-(?P<pver>.+)-${HOST_ARCH}-${BINNAME}\.tar\.\w+"
diff --git a/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/gcc-arm-none-eabi_11.2-2022.02.bb b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/gcc-arm-none-eabi_11.2-2022.02.bb
new file mode 100644
index 0000000..26f0ee8
--- /dev/null
+++ b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/gcc-arm-none-eabi_11.2-2022.02.bb
@@ -0,0 +1,23 @@
+# Copyright (C) 2019 Garmin Ltd. or its subsidiaries
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require arm-binary-toolchain.inc
+
+COMPATIBLE_HOST = "(x86_64|aarch64).*-linux"
+
+SUMMARY = "Arm GNU Toolchain - AArch32 bare-metal target (arm-none-eabi)"
+LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
+
+LIC_FILES_CHKSUM:aarch64 = "file://share/doc/gcc/Copying.html;md5=be4f8b5ff7319cd54f6c52db5d6f36b0"
+LIC_FILES_CHKSUM:x86-64 = "file://share/doc/gcc/Copying.html;md5=1f07179249795891179bb3798bac7887"
+
+PROVIDES = "virtual/arm-none-eabi-gcc"
+
+SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu/${PV}/binrel/gcc-arm-${PV}-${HOST_ARCH}-${BINNAME}.tar.xz;name=gcc-${HOST_ARCH}"
+SRC_URI[gcc-aarch64.sha256sum] = "ef1d82e5894e3908cb7ed49c5485b5b95deefa32872f79c2b5f6f5447cabf55f"
+SRC_URI[gcc-x86_64.sha256sum] = "8c5acd5ae567c0100245b0556941c237369f210bceb196edfe5a2e7532c60326"
+
+S = "${WORKDIR}/gcc-arm-${PV}-${HOST_ARCH}-${BINNAME}"
+
+UPSTREAM_CHECK_URI = "https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/downloads"
+UPSTREAM_CHECK_REGEX = "${BPN}-(?P<pver>.+)-${HOST_ARCH}-linux\.tar\.\w+"
diff --git a/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc
new file mode 100644
index 0000000..4260dc7
--- /dev/null
+++ b/meta-arm/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/license.inc
@@ -0,0 +1,79 @@
+LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only & GPL-2.0-only & LGPL-3.0-only & LGPL-2.1-only & LGPL-2.0-only"
+
+EAT_BFD_LICENSE = "GPL-3.0-only"
+EAT_GCC_LICENSE = "GPL-3.0-with-GCC-exception & GPL-3.0-only"
+EAT_GDB_LICENSE = "GPL-3.0-only"
+EAT_LIBC_LICENSE = "GPL-2.0-only & LGPL-2.1-only"
+EAT_RLE_LICENSE = "GPL-3.0-with-GCC-exception"
+
+LICENSE:${PN} = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-dev = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-doc = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-dbg = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-pic = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-utils = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-mtrace = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-gconv = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-extra-nss = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-thread-db = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-pcprofile = "${EAT_LIBC_LICENSE}"
+LICENSE:${PN}-staticdev = "${EAT_LIBC_LICENSE}"
+LICENSE:catchsegv = "${EAT_LIBC_LICENSE}"
+LICENSE:glibc-extra-nss = "${EAT_LIBC_LICENSE}"
+LICENSE:glibc-thread-db = "${EAT_LIBC_LICENSE}"
+
+LICENSE:libmemusage = "${EAT_LIBC_LICENSE}"
+LICENSE:libsegfault = "${EAT_LIBC_LICENSE}"
+LICENSE:libsotruss = "${EAT_LIBC_LICENSE}"
+LICENSE:sln = "${EAT_LIBC_LICENSE}"
+LICENSE:nscd = "${EAT_LIBC_LICENSE}"
+LICENSE:ldd = "${EAT_LIBC_LICENSE}"
+
+LICENSE:libasan-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libasan = "${EAT_GCC_LICENSE}"
+LICENSE:libasan-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libatomic-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libatomic = "${EAT_GCC_LICENSE}"
+LICENSE:libatomic-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libg2c-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libg2c = "${EAT_GCC_LICENSE}"
+LICENSE:libgcc-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libgcc = "${EAT_GCC_LICENSE}"
+LICENSE:libgfortran-dbg = "${EAT_GCC_LICENSE}"
+LICENSE:libgfortran-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libgfortran = "${EAT_GCC_LICENSE}"
+LICENSE:libgfortran-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libgomp-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libgomp = "${EAT_GCC_LICENSE}"
+LICENSE:libgomp-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libitm-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libitm = "${EAT_GCC_LICENSE}"
+LICENSE:libitm-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:liblsan-dev = "${EAT_GCC_LICENSE}"
+LICENSE:liblsan = "${EAT_GCC_LICENSE}"
+LICENSE:liblsan-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libmudflap-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libmudflap = "${EAT_GCC_LICENSE}"
+LICENSE:libmudflap-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libquadmath-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libquadmath = "${EAT_GCC_LICENSE}"
+LICENSE:libquadmath-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libssp-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libssp = "${EAT_GCC_LICENSE}"
+LICENSE:libssp-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libstdc++-dbg = "${EAT_GCC_LICENSE}"
+LICENSE:libstdc++-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libstdc++ = "${EAT_GCC_LICENSE}"
+LICENSE:libstdc++-precompile-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libstdc++-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libtsan-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libtsan = "${EAT_GCC_LICENSE}"
+LICENSE:libtsan-staticdev = "${EAT_GCC_LICENSE}"
+LICENSE:libubsan-dev = "${EAT_GCC_LICENSE}"
+LICENSE:libubsan = "${EAT_GCC_LICENSE}"
+LICENSE:libubsan-staticdev = "${EAT_GCC_LICENSE}"
+
+LICENSE:linux-libc-headers-dev = "GPL-2.0-only"
+LICENSE:linux-libc-headers = "GPL-2.0-only"
+
+LICENSE:gdbserver = "GPL-2.0-only & GPL-3.0-only & LGPL-2.0-only & LGPL-3.0-only"