Skip to contentSkip to conversation

package/pkg-cmake: set CMAKE_SYSTEM_PROCESSOR correctly on powerpc64{, le}

PATCH New Daniel Black 2 participants 2 messages Mar 9, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/pkg-cmake: set CMAKE_SYSTEM_PROCESSOR correctly on powerpc64{, le}

Like ARM, BR2_ARCH doesn't correspond to the uname -m. With cmake CMAKE_SYSTEM_PROCESSOR is expected to contain the uname -m value.

So we change CMAKE_SYSTEM_PROCESSOR from powerpc64 -> ppc64 (big endian) and powerpc64le -> ppc64le (little endian).

This corrects the cross compile to the powerpc64{,le} target architecture for the mariadb (and possibly others) packages that use the CMAKE_SYSTEM_PROCESSOR variable and compare it against Power64 based architectures.

---
 package/pkg-cmake.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/pkg-cmake.mk +4 -0
index 5d0a455..0897430 100644
@@ -225,6 +225,10 @@ ifeq ($(BR2_arm),y)
 CMAKE_SYSTEM_PROCESSOR = $(CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT)l
 else ifeq ($(BR2_armeb),y)
 CMAKE_SYSTEM_PROCESSOR = $(CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT)b
+else ifeq ($(call qstrip,$(BR2_ARCH)),powerpc64)
+CMAKE_SYSTEM_PROCESSOR = ppc64
+else ifeq ($(call qstrip,$(BR2_ARCH)),powerpc64le)
+CMAKE_SYSTEM_PROCESSOR = ppc64le
 else
 CMAKE_SYSTEM_PROCESSOR = $(BR2_ARCH)
 endif
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 package/pkg-cmake: set CMAKE_SYSTEM_PROCESSOR correctly on powerpc64{, le}

Hello,

Quoted 11 lines · Daniel Black

Like ARM, BR2_ARCH doesn't correspond to the uname -m. With cmake CMAKE_SYSTEM_PROCESSOR is expected to contain the uname -m value.

So we change CMAKE_SYSTEM_PROCESSOR from powerpc64 -> ppc64 (big endian) and powerpc64le -> ppc64le (little endian).

This corrects the cross compile to the powerpc64{,le} target architecture for the mariadb (and possibly others) packages that use the CMAKE_SYSTEM_PROCESSOR variable and compare it against Power64 based architectures.

Quoted 5 lines
---
 package/pkg-cmake.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com