From 310f33fc0cf78deccf069fc5d6af7e63685f15e6 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Mon, 27 Jan 2025 07:23:15 -0600 Subject: [PATCH] gcc-arm-none-eabi: Downgrade 13.3.rel1 -> 12.3.rel1 [YOCIMX-8727] imx-system-manager is qualified with 12.3, but meta-arm uses 13.3, so copy the older recipe to the BSP. Signed-off-by: Tom Hochstein (cherry picked from commit b816ea522d3acb66ca20c184e4d3f3ad4271f87c) --- .../arm-binary-toolchain.inc | 31 +++++++++++++++++++ .../gcc-arm-none-eabi_12.3.rel1.bb | 21 +++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 meta-imx-bsp/recipes-devtools/external-arm-toolchain/arm-binary-toolchain.inc create mode 100644 meta-imx-bsp/recipes-devtools/external-arm-toolchain/gcc-arm-none-eabi_12.3.rel1.bb diff --git a/meta-imx-bsp/recipes-devtools/external-arm-toolchain/arm-binary-toolchain.inc b/meta-imx-bsp/recipes-devtools/external-arm-toolchain/arm-binary-toolchain.inc new file mode 100644 index 0000000000..0e039a5be1 --- /dev/null +++ b/meta-imx-bsp/recipes-devtools/external-arm-toolchain/arm-binary-toolchain.inc @@ -0,0 +1,31 @@ +INHIBIT_DEFAULT_DEPS = "1" + +FILES:${PN} = "${libexecdir} ${bindir}" + +BINNAME = "${@d.getVar("BPN").strip("gcc-")}" + +do_install() { + install -d ${D}${bindir} ${D}${libexecdir}/${BP}/ + cp -r ${S}/. ${D}${libexecdir}/${BP} + + # Symlink all executables into bindir + for f in ${D}${libexecdir}/${BP}/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" + +# Skipping file deps - we don't control the dependencies for prebuilt libraries, resulting in +# nothing provides libcrypt.so.1()(64bit) needed by nativesdk-gcc-arm-none-eabi +# when packaged as RPM for SDK. +SKIP_FILEDEPS="1" diff --git a/meta-imx-bsp/recipes-devtools/external-arm-toolchain/gcc-arm-none-eabi_12.3.rel1.bb b/meta-imx-bsp/recipes-devtools/external-arm-toolchain/gcc-arm-none-eabi_12.3.rel1.bb new file mode 100644 index 0000000000..6c33ec65b5 --- /dev/null +++ b/meta-imx-bsp/recipes-devtools/external-arm-toolchain/gcc-arm-none-eabi_12.3.rel1.bb @@ -0,0 +1,21 @@ +# 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=0aef214b835259b64f026f4ad00c703e" +LIC_FILES_CHKSUM:x86-64 = "file://share/doc/gcc/Copying.html;md5=7ba3bc8ef145b48e2756a844db2029a3" + +SRC_URI = "https://developer.arm.com/-/media/Files/downloads/gnu/${PV}/binrel/arm-gnu-toolchain-${PV}-${HOST_ARCH}-${BINNAME}.tar.xz;name=gcc-${HOST_ARCH}" +SRC_URI[gcc-aarch64.sha256sum] = "14c0487d5753f6071d24e568881f7c7e67f80dd83165dec5164b3731394af431" +SRC_URI[gcc-x86_64.sha256sum] = "12a2815644318ebcceaf84beabb665d0924b6e79e21048452c5331a56332b309" + +S = "${WORKDIR}/arm-gnu-toolchain-${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.+)-${HOST_ARCH}-linux\.tar\.\w+"