New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable building 32-bit binaries on 64-bit Linux via toolchain file #176
base: main
Are you sure you want to change the base?
Conversation
Can we do this in a different way? Not sure we need to start adding hacks, there has to be a proper way of doing it... |
That was my thought as well. However the Debian one is adapted from modules shipped with cmake, which set lib specific paths in a similar way. The rpm/Fedora one though... When setting these values from the outside (with I would argue that this is a small hack which will be removed later. For now it helps with tracking down 32/64 bit incompatibilities. |
I very much prefer the toolchain approach! Could you update README instruction about how to use the 32bit toolchain (install i386 packages, and |
Thanks @winterheart for the Gentoo cmake toolchain file hint. I will update the README in a separate PR. |
I think linux 32bit clang is redundant. We added clang to matrix for some sanity checks and asan features in future. Most users can use gcc build. |
Yes, can I exclude clang from the artifacs with an But for building, clang still has different warnings and might catch something in 32bit if we ever get to activating |
@th1000s some conflicts in the workflow file need to be resolved now that unittests have been merged, but it seems good otherwise! |
5eea665
to
24548bc
Compare
Use 'linux-32' preset, or specify file explicitly with `-D CMAKE_TOOLCHAIN_FILE=path/to/tools/toolchain-32-bit.cmake` Flags from the toolchain file don't override but extend those passed on the command line via `-D CMAKE_..`. The list of flags is from https://wiki.debian.org/Multiarch/Compiling
Only upload gcc Linux artifacts, use clang for compiler diversity.
I'm getting an error when trying this branch. I'm using Debian and have the following packages installed.
Here's the error:
|
|
Now that Icculus' 64-bit changes have been merged (#233), do we still need a 32 bit build ? |
Of course. "64-bit safe" merely means the behavior is the same regardless of what it's built for. |
No it's not obvious. The idea behind 32bit Linux builds was to ensure 64 bit was the same as 32 bit when we were porting the game to 64 bit. Now that Ryan's PR bringing 64 bit compatibility fixes is in, there is a lower chance that we will find bugs because of that. At this point, maintaining compatibility with 32 bit Linux makes less sense because it is "one more platform to support" and not "the reference implementation". This project aims to support current-day platforms, and 32 bit Linux is not one of them. |
Yes, publishing 32-bit Linux builds makes no sense. If 32-bit Windows msvc builds stick around it might be helpful for Linux devs to have 32-bit clang/gcc targets (which can also be build locally) and not just a single GitHub target. Just building |
In that case, you should know that the fixes in this PR are not the only uses of architecture specific sizes. |
Works with variables passed on the commandline via
-D CMAKE_..
, flags from https://wiki.debian.org/Multiarch/CompilingAvoids adding a toolchain file.- It does not avoid this at all!