JUCE icon indicating copy to clipboard operation
JUCE copied to clipboard

[Bug]: Linux ARM 64bit not properly detected

Open falkTX opened this issue 1 year ago • 1 comments

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

  • [X] I agree to follow the Code of Conduct

falkTX avatar Dec 10 '23 13:12 falkTX

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.

falkTX avatar Dec 10 '23 13:12 falkTX