Skip to contentSkip to conversation

meson: use TRANSLATED_TARGET_ARCH in cross builds

PATCH Sergey Zhmylev 1 participant 1 message Jan 19, 2023 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

Accidentally I've sent an incomplete patch, please ignore.

Sergei

Quoted 38 lines · Sergey Zhmylev

From: Sergei Zhmylev <[email protected]>

TARGET_ARCH for most of x86_64 machines sets additional -march parameter in meson configuration, which is not supported during build and several meson recipes fail.  The patch makes meson.bbclass use TRANSLATED_TARGET_ARCH instead of TARGET_ARCH in order to properly set -march for cross builds.

---
 meta/classes-recipe/meson.bbclass | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes- renamed from meta/classes-recipe/meson.bbclass +0 -0

recipe/meson.bbclass
index 48688bed75..65fd80fc7e 100644

meta/classes-recipe/meson.bbclass +0 -0
@@ -97,7 +97,7 @@ endian = '${@meson_endian('HOST', d)}'

 [target_machine]
 system = '${@meson_operating_system('TARGET_OS', d)}' cpu_family = '${@meson_cpu_family('TARGET_ARCH', d)}'

meta/classes-recipe/meson.bbclass +1 -1
-cpu = '${TARGET_ARCH}'
+cpu = '${TRANSLATED_TARGET_ARCH}'

 endian = '${@meson_endian('TARGET', d)}'
 EOF

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#176135):
https://lists.openembedded.org/g/openembedded-core/message/176135
Mute This Topic: https://lists.openembedded.org/mt/96375617/7220546
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-
core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-