Int128 fixes on 32-bit arm and other non-mainstream architectures#279
Merged
Conversation
if available, -DHAVE_INT128 is added to the compiler command line
if available, -DHAVE_DECIMAL128 is added to the compiler command line
previously the availability of the types was deduced by the used compiler: MSVC was assumed to miss them, any other compiler was assumed to have them. This mostly works, except on non-mainstream architectures like 32-bit arm or mips. Example build failures: https://buildd.debian.org/status/fetch.php?pkg=flamerobin&arch=arm64&ver=0.9.3.12-1&stamp=1663233656&raw=0 https://buildd.debian.org/status/fetch.php?pkg=flamerobin&arch=armhf&ver=0.9.3.12-1&stamp=1663233737&raw=0 https://buildd.debian.org/status/fetch.php?pkg=flamerobin&arch=armhf&ver=0.9.3.12-2&stamp=1663429893&raw=0 The proposed solution is to rely on the tests in CMakeLists.txt for each type. The result is passing builds on 14 Debian architectures. (all architectures where wx3.2 is available)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the availability of __int128 and std::decimal::decimalXXX is determined via checkd for compiler type. GCC is assumed to have them, and MSVC is assumed to miss them. However, gcc misses them on 32-bit arm, mips and other more "exotic" architectures.
The proposed solution tests the availability of __int128 and std::decimal::decimal128 via CMakeFiles.txt and adds -D defined to the compiler command line of they are available. Further, the code that uses them is made conditional on these defines, instead of on compiler type.
The result builds on all Debian architectures where wx3.2 is available (14 architectures): https://buildd.debian.org/status/package.php?p=flamerobin