juce-framework / JUCE

JUCE is an open-source cross-platform C++ application framework for desktop and mobile applications, including VST, VST3, AU, AUv3, LV2 and AAX audio plug-ins.
https://juce.com
Other
6.54k stars 1.73k forks source link

[Bug]: Linux ARM 64bit not properly detected #1314

Open falkTX opened 9 months ago

falkTX commented 9 months ago

Detailed steps on how to reproduce the bug

When building for Linux ARM 64bit target, it correctly sets JUCE_ARM but not JUCE_64BIT

What is the expected behaviour?

The JUCE_64BIT macro should be set to 1 when building for Linux ARM 64bit

Operating systems

Linux

What versions of the operating systems?

Any

Architectures

ARM

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

falkTX commented 9 months ago

Issue comes from https://github.com/juce-framework/JUCE/blob/develop/modules/juce_core/system/juce_TargetPlatform.h#L175 where the check for __aarch64__ is only done for JUCE_ARM but not for JUCE_64BIT

On a typical Linux gcc, the __arm64__ macro is not used, that is a macOS thing.

Changing the line to read:

  #if defined (__LP64__) || defined (_LP64) || defined (__arm64__) || defined (__aarch64__)

Fixes the issue, which I have confirmed in my own builds.