Skip to contentSkip to conversation

package/meson: fix cpu_family format

PATCH Superseded james.hilliard1 at gmail.com 2 participants 3 messages Dec 16, 2018 Arm/Amlogic Meson SoC support

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/meson: fix cpu_family format

From: James Hilliard <[email protected]>

Meson expects the cpu_family to be in a specific format for cross compilation, otherwise packages that use cpu_family detection may fail to build.

We also need to set needs_exe_wrapper = true to ensure that meson won't try and execute test binaries.

---
Changes v1 -> v2:
- change riscv to 64 bit

---
 package/meson/cross-compilation.conf.in |  1 +
 package/meson/meson.mk                  | 43 ++++++++++++++++++++++++++++++++-
 2 files changed, 43 insertions(+), 1 deletion(-)
package/meson/cross-compilation.conf.in +1 -0
index 0eec740..fc8e27f 100644
@@ -11,6 +11,7 @@ strip = '@TARGET_CROSS at strip'
 pkgconfig = '@HOST_DIR@/usr/bin/pkg-config'
 
 [properties]
+needs_exe_wrapper = true
 c_args = [@TARGET_CFLAGS@]
 c_link_args = [@TARGET_LDFLAGS@]
 cpp_args = [@TARGET_CXXFLAGS@]
package/meson/meson.mk +42 -1

55 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH v2 1/1 package/meson: fix cpu_family format

Hello James,

I would really like to have some feedback/Acked-by from Eric on a patch like this. Some comments below.

Quoted 8 lines · On Sun, 16 Dec 2018 16:14:57 +0800, james.hilliard1 at gmail.com wrote:

From: James Hilliard <[email protected]>

Meson expects the cpu_family to be in a specific format for cross compilation, otherwise packages that use cpu_family detection may fail to build.

We also need to set needs_exe_wrapper = true to ensure that meson won't try and execute test binaries.

This needs_exe_wrapper change seems unrelated, it should be part of a separate patch.

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 23

Quoted 5 lines
package/meson/meson.mk +5 -0
+# https://mesonbuild.com/Reference-tables.html#cpu-families
+ifeq ($(BR2_arcle),y)
+HOST_MESON_TARGET_CPU_FAMILY = arc
+else ifeq ($(BR2_arceb),y)
+HOST_MESON_TARGET_CPU_FAMILY = arc

This can be written like this:

ifeq ($(BR2_arcle)$(BR2_arceb),y)
HOST_MESON_TARGET_CPU_FAMILY = arc

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 27

Quoted 4 lines
package/meson/meson.mk +4 -0
+else ifeq ($(BR2_arm),y)
+HOST_MESON_TARGET_CPU_FAMILY = arm
+else ifeq ($(BR2_armeb),y)
+HOST_MESON_TARGET_CPU_FAMILY = arm

Ditto for arm/armeb

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 31

Quoted 4 lines
package/meson/meson.mk +4 -0
+else ifeq ($(BR2_aarch64),y)
+HOST_MESON_TARGET_CPU_FAMILY = aarch64
+else ifeq ($(BR2_aarch64_be),y)
+HOST_MESON_TARGET_CPU_FAMILY = aarch64

Ditto.

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 37

Quoted 6 lines
package/meson/meson.mk +6 -0
+else ifeq ($(BR2_i386),y)
+HOST_MESON_TARGET_CPU_FAMILY = x86
+else ifeq ($(BR2_mips),y)
+HOST_MESON_TARGET_CPU_FAMILY = mips
+else ifeq ($(BR2_mipsel),y)
+HOST_MESON_TARGET_CPU_FAMILY = mips

Ditto.

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 47

Quoted 10 lines
package/meson/meson.mk +10 -0
+else ifeq ($(BR2_mips64),y)
+HOST_MESON_TARGET_CPU_FAMILY = mips64
+else ifeq ($(BR2_mips64el),y)
+HOST_MESON_TARGET_CPU_FAMILY = mips64
+else ifeq ($(BR2_powerpc),y)
+HOST_MESON_TARGET_CPU_FAMILY = ppc
+else ifeq ($(BR2_powerpc64),y)
+HOST_MESON_TARGET_CPU_FAMILY = ppc64
+else ifeq ($(BR2_powerpc64le),y)
+HOST_MESON_TARGET_CPU_FAMILY = ppc64

Ditto.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

PATCH v2 1/1 package/meson: fix cpu_family format

Quoted 13 lines · Thomas Petazzoni

Hello James,

I would really like to have some feedback/Acked-by from Eric on a patch like this. Some comments below.

Quoted 6 lines · On Sun, 16 Dec 2018 16:14:57 +0800, james.hilliard1 at gmail.com wrote:

From: James Hilliard <[email protected]>

Meson expects the cpu_family to be in a specific format for cross compilation, otherwise packages that use cpu_family detection may fail to build.

Quoted 5 lines
Quoted 2 lines

We also need to set needs_exe_wrapper = true to ensure that meson won't try and execute test binaries.

This needs_exe_wrapper change seems unrelated, it should be part of a separate patch.

It's related in that fixing cpu_family requires the needs_exe_wrapper fix.

Quoted 56 lines

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 23

Quoted 6 lines
package/meson/meson.mk +5 -0
+# https://mesonbuild.com/Reference-tables.html#cpu-families
+ifeq ($(BR2_arcle),y)
+HOST_MESON_TARGET_CPU_FAMILY = arc
+else ifeq ($(BR2_arceb),y)
+HOST_MESON_TARGET_CPU_FAMILY = arc

This can be written like this:

ifeq ($(BR2_arcle)$(BR2_arceb),y)
HOST_MESON_TARGET_CPU_FAMILY = arc

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 27

Quoted 4 lines
package/meson/meson.mk +4 -0
+else ifeq ($(BR2_arm),y)
+HOST_MESON_TARGET_CPU_FAMILY = arm
+else ifeq ($(BR2_armeb),y)
+HOST_MESON_TARGET_CPU_FAMILY = arm

Ditto for arm/armeb

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 31

Quoted 4 lines
package/meson/meson.mk +4 -0
+else ifeq ($(BR2_aarch64),y)
+HOST_MESON_TARGET_CPU_FAMILY = aarch64
+else ifeq ($(BR2_aarch64_be),y)
+HOST_MESON_TARGET_CPU_FAMILY = aarch64

Ditto.

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 37

Quoted 6 lines
package/meson/meson.mk +6 -0
+else ifeq ($(BR2_i386),y)
+HOST_MESON_TARGET_CPU_FAMILY = x86
+else ifeq ($(BR2_mips),y)
+HOST_MESON_TARGET_CPU_FAMILY = mips
+else ifeq ($(BR2_mipsel),y)
+HOST_MESON_TARGET_CPU_FAMILY = mips

Ditto.

package/meson/meson.mk HOST_MESON_NEEDS_HOST_PYTHON = python3 · line 47

Quoted 10 lines
package/meson/meson.mk +10 -0
+else ifeq ($(BR2_mips64),y)
+HOST_MESON_TARGET_CPU_FAMILY = mips64
+else ifeq ($(BR2_mips64el),y)
+HOST_MESON_TARGET_CPU_FAMILY = mips64
+else ifeq ($(BR2_powerpc),y)
+HOST_MESON_TARGET_CPU_FAMILY = ppc
+else ifeq ($(BR2_powerpc64),y)
+HOST_MESON_TARGET_CPU_FAMILY = ppc64
+else ifeq ($(BR2_powerpc64le),y)
+HOST_MESON_TARGET_CPU_FAMILY = ppc64

Ditto.

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com