-
Notifications
You must be signed in to change notification settings - Fork 15
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
games-roguelike/cataclysm-dda: fixes #111
Conversation
If `USE=lto` was enabled, this would pull in `sys-devel/llvm[gold]`, which has been removed from ::gentoo in favor of `sys-devel/binutils[gold]` and cause the ebuild to fail with unresolvable dependencies. At the same time, upstream has made use of the Gold linker optional by way of the build flag `GOLD`. Empirically, when comparing Clang+LTO builds using ld.bfd and ld.gold, build times during the linking phase are the same within error margins. This does not justify choosing the option. This commit disables the upstream Makefile's preference for it, allowing the ebuild to set its own LDFLAGS if desired. The Gold linker has generally fallen out of favor because its patrons have moved on to LLVM, and active development elsewhere has continued in ld.lld and ld.mold. These linkers are both valid options for this ebuild with or without LTO enabled, but should be left for the user to enable by way of Portage environment controls; e.g., /etc/portage/env/mold: ``` LDFLAGS="${LDFLAGS} -fuse-ld=mold" ``` /etc/portage/package.env/cataclysm-dda: ``` games-roguelike/cataclysm-dda mold ``` The above will, assuming the user has installed `sys-devel/mold`, ask the package to be linked using `ld.mold`. This also happens to offer an enormous speedup when compiling with GCC, and decouples the choice of linker from the choices for LTO and compiler.
cf. CleverRaven/Cataclysm-DDA#66195 This packages a patch from the upstream PR, which simply includes the `cstdint` library in a header file. Due to changes in the way C++ Standard Library headers are organized in GCC 13, the build fails without this include. Note that current live builds and future release builds already include the fix. This commit should be reverted when release "0.G" is superseded and this backporting patch is no longer required.
Phenomenal! You have born gifts, indeed. Thanks so much for this tremendous changeset. It's in! It's so in, @nethershaw. Incidentally, do you have more free time than is comfortable? If so, I (and probably many other Gentooers) would be eternally grateful if you would consider resolving long-standing Gentoo bug 699288 by submitting a Gentoo Portage PR officially adding C:DDA to Portage. Now, I know what you're thinking:
But just hear me out. I'm quietly contemplating the closure of this Gentoo overlay at the end of this year. Why? @beartype, mostly. I 😻 Gentoo, but I 😻 Python even more. @beartype unexpectedly exploded into this real-life thing that is now consuming all my open-source volunteerism, enthusiasm, and time. A man cannot have two mistresses. Either Gentoo has gotta go or @beartype has gotta go. Guess which is going? C:DDA is this overlay's most popular ebuild, by a wide margin. It would be really sad for this overlay to just slowly die – and take Gentoo support for C:DDA with it. If you'd like to keep Gentoo support for C:DDA alive, please please consider adding C:DDA to Portage. You are the roguelike hero that Gentoo needs and deserves. You can do this, @nethershaw. We all believe in you. You are the nail bat that the zombie hordes have been waiting for. 🧟 |
I will do my best. I have already started working some other problems related to this ebuild that I think will improve its chances of being included in ::gentoo, namely:
|
Base 36. I'll just let that sink in.
🤮
Totally. And feel free to continue submitting C:DDA PRs against this repo, if you'd like. I'd also be happy to grant you push access as well.... if you'd like. No biggie either way. Clearly, you're both inherently trustworthy and awesome. Thanks so much for tackling this whenever your scarce free time permits, @nethershaw. Now, if anyone needs me, I'll be sleeping in my bunk for a week. 😴 |
Hello! I come bearing gifts.
There are two separate fixes offered here for the Cataclysm: DDA ebuild.
USE=lto
was broken because of reorganized dependencies in ::gentoo. This fix removes a dependency previously required for LTO that is required no longer, and suggests a more Gentoo-esque means of involving alternate linkers if the user so desires. I benchmarked this ebuild with GCC and Clang and four different linkers (BFD, Gold, LLD, and Mold) to reach my conclusions.Full details and justifications are in the commit messages.