Skip to content

Int128 fixes on 32-bit arm and other non-mainstream architectures#279

Merged
mariuz merged 3 commits into
mariuz:masterfrom
real-dam:int128-arch-fixes
Sep 19, 2022
Merged

Int128 fixes on 32-bit arm and other non-mainstream architectures#279
mariuz merged 3 commits into
mariuz:masterfrom
real-dam:int128-arch-fixes

Conversation

@real-dam

Copy link
Copy Markdown
Contributor

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

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)
@real-dam real-dam changed the title Int128 arch fixes on 32-bit arm and other non-mainstream architectures Int128 fixes on 32-bit arm and other non-mainstream architectures Sep 19, 2022
@mariuz
mariuz merged commit 29fb8dc into mariuz:master Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants