Jose Quaresma via lists.openembedded.org <quaresma.jose= gmail....@lists.openembedded.org> escreveu no dia segunda, 20/11/2023 à(s) 17:17:
> Hi Adrian, > > Adrian Freihofer <adrian.freiho...@gmail.com> escreveu no dia segunda, > 20/11/2023 à(s) 14:46: > >> Provide an easy way to enable cmake-qemu e.g. on distro level for all >> recipes inheriting the cmake.bbclass. >> >> Therefore a new variable is introduced: OECMAKE_EXEWRAPPER_QEMU. >> >> If set to "1" all recipes built with CMake can use qemu to execute >> cross-compiled binaries on the build machine. >> One use case is the execution of cross-compiled unit tests or ptests, >> e.g. in an SDK context. Therefore, a variable that activates Qemu for >> all CMake recipes is much more useful than just providing the optional >> cmake-qemu.bbclass. >> Further information can be found in the CMake documentation in the >> CMAKE_CROSSCOMPILING_EMULATOR section. >> >> There are some use cases for qemu-user, but users should not be >> encouraged to use it as an alternative for clean cross-compilation. >> Since the core does not need it either it is optional. >> > > Are you sure this works in the majority of scenarios? > Last time I worked on this qemu user mode failed to run > multithreading applications. > Sorry, I was wrong above. The issue was not multithreading but with the fork system call. > > Jose > > >> Signed-off-by: Adrian Freihofer <adrian.freiho...@siemens.com> >> --- >> meta/classes-recipe/cmake.bbclass | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/meta/classes-recipe/cmake.bbclass >> b/meta/classes-recipe/cmake.bbclass >> index d978b88944..4d8e2a206f 100644 >> --- a/meta/classes-recipe/cmake.bbclass >> +++ b/meta/classes-recipe/cmake.bbclass >> @@ -14,6 +14,10 @@ B = "${WORKDIR}/build" >> # The supported options are "Unix Makefiles" or "Ninja". >> OECMAKE_GENERATOR ?= "Ninja" >> >> +# qemu-user can be used for special use cases, but not by default >> +OECMAKE_EXEWRAPPER_QEMU ??= "0" >> +inherit ${@'cmake-qemu' if d.getVar('OECMAKE_EXEWRAPPER_QEMU') else ''} >> + >> python() { >> generator = d.getVar("OECMAKE_GENERATOR") >> if "Unix Makefiles" in generator: >> -- >> 2.41.0 >> >> >> >> >> > > -- > Best regards, > > José Quaresma > > > > -- Best regards, José Quaresma
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#190927): https://lists.openembedded.org/g/openembedded-core/message/190927 Mute This Topic: https://lists.openembedded.org/mt/102708283/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-