Previously when compiling under these architectures on Debian Linux with gcc 12 the build script would fail, this PR fixes the reasons for these errors.
Currently you cannot build on Linux ARM based systems for the following reasons:
The script would always add a -m64 flag when building on a 64-bit system, but GCC on ARM doesn't support this flag. So we no longer emit it when building. for ARM.
The script would sometimes emit a `-m32 flag when building on ARM systems, but GCC on ARM doesn't support this flag. So we no longer emit it when building. for ARM.
The script would always link libssp but GCC for ARM isn't compiled with this and it doesn't respect the XMP_ENABLE_SECURE_SETTINGS setting in build/shared/ToolchainGCC.cmake. The Cmakefile now respects this setting for Linux allowing us to disable the use of libssp and resolve these errors on ARM.
source/EndianUtils.hpp lacked a macro block for determining endianness and would throw a build error. Since ARM supports both types of endian we default to Big Endian since the majority of ARM processors support this.
How Has This Been Tested?
After making this change I was able to initiate a build without getting the gcc error.
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
Previously when compiling under these architectures on Debian Linux with gcc 12 the build script would fail, this PR fixes the reasons for these errors.
Related Issue
https://github.com/adobe/XMP-Toolkit-SDK/issues/81
Motivation and Context
Currently you cannot build on Linux ARM based systems for the following reasons:
-m64
flag when building on a 64-bit system, but GCC on ARM doesn't support this flag. So we no longer emit it when building. for ARM.libssp
but GCC for ARM isn't compiled with this and it doesn't respect theXMP_ENABLE_SECURE_SETTINGS
setting in build/shared/ToolchainGCC.cmake. The Cmakefile now respects this setting for Linux allowing us to disable the use oflibssp
and resolve these errors on ARM.How Has This Been Tested?
After making this change I was able to initiate a build without getting the
gcc
error.Types of changes
Checklist: