Skip to content

Commit

Permalink
Fix architecture detection on ppc64le
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
taylordotfish committed Feb 2, 2024
1 parent 6056c68 commit 0f58b15
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion extras/Build/CMake/juce_runtime_arch_detection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f58b15

Please sign in to comment.