diff --git a/.config.yaml b/.config.yaml index 0d85d68..a90a11a 100644 --- a/.config.yaml +++ b/.config.yaml @@ -41,6 +41,9 @@ local_conf_header: RAUC_CERT_FILE = "${TOPDIR}/../examples/rauc/development-1.cert.pem" RAUC_KEYRING_URI = "file://${TOPDIR}/../examples/rauc/ca.cert.pem" RAUC_KEYRING_FILE = "${TOPDIR}/../examples/rauc/ca.cert.pem" + meta-clang: | + # mask the llvm recipe provided by kirkstone to avoid warnings: + BBMASK += "/poky/meta/recipes-devtools/llvm/" repos: # This entry includes the repository where the config file is located # to the bblayers.conf: @@ -88,7 +91,6 @@ repos: path: ./ layers: meta-leda-bsp: - meta-leda-backports: meta-leda-components: meta-leda-distro: meta-leda-distro-container: diff --git a/kas/.config-components.yaml b/kas/.config-components.yaml index f11e13d..c43319f 100644 --- a/kas/.config-components.yaml +++ b/kas/.config-components.yaml @@ -30,6 +30,9 @@ local_conf_header: needed-features: | DISTRO_FEATURES += " sdv rauc virtualization" INHERIT += " rm_work" + meta-clang: | + # mask the llvm recipe provided by kirkstone to avoid warnings: + BBMASK += "/poky/meta/recipes-devtools/llvm/" repos: poky: url: "https://git.yoctoproject.org/git/poky" @@ -67,5 +70,4 @@ repos: meta-leda: path: ./ layers: - meta-leda-backports: meta-leda-components: \ No newline at end of file diff --git a/kas/.config-kirkstone-rpi4.yaml b/kas/.config-kirkstone-rpi4.yaml index 6bd43b7..13c91f5 100644 --- a/kas/.config-kirkstone-rpi4.yaml +++ b/kas/.config-kirkstone-rpi4.yaml @@ -41,6 +41,9 @@ local_conf_header: RAUC_CERT_FILE = "${COREBASE}/../examples/rauc/development-1.cert.pem" RAUC_KEYRING_URI = "file://${TOPDIR}/../examples/rauc/ca.cert.pem" RAUC_KEYRING_FILE = "${TOPDIR}/../examples/rauc/ca.cert.pem" + meta-clang: | + # mask the llvm recipe provided by kirkstone to avoid warnings: + BBMASK += "/poky/meta/recipes-devtools/llvm/" repos: # This entry includes the repository where the config file is located # to the bblayers.conf: @@ -91,7 +94,6 @@ repos: path: ./ layers: meta-leda-bsp: - meta-leda-backports: meta-leda-components: meta-leda-distro: meta-leda-distro-container: \ No newline at end of file diff --git a/kas/.config-kirkstone.yaml b/kas/.config-kirkstone.yaml index 91404b9..67a45ad 100644 --- a/kas/.config-kirkstone.yaml +++ b/kas/.config-kirkstone.yaml @@ -41,6 +41,9 @@ local_conf_header: RAUC_CERT_FILE = "${TOPDIR}/../examples/rauc/development-1.cert.pem" RAUC_KEYRING_URI = "file://${TOPDIR}/../examples/rauc/ca.cert.pem" RAUC_KEYRING_FILE = "${TOPDIR}/../examples/rauc/ca.cert.pem" + meta-clang: | + # mask the llvm recipe provided by kirkstone to avoid warnings: + BBMASK += "/poky/meta/recipes-devtools/llvm/" repos: # This entry includes the repository where the config file is located # to the bblayers.conf: @@ -88,7 +91,6 @@ repos: path: ./ layers: meta-leda-bsp: - meta-leda-backports: meta-leda-components: meta-leda-distro: meta-leda-distro-container: \ No newline at end of file diff --git a/kas/.config-master.yaml b/kas/.config-master.yaml index 3f2c674..7690dd6 100644 --- a/kas/.config-master.yaml +++ b/kas/.config-master.yaml @@ -41,6 +41,9 @@ local_conf_header: RAUC_CERT_FILE = "${TOPDIR}/../examples/rauc/development-1.cert.pem" RAUC_KEYRING_URI = "file://${TOPDIR}/../examples/rauc/ca.cert.pem" RAUC_KEYRING_FILE = "${TOPDIR}/../examples/rauc/ca.cert.pem" + meta-clang: | + # mask the llvm recipe provided by kirkstone to avoid warnings: + BBMASK += "/poky/meta/recipes-devtools/llvm/" repos: # This entry includes the repository where the config file is located # to the bblayers.conf: @@ -88,7 +91,6 @@ repos: path: ./ layers: meta-leda-bsp: - meta-leda-backports: meta-leda-components: meta-leda-distro: meta-leda-distro-container: \ No newline at end of file diff --git a/meta-leda-backports/conf/layer.conf b/meta-leda-backports/conf/layer.conf deleted file mode 100644 index f6a5cb1..0000000 --- a/meta-leda-backports/conf/layer.conf +++ /dev/null @@ -1,25 +0,0 @@ -# /******************************************************************************** -# * Copyright (c) 2022 Contributors to the Eclipse Foundation -# * -# * See the NOTICE file(s) distributed with this work for additional -# * information regarding copyright ownership. -# * -# * This program and the accompanying materials are made available under the -# * terms of the Apache License 2.0 which is available at -# * https://www.apache.org/licenses/LICENSE-2.0 -# * -# * SPDX-License-Identifier: Apache-2.0 -# ********************************************************************************/ - -# We have a conf and classes directory, add to BBPATH -BBPATH .= ":${LAYERDIR}" - -# We have recipes-* directories, add to BBFILES -BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ - ${LAYERDIR}/recipes-*/*/*.bbappend" - -BBFILE_COLLECTIONS += "meta-leda-backports" -BBFILE_PATTERN_meta-leda-backports := "^${LAYERDIR}/" -BBFILE_PRIORITY_meta-leda-backports = "7" - -LAYERSERIES_COMPAT_meta-leda-backports = "kirkstone" diff --git a/meta-leda-backports/recipes-devtools/COPYING.MIT b/meta-leda-backports/recipes-devtools/COPYING.MIT deleted file mode 100644 index fb950dc..0000000 --- a/meta-leda-backports/recipes-devtools/COPYING.MIT +++ /dev/null @@ -1,17 +0,0 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/meta-leda-backports/recipes-devtools/llvm/llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch b/meta-leda-backports/recipes-devtools/llvm/llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch deleted file mode 100644 index 48af6fc..0000000 --- a/meta-leda-backports/recipes-devtools/llvm/llvm/0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 86940d87026432683fb6741cd8a34d3b9b18e40d Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 27 Nov 2020 10:11:08 +0000 -Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well - -Otherwise, there are instances which are identical in -every other field and therefore sort non-reproducibly -(which breaks binary and source reproducibiliy). - -Upstream-Status: Submitted [https://reviews.llvm.org/D97477] -Signed-off-by: Alexander Kanavin ---- - llvm/utils/TableGen/AsmMatcherEmitter.cpp | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp -index ccf0959389b..1f801e83b7d 100644 ---- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp -+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp -@@ -359,7 +359,10 @@ public: - // name of a class shouldn't be significant. However, some of the backends - // accidentally rely on this behaviour, so it will have to stay like this - // until they are fixed. -- return ValueName < RHS.ValueName; -+ if (ValueName != RHS.ValueName) -+ return ValueName < RHS.ValueName; -+ // All else being equal, we should sort by name, for source and binary reproducibility -+ return Name < RHS.Name; - } - }; - diff --git a/meta-leda-backports/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch b/meta-leda-backports/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch deleted file mode 100644 index b01b864..0000000 --- a/meta-leda-backports/recipes-devtools/llvm/llvm/0007-llvm-allow-env-override-of-exe-path.patch +++ /dev/null @@ -1,37 +0,0 @@ -Upstream-Status: Pending -Signed-off-by: Khem Raj - -From 61b00e1e051e367f5483d7b5253b6c85a9e8a90f Mon Sep 17 00:00:00 2001 -From: Martin Kelly -Date: Fri, 19 May 2017 00:22:57 -0700 -Subject: [PATCH] llvm: allow env override of exe path - -When using a native llvm-config from inside a sysroot, we need llvm-config to -return the libraries, include directories, etc. from inside the sysroot rather -than from the native sysroot. Thus provide an env override for calling -llvm-config from a target sysroot. - -Signed-off-by: Martin Kelly -Signed-off-by: Khem Raj ---- - llvm/tools/llvm-config/llvm-config.cpp | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/llvm/tools/llvm-config/llvm-config.cpp b/llvm/tools/llvm-config/llvm-config.cpp -index 7ef7c46a262..a4f7ed82c7b 100644 ---- a/llvm/tools/llvm-config/llvm-config.cpp -+++ b/llvm/tools/llvm-config/llvm-config.cpp -@@ -225,6 +225,13 @@ Typical components:\n\ - - /// Compute the path to the main executable. - std::string GetExecutablePath(const char *Argv0) { -+ // Hack for Yocto: we need to override the root path when we are using -+ // llvm-config from within a target sysroot. -+ const char *Sysroot = std::getenv("YOCTO_ALTERNATE_EXE_PATH"); -+ if (Sysroot != nullptr) { -+ return Sysroot; -+ } -+ - // This just needs to be some symbol in the binary; C++ doesn't - // allow taking the address of ::main however. - void *P = (void *)(intptr_t)GetExecutablePath; diff --git a/meta-leda-backports/recipes-devtools/llvm/llvm/llvm-config b/meta-leda-backports/recipes-devtools/llvm/llvm/llvm-config deleted file mode 100644 index 5e4ded2..0000000 --- a/meta-leda-backports/recipes-devtools/llvm/llvm/llvm-config +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# -# Copyright OpenEmbedded Contributors -# -# SPDX-License-Identifier: MIT -# -# Wrap llvm-config since the native llvm-config will remap some values correctly -# if placed in the target sysroot but for flags, it would provide the native ones. -# Provide ours from the environment instead. - -NEXT_LLVM_CONFIG="$(which -a llvm-config | sed -n 2p)" -if [[ $# == 0 ]]; then - exec "$NEXT_LLVM_CONFIG" -fi - -remain="" -output="" -for arg in "$@"; do - case "$arg" in - --cppflags) - output="${output} ${CPPFLAGS}" - ;; - --cflags) - output="${output} ${CFLAGS}" - ;; - --cxxflags) - output="${output} ${CXXFLAGS}" - ;; - --ldflags) - output="${output} ${LDFLAGS}" - ;; - --shared-mode) - output="${output} shared" - ;; - --libs) - output="${output} -lLLVM" - ;; - --link-shared) - break - ;; - *) - remain="${remain} ${arg}" - ;; - esac -done - -if [ "${remain}" != "" ]; then - output="${output} "$("$NEXT_LLVM_CONFIG" ${remain}) -fi - -echo "${output}" diff --git a/meta-leda-backports/recipes-devtools/llvm/llvm_git.bb b/meta-leda-backports/recipes-devtools/llvm/llvm_git.bb deleted file mode 100644 index 25c0a43..0000000 --- a/meta-leda-backports/recipes-devtools/llvm/llvm_git.bb +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright (C) 2017 Khem Raj -# Released under the MIT license (see COPYING.MIT for the terms) - -DESCRIPTION = "The LLVM Compiler Infrastructure" -HOMEPAGE = "http://llvm.org" -LICENSE = "Apache-2.0-with-LLVM-exception" -SECTION = "devel" - -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=8a15a0759ef07f2682d2ba4b893c9afe" - -DEPENDS = "libffi libxml2 zlib libedit ninja-native llvm-native" - -COMPATIBLE_HOST:riscv64 = "null" -COMPATIBLE_HOST:riscv32 = "null" - -RDEPENDS:${PN}:append:class-target = " ncurses-terminfo" - -inherit cmake pkgconfig - -PROVIDES += "llvm${PV}" - -PV = "14.0.6" - -MAJOR_VERSION = "${@oe.utils.trim_version("${PV}", 1)}" - -LLVM_RELEASE = "${PV}" - -BRANCH = "release/${MAJOR_VERSION}.x" -SRCREV = "f28c006a5895fc0e329fe15fead81e37457cb1d1" -SRC_URI = "git://github.com/llvm/llvm-project.git;branch=${BRANCH};protocol=https \ - file://0007-llvm-allow-env-override-of-exe-path.patch;striplevel=2 \ - file://0001-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch;striplevel=2 \ - file://llvm-config \ - " - -UPSTREAM_CHECK_GITTAGREGEX = "llvmorg-(?P\d+(\.\d+)+)" - -S = "${WORKDIR}/git/llvm" - -LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install" - -def get_llvm_arch(bb, d, arch_var): - import re - a = d.getVar(arch_var) - if re.match(r'(i.86|athlon|x86.64)$', a): return 'X86' - elif re.match(r'arm$', a): return 'ARM' - elif re.match(r'armeb$', a): return 'ARM' - elif re.match(r'aarch64$', a): return 'AArch64' - elif re.match(r'aarch64_be$', a): return 'AArch64' - elif re.match(r'mips(isa|)(32|64|)(r6|)(el|)$', a): return 'Mips' - elif re.match(r'riscv(32|64)(eb|)$', a): return 'RISCV' - elif re.match(r'p(pc|owerpc)(|64)', a): return 'PowerPC' - else: - raise bb.parse.SkipRecipe("Cannot map '%s' to a supported LLVM architecture" % a) - -def get_llvm_host_arch(bb, d): - return get_llvm_arch(bb, d, 'HOST_ARCH') - -PACKAGECONFIG ??= "" -# if optviewer OFF, force the modules to be not found or the ones on the host would be found -PACKAGECONFIG[optviewer] = ",-DPY_PYGMENTS_FOUND=OFF -DPY_PYGMENTS_LEXERS_C_CPP_FOUND=OFF -DPY_YAML_FOUND=OFF,python3-pygments python3-pyyaml,python3-pygments python3-pyyaml" - -# -# Default to build all OE-Core supported target arches (user overridable). -# -LLVM_TARGETS ?= "AMDGPU;${@get_llvm_host_arch(bb, d)}" - -ARM_INSTRUCTION_SET:armv5 = "arm" -ARM_INSTRUCTION_SET:armv4t = "arm" - -EXTRA_OECMAKE += "-DLLVM_ENABLE_ASSERTIONS=OFF \ - -DLLVM_ENABLE_EXPENSIVE_CHECKS=OFF \ - -DLLVM_ENABLE_PIC=ON \ - -DLLVM_BINDINGS_LIST='' \ - -DLLVM_LINK_LLVM_DYLIB=ON \ - -DLLVM_ENABLE_FFI=ON \ - -DLLVM_ENABLE_RTTI=ON \ - -DFFI_INCLUDE_DIR=$(pkg-config --variable=includedir libffi) \ - -DLLVM_OPTIMIZED_TABLEGEN=ON \ - -DLLVM_TARGETS_TO_BUILD='${LLVM_TARGETS}' \ - -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON \ - -DPYTHON_EXECUTABLE=${HOSTTOOLS_DIR}/python3 \ - -G Ninja" - -EXTRA_OECMAKE:append:class-target = "\ - -DCMAKE_CROSSCOMPILING:BOOL=ON \ - -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ - -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ - " - -EXTRA_OECMAKE:append:class-nativesdk = "\ - -DCMAKE_CROSSCOMPILING:BOOL=ON \ - -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen${PV} \ - -DLLVM_CONFIG_PATH=${STAGING_BINDIR_NATIVE}/llvm-config${PV} \ - " - -# patch out build host paths for reproducibility -do_compile:prepend:class-target() { - sed -i -e "s,${WORKDIR},,g" ${B}/tools/llvm-config/BuildVariables.inc -} - -do_compile() { - ninja -v ${PARALLEL_MAKE} -} - -do_compile:class-native() { - ninja -v ${PARALLEL_MAKE} llvm-config llvm-tblgen -} - -do_install() { - DESTDIR=${D} ninja -v install - - # llvm harcodes usr/lib as install path, so this corrects it to actual libdir - mv -T -n ${D}/${prefix}/lib ${D}/${libdir} || true - - # Remove opt-viewer: https://llvm.org/docs/Remarks.html - rm -rf ${D}${datadir}/opt-viewer - rmdir ${D}${datadir} - - # reproducibility - sed -i -e 's,${WORKDIR},,g' ${D}/${libdir}/cmake/llvm/LLVMConfig.cmake -} - -do_install:class-native() { - install -D -m 0755 ${B}/bin/llvm-tblgen ${D}${bindir}/llvm-tblgen${PV} - install -D -m 0755 ${B}/bin/llvm-config ${D}${bindir}/llvm-config${PV} - ln -sf llvm-config${PV} ${D}${bindir}/llvm-config -} - -SYSROOT_PREPROCESS_FUNCS:append:class-target = " llvm_sysroot_preprocess" - -llvm_sysroot_preprocess() { - install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ - install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ - ln -sf llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV} -} - -PACKAGES =+ "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-libllvm ${PN}-liboptremarks ${PN}-liblto" - -RRECOMMENDS:${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello ${PN}-liboptremarks" - -FILES:${PN}-bugpointpasses = "\ - ${libdir}/BugpointPasses.so \ -" - -FILES:${PN}-libllvm = "\ - ${libdir}/libLLVM-${MAJOR_VERSION}.so \ -" - -FILES:${PN}-liblto += "\ - ${libdir}/libLTO.so.* \ -" - -FILES:${PN}-liboptremarks += "\ - ${libdir}/libRemarks.so.* \ -" - -FILES:${PN}-llvmhello = "\ - ${libdir}/LLVMHello.so \ -" - -FILES:${PN}-dev += " \ - ${libdir}/llvm-config \ - ${libdir}/libRemarks.so \ - ${libdir}/libLLVM-${PV}.so \ -" - -FILES:${PN}-staticdev += "\ - ${libdir}/*.a \ -" - -INSANE_SKIP:${PN}-libllvm += "dev-so" - -BBCLASSEXTEND = "native nativesdk"