From 0f58b15e5cbc977de18c408e16efb6fc40187cc7 Mon Sep 17 00:00:00 2001 From: "taylor.fish" Date: Thu, 1 Feb 2024 16:19:25 -0800 Subject: [PATCH] Fix architecture detection on ppc64le juce_runtime_arch_detection.cpp currently identifies ppc64le as ppc64, which causes it to use the directory name `ppc64-linux` for VST 3 plugin contents. However, VST 3 specifies that `uname -m` should be used as the first component of the directory name, which on 64-bit little-endian PowerPC is `ppc64le`. Currently, this causes problems building VST 3 plugins on this platform, as the VST 3 SDK expects the module directory to be named `ppc64le-linux`. This commit adds an additional endianness check when 64-bit PowerPC is detected, outputting `ppc64` or `ppc64le` as appropriate. --- extras/Build/CMake/juce_runtime_arch_detection.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extras/Build/CMake/juce_runtime_arch_detection.cpp b/extras/Build/CMake/juce_runtime_arch_detection.cpp index 90c9a66db18e..ea2582c00d59 100644 --- a/extras/Build/CMake/juce_runtime_arch_detection.cpp +++ b/extras/Build/CMake/juce_runtime_arch_detection.cpp @@ -62,7 +62,11 @@ #elif defined(__ppc__) || defined(__ppc) || defined(__powerpc__) || defined(_ARCH_COM) || defined(_ARCH_PWR) || defined(_ARCH_PPC) || defined(_M_MPPC) || defined(_M_PPC) #if defined(__ppc64__) || defined(__powerpc64__) || defined(__64BIT__) - #error JUCE_ARCH ppc64 + #ifdef __LITTLE_ENDIAN__ + #error JUCE_ARCH ppc64le + #else + #error JUCE_ARCH ppc64 + #endif #else #error JUCE_ARCH ppc #endif