summaryrefslogtreecommitdiffstats
path: root/meta/classes
Commit message (Collapse)AuthorAgeFilesLines
* devtool: fix devtool finish when gitmodules file is emptyThomas Roos2023-01-181-1/+1
| | | | | | | | | | | | | When a .gitmodules file exists but is empty then devtool finish fails. Add an additional check for this. [YOCTO #14999] (From OE-Core rev: b4f0f7c4934bade9e4d4a1086f9d8b29d8e9ad45) Signed-off-by: Thomas Roos <throos@amazon.de> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: write the cve manifest to IMGDEPLOYDIRJermain Horsman2023-01-181-3/+3
| | | | | | | | | | | | | | | | When building an image cve_check_write_rootfs_manifest() would sometimes fail with a FileNotFoundError when writing the manifest.cve due to the parent directory (DEPLOY_DIR_IMAGE) not (yet) existing. The image task will provide the manifest in the deploy directory afterwards, so other recipes depending on the manifest being in DEPLOY_DIR_IMAGE should continue to function properly. (From OE-Core rev: 00fb2aae22ce0d7ff5f3f8766fa770eeb4e73483) Signed-off-by: Jermain Horsman <jermain.horsman@nedap.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: handle non-existant stamps directoryRoss Burton2023-01-061-49/+52
| | | | | | | | | | | | | | | | | | | Since 'build/siggen: Rework stamps functions'[1] the stamps directory for each recipe is only created if there are stamps to be written. Some recipes - such as package-index - only have nostamp tasks so the stamps directory is never created, resulting in the rm_work task trying to cd into a directory that doesn't exist. Resolve this by simply checking the stamps directory exists before trying to delete files in it. [1] bitbake c79ecec580e4c2a141ae483ec0f6448f70593dcf (From OE-Core rev: 80e9b32a000b25420997068543d3631231eb3ccf) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work.bbclass: use HOSTTOOLS 'rm' binary exclusivelyLuis2022-12-261-4/+11
| | | | | | | | | | | | | | | | | The do_rm_work() task is using the first available 'rm' binary available in PATH to remove files and folders. However, depending on the PATH setup and RECIPE_SYSROOT_NATIVE contents, the function can be using the 'rm' binary available in RECIPE_SYSROOT_NATIVE, a folder that will get removed. This causes a sporadic race-condition when trying to access the 'rm' binary of a folder already deleted. Solve this by exclusively using the HOSTTOOLS 'rm' binary, as this folder will not get removed. (From OE-Core rev: edcd9ad333bc4e504594e8af83e8cb7007d2e35c) Signed-off-by: Luis Martins <luis.pinto.martins@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: fix lookup for .gitmodulesPeter Marko2022-12-081-1/+1
| | | | | | | | | | | | | | | | | | Commit 0533edac277080e1bd130c14df0cbac61ba01a0c broke bitbake parsing when bitbake is executed from directory with existing .gitmodules and the recipe in externalsrc does not have .gitmodules The check needs to search for .gitmodules in sources path, not cwd. iParsing recipes...ERROR: ExpansionError during parsing <path to recipe> ... bb.data_smart.ExpansionError: Failure expanding variable do_compile[file-checksums], expression was ${@srctree_hash_files(d)} which triggered exception CalledProcessError: Command '['git', 'config', '--file', '.gitmodules', '--get-regexp', 'path']' returned non-zero exit status 1. (From OE-Core rev: 66ff3d1f65cd2e7f5319e98fa41f47a59b714c72) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: adjust dependency to make do_rm_work_all depend on do_rm_workChen Qi2022-12-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For now, if we use rm_work and `bitbake core-image-minimal', some recipes' WORKDIRs are not cleaned up, e.g., makedevs-native. Adjust the dependency to make do_rm_work_all depend on do_rm_work to solve this problem. Below are the detailed explanation of why this would work. Without this patch, the dependency chain is like: [other deps] -> [do_rm_work] -+-> [do_build] | [do_rm_work_all] -------------+ With this patch, the depedency chain is like: [other deps] -> [do_rm_work] -> [do_rm_work_all] -> [do_build] Such dependency chain adjustment fixes the issue because do_rm_work_all now depends on [other deps] and thus the [depends] of these [other deps]. Take core-image-minimal as an example. Before this adjustment, do_rm_work_all does not have any relationship with do_rootfs, and we have do_rootfs[depends] += "makedevs-native:do_populate_sysroot ..." This essentially prevents 'recrdeptask' setting of do_rm_work_all extend to makedevs-native. With this patch, the do_rm_work_all now depends on do_rm_work which in turn depends on do_rootfs, and so do_rm_work_all's recrdeptask could have effect on makedevs-native. With this patch, all built recipes WORKDIR will be cleaned up with a few expected exceptions such as kernel and qemu-helper-native. (From OE-Core rev: b25cc45c9b39f79ba0a03c4556cb2e2431677b4e) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rm_work: exclude the SSTATETASKS from the rm_work tasks sinatureJose Quaresma2022-11-141-0/+2
| | | | | | | | | | | | | | | | | | | We can exclude the SSTATETASKS from the rm_work task signature to avoid running the task when we remove some setscene tasks from the dependencie chain. The inject_rm_work handler on the rm_work bbclass triggers the rm_work task running for any signature change in the dependencie chain of the task do_build of each recipe. i.e INHERIT:remove = "create-spdx" will trigger the do_rm_work when we collect the sstate cache with INHERIT = "create-spdx" (From OE-Core rev: 77729bea5b17d65dafb604fd1665c612091b28c7) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testexport: move to classes-recipeRoss Burton2022-11-111-180/+0
| | | | | | | | | | | | | | | | | This class should be in classes-recipe as, like testimage, it is specific to image recipes. This also solves a regression where simply IMAGE_CLASSES += "testexport" doesn't work if testimage isn't already in IMAGE_CLASSES. The testexport class adds testimage to IMAGE_CLASSES, but by this point it's too late. Now that the class can only be inherited via IMAGE_CLASSES, we can simply inherit testimage directly. (From OE-Core rev: 87fcee9fed915ff3af528b976d7d44737f9f1a95) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx: default share_src for shared sourcesKonrad Weihmann2022-11-111-2/+3
| | | | | | | | | | | | | | | | | | | | if a source is using work-shared but isn't a kernel, like for instance llvm-source from meta-clang, share_src was previously undefined leading to a crash of the python code. Default to WORKDIR and just override it in case the source being a kernel recipe. Additionally changes the variable names in the following, as they imply that it's only about the kernel, which is not the case in every case (From OE-Core rev: 34fa68a0b07328c4ed4eef81f8cde80137a91f18) Signed-off-by: Konrad Weihmann <kweihmann@witekio.com> On-behalf-of: Avnet Embedded <AvnetEmbedded@avnet.eu> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Reviewed-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: create-spdx: Move to version specific classJoshua Watt2022-11-112-1020/+1028
| | | | | | | | | | | | | In expectation of SPDX 3.0 support, move the create-spdx.bbclass -> create-spdx-2.2.bbclass. The create-spdx.bbclass class still exists and can be used if a user doesn't care about which specific version of SPDX they get. (From OE-Core rev: 9ec01fe3e59be66331c14ab5391ecb0b6f140c22) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver: avoid using machine variable as it breaks multiconfigJose Quaresma2022-11-021-1/+1
| | | | | | | | | | | | | | STAGING_KERNEL_DIR uses the MACHINE name so it breaks the multiconfig and in this cases it will run the shared recipes twice, one for each machine. STAGING_KERNEL_DIR it's been introduced in commit 5487dee2e1 (From OE-Core rev: 6050d1f74c02495490d982ead2993b6b3c9cc04a) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx.bbclass: remove unused SPDX_INCLUDE_PACKAGEDMichael Opdenacker2022-10-291-2/+0
| | | | | | | | | | [YOCTO #14948] (From OE-Core rev: 89f1abd5e00807cf179ddf658f74d48119523b0c) Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc.bbclass: Remove a trailing slash from ${B}Peter Kjellerstedt2022-10-261-1/+1
| | | | | | | | | | | | | The trailing slash in ${B} caused -fdebug-prefix-map=${B}=... to not match as intended, resulting in ${TMPDIR} ending up in files in ${PN}-dbg when externalsrc was in use, which in turn triggered buildpath QA warnings. (From OE-Core rev: 9b5031ed5a0d102905fa75acc418246c23df6eef) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc.bbclass: fix git repo detectionMartin Jansa2022-10-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix issue introduced in: https://git.openembedded.org/openembedded-core/commit/?id=95fbac8dcad6c93f4c9737e9fe13e92ab6befa09 * it added check for s_dir + git-dir (typically '.git') isn't the same as ${TOPDIR} + git-dir, but due to copy-paste issue it was just comparing it with s_dir + git-dir again, resulting in most external repos (where git-dir is '.git') to be processed as regular directory (not taking advantage of git write-tree). * normally this wouldn't be an issue, but for big repo with a lot of files this added a lot of checksums in: d.setVarFlag('do_compile', 'file-checksums', '${@srctree_hash_files(d)}') and I mean *a lot, e.g. in chromium build it was 380227 paths which still wouldn't that bad, but the checksum processing in siggen.py isn't trivial and just looping through all these checksums takes very long time (over 1000sec on fast NVME drive with warm cache) and then https://git.openembedded.org/bitbake/commit/?id=b4975d2ecf615ac4c240808fbc5a3f879a93846b made the processing a bit more complicated and the loop in get_taskhash() function took 6448sec and to make things worse there was no output from bitbake during that time, so even with -DDD it looks like this: DEBUG: virtual/libgles2 resolved to: mesa (langdale/oe-core/meta/recipes-graphics/mesa/mesa_22.2.0.bb) Bitbake still alive (no events for 600s). Active tasks: Bitbake still alive (no events for 1200s). Active tasks: Bitbake still alive (no events for 1800s). Active tasks: Bitbake still alive (no events for 2400s). Active tasks: Bitbake still alive (no events for 3000s). Active tasks: Bitbake still alive (no events for 3600s). Active tasks: Bitbake still alive (no events for 4200s). Active tasks: Bitbake still alive (no events for 4800s). Active tasks: Bitbake still alive (no events for 5400s). Active tasks: Bitbake still alive (no events for 6000s). Active tasks: DEBUG: Starting bitbake-worker without -DDD it will get stuck for almost 2 hours in: "Initialising tasks..." before it finally writes sstate summary like: "Sstate summary: Wanted 3102 Local 0 Mirrors 0 Missed 3102 Current 1483 (0% match, 32% complete)" * fix the copy&paste typo to use git work-tree in most cases, but be aware that this issue still exists for huge local source trees not in git [YOCTO #14942] (From OE-Core rev: 9102e5a94b8146cb1da27afbe41d3db999a914ff) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx: Remove ";name=..." for downloadLocationKeiya Nobuta2022-10-261-0/+1
| | | | | | | | (From OE-Core rev: bbecab53d1b27f3bb8c5882cb0ec39b04ef300a3) Signed-off-by: Keiya Nobuta <nobuta.keiya@fujitsu.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* own-mirrors: add crateAdrian Freihofer2022-10-251-0/+1
| | | | | | | | | | Support downloading crate files from a mirror at SOURCE_MIRROR_URL. (From OE-Core rev: aebf4f183267a1e2f073078ade0ddc916ceed53f) Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* externalsrc: move back to classesRoss Burton2022-10-251-0/+272
| | | | | | | | | | | The externalsrc class was moved to classes-recipe as part of oe-core f5c1280, but it can be used in both recipe and global contexts so move it back to classes/. (From OE-Core rev: 7a2edcd4b7cb5a2d829289a11eff62663268fbf3) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: fix filename of recipe in commentUlrich Ölmann2022-09-171-1/+1
| | | | | | | | | | | | | The character '%' is not a valid part of a recipe filename and has been used here only to suggest a wildcard regarding the recipe's version, see reply [1] in a companioned thread. Correct that by using the current recipe version instead. [1] https://lists.yoctoproject.org/g/docs/message/3165 (From OE-Core rev: cf8835b53cb5ce3ff13f97fcf2d22b97a9f1ede4) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update overlayfs classes to use new bitbake functionalityVyacheslav Yurkov2022-09-092-219/+0
| | | | | | | | | | OverlayFS classes belong to a recipe scope (From OE-Core rev: 7afa7739e82220729566ccabe2675a8991f9485a) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: delete 'rm' commandUlrich Ölmann2022-09-071-1/+0
| | | | | | | | | | | | The removed command was explicitly marked as transitional in commit [1] roughly three years ago, so finally clean up. [1] 40d74cb1d0dd ("icecc: Export ICECC_CC and friends via wrapper-script") (From OE-Core rev: 4459e970c7c1c43f4061b1cb6229d7a3643e1bbc) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* icecc.bbclass: fix typosUlrich Ölmann2022-09-071-23/+23
| | | | | | | (From OE-Core rev: 7fd33565df5dfaa962bcafd842162a2f504c59e7) Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: close cursors as soon as possibleRoss Burton2022-09-021-4/+9
| | | | | | | | | | | | | | We can have multiple processes reading the database at the same time, and cursors only release their locks when they're garbage collected. This might be the cause of random sqlite errors on the autobuilder, so explicitly close the cursors when we're done with them. (From OE-Core rev: 5d2e90e4a58217a943ec21140bc2ecdd4357a98a) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: cve-check: Get shared database lockJoshua Watt2022-08-311-11/+12
| | | | | | | | | | | | | The CVE check database needs to have a shared lock acquired on it before it is accessed. This to prevent cve-update-db-native from deleting the database file out from underneath it. [YOCTO #14899] (From OE-Core rev: 20a9911b73df62a0d0d1884e57085f13ac5016dd) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* distrooverrides: Move back to classes whilst it's usage is clarifiedRichard Purdie2022-08-181-0/+38
| | | | | | (From OE-Core rev: eb56f89a9b2163bdb8c91dbdc33696fea052d032) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* create-spdx: handle links to inaccessible locationsPeter Marko2022-08-141-1/+1
| | | | | | | | | | | | When a link is pointing to location inaccessible to build user (e.g. "/root/something"), filepath.is_file() throws "PermissionError: [Errno 13] Permission denied". Fix this by first checking if it is a link. (From OE-Core rev: e105befbe4ee0d85e94c2048a744f0373e2dbcdf) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* archiver.bbclass: some recipes that uses the kernelsrc bbclass uses the ↵Jose Quaresma2022-08-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shared source This fix a race that happens when building some of the followning recipes with kernel at same time. The kernelsrc uses the kernel shared source dir as their source S = "${STAGING_KERNEL_DIR}" and this will cause a race in the do_unpack_and_patch task, when bitbake runs the bb.build.exec_func('do_unpack', d) because do_unpack will clean the source dir on startup. | ok: note that S != "${STAGING_KERNEL_DIR} for this ones openembedded-core/meta/recipes-kernel/perf/perf.bb:inherit kernelsrc meta-openembedded/meta-oe/recipes-kernel/usbip-tools/usbip-tools.bb:inherit kernelsrc autotools-brokensep | broken meta-openembedded/meta-oe/recipes-kernel/cpupower/cpupower.bb:inherit kernelsrc kernel-arch bash-completion meta-openembedded/meta-oe/recipes-kernel/spidev-test/spidev-test.bb:inherit bash-completion kernelsrc kernel-arch meta-openembedded/meta-oe/recipes-kernel/intel-speed-select/intel-speed-select.bb:inherit kernelsrc meta-openembedded/meta-oe/recipes-kernel/bpftool/bpftool.bb:inherit bash-completion kernelsrc kernel-arch The issue can be replicated with: INHERIT += "archiver" ARCHIVER_MODE[src] = "original" ARCHIVER_MODE[diff] = "1" And: R=<recipe> bitbake -c cleansstate virtual/kernel $R && bitbake $R (From OE-Core rev: 5487dee2e1237fb57c5e59b2bbbfbcdfc8c97ab6) Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Update classes to match new bitbake class scope functionalityRichard Purdie2022-08-12165-29184/+0
| | | | | | | | | Move classes to classes-global or classes-recipe as appropriate to take advantage of new bitbake functionality to check class scope/usage. (From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* insane: Update to allow for class layout changesRichard Purdie2022-08-121-2/+2
| | | | | | | | | Make the code more generic to allow for the potential incomming class layout changes. (From OE-Core rev: 7c6c717a54423480c0ac9ed13861e3c1cc47e2b2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Add SPDX license identifiersRichard Purdie2022-08-12207-18/+407
| | | | | | | | | | | | As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. (From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Add copyright statements to files without oneRichard Purdie2022-08-12188-6/+739
| | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. (From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testexport: Use IMAGE_CLASSES for testimageRichard Purdie2022-08-121-1/+1
| | | | | | (From OE-Core rev: 506346e1c98619eb04a196d80f032d71677dd2a2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testexport: Fix to work as an image classRichard Purdie2022-08-121-3/+2
| | | | | | | | | | The class is mainly an image based class but one recipe does need to look at values shared with the class and isn't an image. Move this to a conf file instead, avoiding the need to pollute all recipes globally. (From OE-Core rev: ed4238487c81b3580e83c257b50745a832a6e717) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Remove unneeded RUST_TARGETGENS settingsRichard Purdie2022-08-121-6/+2
| | | | | | | | | These match the default from the class so drop them. We then always generate all targets so remove the configuration from the class. (From OE-Core rev: e4d56256936c55bab2bf2934ccbde9157ef7dc57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* buildhistory: Only use image-artifact-names as an image classRichard Purdie2022-08-121-1/+1
| | | | | | | | | The class only makes sense in the conext of images, not globally so include as such. (From OE-Core rev: 4fdda4d6bd434c240ec1dfdbfc6eb7e25e2db1f3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Remove conflict with utils create_wrapperRichard Purdie2022-08-091-9/+9
| | | | | | | | | | utils already has a create_wrapper function which I tried to use from cargo and got unexpected results. Rename the rust function to avoid this conflict of named. (From OE-Core rev: ef347bd395955ce68893fee7995a4f3abbe6ff93) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Drop cross/crosssdkRichard Purdie2022-08-082-3/+3
| | | | | | | | | | Now that target config json is provided by rust-target-config.bbclass, the need for the cross and crosssdk recipes is removed. Drop them and simplify dependencies accordingly. (From OE-Core rev: 4b54f5f52b33db4d2fe95c5faef033b6c6b37b7d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Set rustlibdir to match target expectationRichard Purdie2022-08-081-2/+2
| | | | | | (From OE-Core rev: 06af65757b7694df983b3f99cec75e4e9bec0725) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Simplify libc handlingRichard Purdie2022-08-081-37/+8
| | | | | | | | | | The current libc handling code is simply wrong in many cases. Simplify it to a check of the triplet for musl handling which is much simpler and less error prone when handling things like nativesdk targets. (From OE-Core rev: f35d5af06db10fa20e55f4c738e665b35f5c394b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Make target workaround genericRichard Purdie2022-08-081-1/+7
| | | | | | | | | Ensure the 'target' data is set for both HOST and TARGET queries as appropriate to work correctly in cross configurations. (From OE-Core rev: ec15882fbf396de8d3a5921a3028850ba3fccc48) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Update to match cross targetsRichard Purdie2022-08-081-1/+1
| | | | | | | | | Tweak the armv7 workaround to work for cross environments and as a host triplet and not just as a target. (From OE-Core rev: dc134c031171a55a35964ba801219552a516a0ca) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cargo_common: Handle build SYS as well as HOST/TARGETRichard Purdie2022-08-081-0/+9
| | | | | | | | | Improve the common class to handle BUILD_SYS as well as host and target, removing the need to a workaround in the rust recipe. (From OE-Core rev: 0dc9635c28c269f782ad4ed6ea06b4e4de1beb8e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common/rust: Improve bootstrap BUILD_SYS handlingRichard Purdie2022-08-081-0/+5
| | | | | | | | | | Move the "unknown" vendor workaround used during bootstrap to a central location so it is applied consistently to all RUST_BUILD_SYS values rather than some subset. (From OE-Core rev: d02c28b2219d736c9598a13fead7a03eaa3256a6) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Generate per recipe target configuration filesRichard Purdie2022-08-084-12/+12
| | | | | | | | | | Instead of generating target configuration files centrally and often getting it wrong, or having trouble finding the right set, generate them dynamically from the bbclass into WORKDIR per recipe. (From OE-Core rev: 9160e4a37561d8ac882057450a818621bec13bed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Show clear error when target isn't definedRichard Purdie2022-08-081-0/+2
| | | | | | (From OE-Core rev: b30ee171de9cd736d16d783410cf748e35309257) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust: Switch to use RUST_XXX_SYS consistentlyRichard Purdie2022-08-085-9/+9
| | | | | | | | | | | The code was using a mixture of XXX_SYS and RUST_XXX_SYS. Use RUST_XXX_SYS consistently and add the variables to the global exclsion on signatures as they're reflected in the directory triplets and trying to filter them out the hashes separately is too painful. (From OE-Core rev: ee0c0fdf9c1eba9eece6ed1293fda25bf18964b3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Rework wrappers to handle muslRichard Purdie2022-08-081-8/+14
| | | | | | | | | For musl we need to be able to add a library to the end of the linker commandline. Rework the wrapper code to be able to do this through a new variable. (From OE-Core rev: dfff5a176765c0e8b212bf31081f80e79025fd1b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Drop export directive from wrappersRichard Purdie2022-08-081-5/+5
| | | | | | | | | These variables don't need to be exported into the environment, which reduces the scope of rebuilds when variable values change. (From OE-Core rev: 1a992268e556a79daa6802367f48796000a1f436) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-common: Add CXXFLAGSRichard Purdie2022-08-081-1/+1
| | | | | | | | Similarly to CC and CCLD, handle CXX flags too. (From OE-Core rev: e2fc083529d526cb565a2de1917022d10c7d08b8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rust-target-config: Add mips n32 target informationRichard Purdie2022-08-081-0/+7
| | | | | | | | | Add MIPS n32 target information. This appears to be correct but building libstd-rs for the target doesn't work. (From OE-Core rev: 255be90dc8e3625060c9b8ccc2ec3a71f24470d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* populate_sdk_base: Disable rust SDK for MIPS n32Richard Purdie2022-08-081-0/+2
| | | | | | | | | | The n32 MIPS rust SDK doesn't quite build (libstd-rs fails with an llvm register issue). Disable it for now, someone with interest in having it working can fix if/as/when. (From OE-Core rev: aad10f24eea5a6b54de17138ab5c0f4ed1355a8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>