Complete Yocto mirror with license table for TQMa6UL (2038-compliance)
- 264 license table entries with exact download URLs (224/264 resolved) - Complete sources/ directory with all BitBake recipes - Build configuration: tqma6ul-multi-mba6ulx, spaetzle (musl) - Full traceability for Softwarefreigabeantrag - GCC 13.4.0, Linux 6.6.102, U-Boot 2023.04, musl 1.2.4 - License distribution: GPL-2.0 (24), MIT (23), GPL-2.0+ (18), BSD-3 (16)
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
require cmake.inc
|
||||
inherit native
|
||||
|
||||
DEPENDS += "bzip2-replacement-native xz-native zlib-native ncurses-native zstd-native openssl-native"
|
||||
|
||||
SRC_URI += "file://OEToolchainConfig.cmake \
|
||||
file://environment.d-cmake.sh \
|
||||
file://0005-Disable-use-of-ext2fs-ext2_fs.h-by-cmake-s-internal-.patch \
|
||||
file://0001-CMakeLists.txt-disable-USE_NGHTTP2.patch \
|
||||
"
|
||||
|
||||
LICENSE:append = " & BSD-1-Clause & MIT & BSD-2-Clause & curl"
|
||||
LIC_FILES_CHKSUM:append = " \
|
||||
file://Utilities/cmjsoncpp/LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926 \
|
||||
file://Utilities/cmlibarchive/COPYING;md5=d499814247adaee08d88080841cb5665 \
|
||||
file://Utilities/cmexpat/COPYING;md5=9e2ce3b3c4c0f2670883a23bbd7c37a9 \
|
||||
file://Utilities/cmlibrhash/COPYING;md5=a8c2a557a5c53b1c12cddbee98c099af \
|
||||
file://Utilities/cmlibuv/LICENSE;md5=ad93ca1fffe931537fcf64f6fcce084d \
|
||||
file://Utilities/cmcurl/COPYING;md5=db8448a1e43eb2125f7740fc397db1f6 \
|
||||
"
|
||||
|
||||
B = "${WORKDIR}/build"
|
||||
do_configure[cleandirs] = "${B}"
|
||||
|
||||
CMAKE_EXTRACONF = "\
|
||||
-DCMAKE_LIBRARY_PATH=${STAGING_LIBDIR_NATIVE} \
|
||||
-DBUILD_CursesDialog=1 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_CPPDAP=0 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_EXPAT=0 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_CURL=0 \
|
||||
-DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
|
||||
-DHAVE_SYS_ACL_H=0 \
|
||||
"
|
||||
|
||||
do_configure () {
|
||||
${S}/bootstrap --verbose --prefix=${prefix} \
|
||||
${@oe.utils.parallel_make_argument(d, '--parallel=%d')} \
|
||||
${@bb.utils.contains('CCACHE', 'ccache ', '--enable-ccache', '', d)} \
|
||||
-- ${CMAKE_EXTRACONF}
|
||||
}
|
||||
|
||||
do_compile() {
|
||||
oe_runmake
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake 'DESTDIR=${D}' install
|
||||
|
||||
# The following codes are here because eSDK needs to provide compatibility
|
||||
# for SDK. That is, eSDK could also be used like traditional SDK.
|
||||
mkdir -p ${D}${datadir}/cmake
|
||||
install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
|
||||
mkdir -p ${D}${base_prefix}/environment-setup.d
|
||||
install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${base_prefix}/environment-setup.d/cmake.sh
|
||||
|
||||
# Help docs create tons of files in the native sysroot and aren't needed there
|
||||
rm -rf ${D}${datadir}/cmake-*/Help
|
||||
}
|
||||
|
||||
do_compile[progress] = "percent"
|
||||
|
||||
SYSROOT_DIRS_NATIVE += "${datadir}/cmake ${base_prefix}/environment-setup.d"
|
||||
27
sources/poky/meta/recipes-devtools/cmake/cmake.inc
Normal file
27
sources/poky/meta/recipes-devtools/cmake/cmake.inc
Normal file
@@ -0,0 +1,27 @@
|
||||
# Copyright (C) 2005, Koninklijke Philips Electronics NV. All Rights Reserved
|
||||
# Released under the MIT license (see packages/COPYING)
|
||||
|
||||
SUMMARY = "Cross-platform, open-source make system"
|
||||
DESCRIPTION = "CMake is used to control the software compilation process \
|
||||
using simple platform and compiler independent configuration files. CMake \
|
||||
generates native makefiles and workspaces that can be used in the compiler \
|
||||
environment of your choice."
|
||||
HOMEPAGE = "http://www.cmake.org/"
|
||||
BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php"
|
||||
SECTION = "console/utils"
|
||||
LICENSE = "BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://Copyright.txt;md5=9d3d12c5f3b4c1f83650adcc65b59c06 \
|
||||
file://Source/cmake.h;beginline=1;endline=2;md5=a5f70e1fef8614734eae0d62b4f5891b \
|
||||
"
|
||||
|
||||
CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:2])}"
|
||||
|
||||
SRC_URI = "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
|
||||
file://0001-CMakeDetermineCompilerABI-Strip-pipe-from-compile-fl.patch \
|
||||
"
|
||||
|
||||
SRC_URI[sha256sum] = "72b7570e5c8593de6ac4ab433b73eab18c5fb328880460c86ce32608141ad5c1"
|
||||
|
||||
UPSTREAM_CHECK_REGEX = "cmake-(?P<pver>\d+(\.\d+)+)\.tar"
|
||||
|
||||
CVE_STATUS[CVE-2016-10642] = "cpe-incorrect: This is specific to the npm package that installs cmake, so isn't relevant to OpenEmbedded"
|
||||
@@ -0,0 +1,52 @@
|
||||
From bd94bbdc35a9da4c73d538e0cc55bc95944f620d Mon Sep 17 00:00:00 2001
|
||||
From: Philip Lorenz <philip.lorenz@bmw.de>
|
||||
Date: Mon, 3 Jun 2024 13:19:24 +0200
|
||||
Subject: [PATCH] CMakeDetermineCompilerABI: Strip -pipe from compile flags
|
||||
|
||||
When `-pipe` is enabled, GCC passes data between its different
|
||||
executables using pipes instead of temporary files. This leads to issues
|
||||
when cmake attempts to infer compiler internals via the `-v` parameter
|
||||
as each executable will print to `stderr` in parallel.
|
||||
|
||||
For example we have observed the following outputs in our builds which
|
||||
sporadically lead to build failures as system include directories were
|
||||
not detected reliably:
|
||||
|
||||
Parsed CXX implicit include dir info from above output: rv=done
|
||||
found start of include info
|
||||
found start of implicit include info
|
||||
add: [.../usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/11.4.0/include]
|
||||
add: [.../usr/bin/x86_64-poky-linux/../../lib/x86_64-poky-linux/gcc/x86_64-poky-linux/11.4.0/include-fixed]
|
||||
add: [.../usr/include/c++/11.4.0]
|
||||
add: [.../usr/include/c++/11.4.0/x86_64-poky-linux]
|
||||
add: [.../usr/include/c++/11.4.0/backward]
|
||||
add: [.../usr/lib/x86_64-poky-linux/11.4.0/include]
|
||||
add: [...GNU assembler version 2.38 (x86_64-poky-linux) using BFD version (GNU Binutils) 2.38.20220708]
|
||||
add: [/usr/include]
|
||||
end of search list found
|
||||
|
||||
Fix this issue by stripping the `-pipe` parameter from the compilation
|
||||
flag when determining the toolchain configuration.
|
||||
|
||||
Upstream-Status: Backport [3.32.0, 71be059f3f32b6791427893a48ba4815a19e2e78]
|
||||
Signed-off-by: Philip Lorenz <philip.lorenz@bmw.de>
|
||||
---
|
||||
Modules/CMakeDetermineCompilerABI.cmake | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
|
||||
index efc18f93c2..f2e40479b1 100644
|
||||
--- a/Modules/CMakeDetermineCompilerABI.cmake
|
||||
+++ b/Modules/CMakeDetermineCompilerABI.cmake
|
||||
@@ -43,6 +43,11 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
|
||||
|
||||
# Avoid failing ABI detection on warnings.
|
||||
string(REGEX REPLACE "(^| )-Werror([= ][^-][^ ]*)?( |$)" " " CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}")
|
||||
+ # Avoid passing of "-pipe" when determining the compiler internals. With
|
||||
+ # "-pipe" GCC will use pipes to pass data between the involved
|
||||
+ # executables. This may lead to issues when their stderr output (which
|
||||
+ # contains the relevant compiler internals) becomes interweaved.
|
||||
+ string(REGEX REPLACE "(^| )-pipe( |$)" " " CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}")
|
||||
|
||||
# Save the current LC_ALL, LC_MESSAGES, and LANG environment variables
|
||||
# and set them to "C" that way GCC's "search starts here" text is in
|
||||
@@ -0,0 +1,35 @@
|
||||
From d33d8a5e9f3b25a80d47b72b1a8a6624a85563c1 Mon Sep 17 00:00:00 2001
|
||||
From: Changqing Li <changqing.li@windriver.com>
|
||||
Date: Wed, 28 Dec 2022 17:51:27 +0800
|
||||
Subject: [PATCH] CMakeLists.txt: disable USE_NGHTTP2
|
||||
|
||||
nghttp2 depends on cmake-native to build, to break circular
|
||||
dependency, disable nghttp2.
|
||||
|
||||
Upstream-Status: Inappropriate [oe specific]
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
|
||||
Adjust the patch to apply on top of v3.28.3.
|
||||
|
||||
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
|
||||
---
|
||||
Utilities/cmcurl/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Utilities/cmcurl/CMakeLists.txt b/Utilities/cmcurl/CMakeLists.txt
|
||||
index 9387247366..d3de01f4e8 100644
|
||||
--- a/Utilities/cmcurl/CMakeLists.txt
|
||||
+++ b/Utilities/cmcurl/CMakeLists.txt
|
||||
@@ -88,7 +88,7 @@ set(HTTP_ONLY OFF CACHE INTERNAL "Curl is not http-only")
|
||||
set(PICKY_COMPILER OFF CACHE INTERNAL "Enable picky compiler options")
|
||||
set(SHARE_LIB_OBJECT OFF)
|
||||
set(USE_LIBIDN2 ON)
|
||||
-set(USE_NGHTTP2 ON)
|
||||
+set(USE_NGHTTP2 OFF)
|
||||
set(USE_NGTCP2 OFF)
|
||||
set(USE_QUICHE OFF)
|
||||
set(USE_WIN32_IDN OFF)
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@@ -0,0 +1,205 @@
|
||||
From 49576cf1df618609be4aa1000749ad087c143df0 Mon Sep 17 00:00:00 2001
|
||||
From: John Drouhard <john@drouhard.dev>
|
||||
Date: Thu, 9 Jan 2025 20:34:42 -0600
|
||||
Subject: [PATCH] ctest: Allow arbitrary characters in test names of
|
||||
CTestCostData.txt
|
||||
|
||||
This changes the way lines in CTestCostData.txt are parsed to allow for
|
||||
spaces in the test name.
|
||||
|
||||
It does so by looking for space characters from the end; and once two
|
||||
have been found, assumes everything from the beginning up to that
|
||||
second-to-last-space is the test name.
|
||||
|
||||
Additionally, parsing the file should be much more efficient since there
|
||||
is no string or vector heap allocation per line. The std::string used by
|
||||
the parse function to convert the int and float should be within most
|
||||
standard libraries' small string optimization.
|
||||
|
||||
Fixes: #26594
|
||||
|
||||
Upstream-Status: Backport [4.0.0, 040da7d83216ace59710407e8ce35d5fd38e1340]
|
||||
Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de>
|
||||
---
|
||||
Source/CTest/cmCTestMultiProcessHandler.cxx | 80 +++++++++++++++------
|
||||
Source/CTest/cmCTestMultiProcessHandler.h | 3 +-
|
||||
Tests/CTestTestScheduler/CMakeLists.txt | 4 +-
|
||||
3 files changed, 64 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/Source/CTest/cmCTestMultiProcessHandler.cxx b/Source/CTest/cmCTestMultiProcessHandler.cxx
|
||||
index ca07a081eafced40697d82b08c0e2a504939fc4d..59a101454b84367d219e79a01ff72702df0dfa7f 100644
|
||||
--- a/Source/CTest/cmCTestMultiProcessHandler.cxx
|
||||
+++ b/Source/CTest/cmCTestMultiProcessHandler.cxx
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include <cm/memory>
|
||||
#include <cm/optional>
|
||||
+#include <cm/string_view>
|
||||
#include <cmext/algorithm>
|
||||
|
||||
#include <cm3p/json/value.h>
|
||||
@@ -43,6 +44,51 @@
|
||||
#include "cmUVSignalHackRAII.h" // IWYU pragma: keep
|
||||
#include "cmWorkingDirectory.h"
|
||||
|
||||
+namespace {
|
||||
+
|
||||
+struct CostEntry
|
||||
+{
|
||||
+ cm::string_view name;
|
||||
+ int prevRuns;
|
||||
+ float cost;
|
||||
+};
|
||||
+
|
||||
+cm::optional<CostEntry> splitCostLine(cm::string_view line)
|
||||
+{
|
||||
+ std::string part;
|
||||
+ cm::string_view::size_type pos1 = line.size();
|
||||
+ cm::string_view::size_type pos2 = line.find_last_of(' ', pos1);
|
||||
+ auto findNext = [line, &part, &pos1, &pos2]() -> bool {
|
||||
+ if (pos2 != cm::string_view::npos) {
|
||||
+ cm::string_view sub = line.substr(pos2 + 1, pos1 - pos2 - 1);
|
||||
+ part.assign(sub.begin(), sub.end());
|
||||
+ pos1 = pos2;
|
||||
+ if (pos1 > 0) {
|
||||
+ pos2 = line.find_last_of(' ', pos1 - 1);
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ };
|
||||
+
|
||||
+ // parse the cost
|
||||
+ if (!findNext()) {
|
||||
+ return cm::nullopt;
|
||||
+ }
|
||||
+ float cost = static_cast<float>(atof(part.c_str()));
|
||||
+
|
||||
+ // parse the previous runs
|
||||
+ if (!findNext()) {
|
||||
+ return cm::nullopt;
|
||||
+ }
|
||||
+ int prev = atoi(part.c_str());
|
||||
+
|
||||
+ // from start to the last found space is the name
|
||||
+ return CostEntry{ line.substr(0, pos1), prev, cost };
|
||||
+}
|
||||
+
|
||||
+}
|
||||
+
|
||||
namespace cmsys {
|
||||
class RegularExpression;
|
||||
}
|
||||
@@ -697,24 +743,21 @@ void cmCTestMultiProcessHandler::UpdateCostData()
|
||||
if (line == "---") {
|
||||
break;
|
||||
}
|
||||
- std::vector<std::string> parts = cmSystemTools::SplitString(line, ' ');
|
||||
// Format: <name> <previous_runs> <avg_cost>
|
||||
- if (parts.size() < 3) {
|
||||
+ cm::optional<CostEntry> entry = splitCostLine(line);
|
||||
+ if (!entry) {
|
||||
break;
|
||||
}
|
||||
|
||||
- std::string name = parts[0];
|
||||
- int prev = atoi(parts[1].c_str());
|
||||
- float cost = static_cast<float>(atof(parts[2].c_str()));
|
||||
-
|
||||
- int index = this->SearchByName(name);
|
||||
+ int index = this->SearchByName(entry->name);
|
||||
if (index == -1) {
|
||||
// This test is not in memory. We just rewrite the entry
|
||||
- fout << name << " " << prev << " " << cost << "\n";
|
||||
+ fout << entry->name << " " << entry->prevRuns << " " << entry->cost
|
||||
+ << "\n";
|
||||
} else {
|
||||
// Update with our new average cost
|
||||
- fout << name << " " << this->Properties[index]->PreviousRuns << " "
|
||||
- << this->Properties[index]->Cost << "\n";
|
||||
+ fout << entry->name << " " << this->Properties[index]->PreviousRuns
|
||||
+ << " " << this->Properties[index]->Cost << "\n";
|
||||
temp.erase(index);
|
||||
}
|
||||
}
|
||||
@@ -750,28 +793,25 @@ void cmCTestMultiProcessHandler::ReadCostData()
|
||||
break;
|
||||
}
|
||||
|
||||
- std::vector<std::string> parts = cmSystemTools::SplitString(line, ' ');
|
||||
+ // Format: <name> <previous_runs> <avg_cost>
|
||||
+ cm::optional<CostEntry> entry = splitCostLine(line);
|
||||
|
||||
// Probably an older version of the file, will be fixed next run
|
||||
- if (parts.size() < 3) {
|
||||
+ if (!entry) {
|
||||
fin.close();
|
||||
return;
|
||||
}
|
||||
|
||||
- std::string name = parts[0];
|
||||
- int prev = atoi(parts[1].c_str());
|
||||
- float cost = static_cast<float>(atof(parts[2].c_str()));
|
||||
-
|
||||
- int index = this->SearchByName(name);
|
||||
+ int index = this->SearchByName(entry->name);
|
||||
if (index == -1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
- this->Properties[index]->PreviousRuns = prev;
|
||||
+ this->Properties[index]->PreviousRuns = entry->prevRuns;
|
||||
// When not running in parallel mode, don't use cost data
|
||||
if (this->ParallelLevel > 1 && this->Properties[index] &&
|
||||
this->Properties[index]->Cost == 0) {
|
||||
- this->Properties[index]->Cost = cost;
|
||||
+ this->Properties[index]->Cost = entry->cost;
|
||||
}
|
||||
}
|
||||
// Next part of the file is the failed tests
|
||||
@@ -784,7 +824,7 @@ void cmCTestMultiProcessHandler::ReadCostData()
|
||||
}
|
||||
}
|
||||
|
||||
-int cmCTestMultiProcessHandler::SearchByName(std::string const& name)
|
||||
+int cmCTestMultiProcessHandler::SearchByName(cm::string_view name)
|
||||
{
|
||||
int index = -1;
|
||||
|
||||
diff --git a/Source/CTest/cmCTestMultiProcessHandler.h b/Source/CTest/cmCTestMultiProcessHandler.h
|
||||
index 3b4e9c59ad1871168d8528be0586831e2416ae36..8d33dabcf0d9fc6e11459105c65eadaa1de33e42 100644
|
||||
--- a/Source/CTest/cmCTestMultiProcessHandler.h
|
||||
+++ b/Source/CTest/cmCTestMultiProcessHandler.h
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <cm/optional>
|
||||
+#include <cm/string_view>
|
||||
|
||||
#include <cm3p/uv.h>
|
||||
|
||||
@@ -113,7 +114,7 @@ protected:
|
||||
void UpdateCostData();
|
||||
void ReadCostData();
|
||||
// Return index of a test based on its name
|
||||
- int SearchByName(std::string const& name);
|
||||
+ int SearchByName(cm::string_view name);
|
||||
|
||||
void CreateTestCostList();
|
||||
|
||||
diff --git a/Tests/CTestTestScheduler/CMakeLists.txt b/Tests/CTestTestScheduler/CMakeLists.txt
|
||||
index 91d565d4020aafda6d49462cd8616d168d5844b6..daf6ce2b23d8c048334ae1047759130b246dccef 100644
|
||||
--- a/Tests/CTestTestScheduler/CMakeLists.txt
|
||||
+++ b/Tests/CTestTestScheduler/CMakeLists.txt
|
||||
@@ -1,9 +1,9 @@
|
||||
-cmake_minimum_required (VERSION 3.5)
|
||||
+cmake_minimum_required(VERSION 3.19)
|
||||
project (CTestTestScheduler)
|
||||
include (CTest)
|
||||
|
||||
add_executable (Sleep sleep.c)
|
||||
|
||||
foreach (time RANGE 1 4)
|
||||
- add_test (TestSleep${time} Sleep ${time})
|
||||
+ add_test ("TestSleep ${time}" Sleep ${time})
|
||||
endforeach ()
|
||||
@@ -0,0 +1,39 @@
|
||||
From fd9a04c1434e12f21c043385e306e0b52d38d749 Mon Sep 17 00:00:00 2001
|
||||
From: Otavio Salvador <otavio@ossystems.com.br>
|
||||
Date: Thu, 5 Jul 2018 10:28:04 -0300
|
||||
Subject: [PATCH] Disable use of ext2fs/ext2_fs.h by cmake's internal
|
||||
|
||||
libarchive copy
|
||||
Organization: O.S. Systems Software LTDA.
|
||||
|
||||
We don't want to add a dependency on e2fsprogs-native for cmake-native,
|
||||
and we don't use CPack so just disable this functionality.
|
||||
|
||||
Upstream-Status: Inappropriate [config]
|
||||
|
||||
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
|
||||
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
|
||||
|
||||
---
|
||||
Utilities/cmlibarchive/CMakeLists.txt | 8 ++------
|
||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
|
||||
index bfcaf30..2960683 100644
|
||||
--- a/Utilities/cmlibarchive/CMakeLists.txt
|
||||
+++ b/Utilities/cmlibarchive/CMakeLists.txt
|
||||
@@ -682,12 +682,8 @@ LA_CHECK_INCLUDE_FILE("copyfile.h" HAVE_COPYFILE_H)
|
||||
LA_CHECK_INCLUDE_FILE("direct.h" HAVE_DIRECT_H)
|
||||
LA_CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
|
||||
LA_CHECK_INCLUDE_FILE("errno.h" HAVE_ERRNO_H)
|
||||
-LA_CHECK_INCLUDE_FILE("ext2fs/ext2_fs.h" HAVE_EXT2FS_EXT2_FS_H)
|
||||
-
|
||||
-CHECK_C_SOURCE_COMPILES("#include <sys/ioctl.h>
|
||||
-#include <ext2fs/ext2_fs.h>
|
||||
-int main(void) { return EXT2_IOC_GETFLAGS; }" HAVE_WORKING_EXT2_IOC_GETFLAGS)
|
||||
-
|
||||
+SET(HAVE_EXT2FS_EXT2_FS_H 0)
|
||||
+SET(HAVE_WORKING_EXT2_IOC_GETFLAGS 0)
|
||||
LA_CHECK_INCLUDE_FILE("fcntl.h" HAVE_FCNTL_H)
|
||||
LA_CHECK_INCLUDE_FILE("grp.h" HAVE_GRP_H)
|
||||
LA_CHECK_INCLUDE_FILE("io.h" HAVE_IO_H)
|
||||
@@ -0,0 +1,23 @@
|
||||
set( CMAKE_SYSTEM_NAME Linux )
|
||||
set( CMAKE_C_FLAGS $ENV{CFLAGS} CACHE STRING "" FORCE )
|
||||
set( CMAKE_CXX_FLAGS $ENV{CXXFLAGS} CACHE STRING "" FORCE )
|
||||
set( CMAKE_SYSROOT $ENV{OECORE_TARGET_SYSROOT} )
|
||||
|
||||
set( CMAKE_FIND_ROOT_PATH $ENV{OECORE_TARGET_SYSROOT} )
|
||||
set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
|
||||
set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
|
||||
set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
|
||||
set( CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX "$ENV{OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX}")
|
||||
|
||||
set( CMAKE_SYSTEM_PROCESSOR $ENV{OECORE_TARGET_ARCH} )
|
||||
|
||||
# Include the toolchain configuration subscripts
|
||||
file( GLOB toolchain_config_files "${CMAKE_CURRENT_LIST_FILE}.d/*.cmake" )
|
||||
foreach(config ${toolchain_config_files})
|
||||
include(${config})
|
||||
endforeach()
|
||||
|
||||
unset(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES)
|
||||
unset(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES)
|
||||
@@ -0,0 +1,31 @@
|
||||
set(SDK_INSTALL_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../..")
|
||||
set(HOST_SYSROOT "${SDK_INSTALL_DIR}/sysroots/@OECORE_SDK_SYS")
|
||||
set(TARGET_SYSROOT "${SDK_INSTALL_DIR}/sysroots/@OECORE_TARGET_SYS")
|
||||
set(HOST_BIN "${HOST_SYSROOT}/usr/bin")
|
||||
set(TOOLCHAIN_NAME "@OECORE_TARGET_ALIAS")
|
||||
set(GCC_DIR "${HOST_BIN}/${TOOLCHAIN_NAME}")
|
||||
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR "@OECORE_TARGET_ARCH")
|
||||
|
||||
set(CMAKE_C_COMPILER "${GCC_DIR}/${TOOLCHAIN_NAME}-gcc")
|
||||
set(CMAKE_CXX_COMPILER "${GCC_DIR}/${TOOLCHAIN_NAME}-g++")
|
||||
|
||||
set(ARCH_FLAGS "@OECORE_TUNE_CCARGS")
|
||||
set(CMAKE_C_FLAGS "${ARCH_FLAGS}" CACHE STRING "" FORCE )
|
||||
set(CMAKE_CXX_FLAGS "${ARCH_FLAGS}" CACHE STRING "" FORCE )
|
||||
set(CMAKE_ASM_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
|
||||
set(CMAKE_LDFLAGS_FLAGS ${CMAKE_C_FLAGS} CACHE STRING "" FORCE )
|
||||
|
||||
set(CMAKE_SYSROOT "${TARGET_SYSROOT}")
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH "${TARGET_SYSROOT}" )
|
||||
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY )
|
||||
|
||||
set(CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX "")
|
||||
|
||||
set(CMAKE_PROGRAM_PATH "${HOST_SYSROOT}/usr/bin" CACHE STRING "" FORCE)
|
||||
33
sources/poky/meta/recipes-devtools/cmake/cmake/cmake-setup.py
Executable file
33
sources/poky/meta/recipes-devtools/cmake/cmake/cmake-setup.py
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import string
|
||||
import sys
|
||||
|
||||
class Template(string.Template):
|
||||
delimiter = "@"
|
||||
|
||||
class Environ():
|
||||
def __getitem__(self, name):
|
||||
if name == "OECORE_SDK_SYS":
|
||||
return os.path.basename(os.environ["OECORE_NATIVE_SYSROOT"])
|
||||
elif name == "OECORE_TARGET_SYS":
|
||||
return os.path.basename(os.environ["OECORE_TARGET_SYSROOT"])
|
||||
elif name == "OECORE_TARGET_ALIAS":
|
||||
return os.path.basename(os.environ["TARGET_PREFIX"].strip("-"))
|
||||
else:
|
||||
return os.environ[name]
|
||||
|
||||
try:
|
||||
sysroot = os.environ['OECORE_NATIVE_SYSROOT']
|
||||
except KeyError:
|
||||
print("Not in environment setup, bailing")
|
||||
sys.exit(1)
|
||||
|
||||
template_file = os.path.join(sysroot, 'usr/share/cmake/SDKToolchainConfig.cmake.template')
|
||||
cross_file = os.path.join(sysroot, 'usr/share/cmake/%s-toolchain.cmake' % (os.path.basename(os.environ["OECORE_TARGET_SYSROOT"])))
|
||||
with open(template_file) as in_file:
|
||||
template = in_file.read()
|
||||
output = Template(template).substitute(Environ())
|
||||
with open(cross_file, "w") as out_file:
|
||||
out_file.write(output)
|
||||
@@ -0,0 +1,2 @@
|
||||
export CMAKE_TOOLCHAIN_FILE="$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
|
||||
export OE_CMAKE_FIND_LIBRARY_CUSTOM_LIB_SUFFIX="`echo $OECORE_BASELIB | sed -e s/lib//`"
|
||||
69
sources/poky/meta/recipes-devtools/cmake/cmake_3.28.3.bb
Normal file
69
sources/poky/meta/recipes-devtools/cmake/cmake_3.28.3.bb
Normal file
@@ -0,0 +1,69 @@
|
||||
require cmake.inc
|
||||
|
||||
inherit cmake bash-completion
|
||||
|
||||
DEPENDS += "curl expat zlib libarchive xz ncurses bzip2"
|
||||
|
||||
SRC_URI:append:class-nativesdk = " \
|
||||
file://0001-ctest-Allow-arbitrary-characters-in-test-names-of-CT.patch \
|
||||
file://OEToolchainConfig.cmake \
|
||||
file://SDKToolchainConfig.cmake.template \
|
||||
file://cmake-setup.py \
|
||||
file://environment.d-cmake.sh \
|
||||
"
|
||||
|
||||
LICENSE:append = " & BSD-1-Clause & MIT"
|
||||
LIC_FILES_CHKSUM:append = " \
|
||||
file://Utilities/cmjsoncpp/LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926 \
|
||||
file://Utilities/cmlibrhash/COPYING;md5=a8c2a557a5c53b1c12cddbee98c099af \
|
||||
file://Utilities/cmlibuv/LICENSE;md5=ad93ca1fffe931537fcf64f6fcce084d \
|
||||
"
|
||||
|
||||
# Strip ${prefix} from ${docdir}, set result into docdir_stripped
|
||||
python () {
|
||||
prefix=d.getVar("prefix")
|
||||
docdir=d.getVar("docdir")
|
||||
|
||||
if not docdir.startswith(prefix):
|
||||
bb.fatal('docdir must contain prefix as its prefix')
|
||||
|
||||
docdir_stripped = docdir[len(prefix):]
|
||||
if len(docdir_stripped) > 0 and docdir_stripped[0] == '/':
|
||||
docdir_stripped = docdir_stripped[1:]
|
||||
|
||||
d.setVar("docdir_stripped", docdir_stripped)
|
||||
}
|
||||
|
||||
EXTRA_OECMAKE=" \
|
||||
-DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARIES=1 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_CPPDAP=0 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
|
||||
-DCMAKE_USE_SYSTEM_LIBRARY_LIBRHASH=0 \
|
||||
-DKWSYS_CHAR_IS_SIGNED=1 \
|
||||
-DBUILD_CursesDialog=0 \
|
||||
-DKWSYS_LFS_WORKS=1 \
|
||||
-DCMake_ENABLE_DEBUGGER=0 \
|
||||
"
|
||||
|
||||
do_install:append:class-nativesdk() {
|
||||
mkdir -p ${D}${datadir}/cmake
|
||||
install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
|
||||
|
||||
mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
|
||||
install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
|
||||
|
||||
# install cmake-setup.py to create arch-specific toolchain cmake file from template
|
||||
install -m 0644 ${WORKDIR}/SDKToolchainConfig.cmake.template ${D}${datadir}/cmake/
|
||||
install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d
|
||||
install -m 0755 ${WORKDIR}/cmake-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
|
||||
}
|
||||
|
||||
FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}"
|
||||
|
||||
FILES:${PN} += "${datadir}/cmake-${CMAKE_MAJOR_VERSION} ${datadir}/cmake ${datadir}/aclocal ${datadir}/emacs ${datadir}/vim"
|
||||
FILES:${PN}-doc += "${docdir}/cmake-${CMAKE_MAJOR_VERSION}"
|
||||
FILES:${PN}-dev = ""
|
||||
|
||||
BBCLASSEXTEND = "nativesdk"
|
||||
Reference in New Issue
Block a user