3 ms·
This is true but by now distros have fixed most of the breakage and sent the changes back upstream (certainly this is true for Fedora).
by rwmj 3y ago
This is true but by now distros have fixed most of the breakage and sent the changes back upstream (certainly this is true for Fedora).
- mid-kid 3y agoWell, yeah, for maintained upstreams. I sometimes need to build older versions of software and simply use unmaintained software, for which these changes are a bit of a pain, along with -fno-common before it.
- mikepurvis 3y agoAt a certain point, it's probably easier to build and run the unmaintained software in a container running an OS of corresponding vintage. Obviously that has security ramifications, but hopefully this software isn't facing the internet and being in a container at least means you're on a modern kernel and can isolate things at a port and filesystem level.
- withzombies 3y agoDebian is super good for this. Most of their apt mirrors are still up and running, so you can easily download and build software from 2002 if you use the appropriate Debian release to do it. I usually do this first to make sure the software builds and works, then I try to figure out how to get it working on a newer OS.
- mid-kid 3y agoYou're right, but it's also significantly more inconvenient.
- cozzyd 3y agoit would be nice if they provided a gcc-ancient-compat or something though it's easy enough to create an alias with the correct flags.
- Phyx 3y ago-std=gnu98 works. ie explicitly telling it your code is not modern C.
- mid-kid 3y agoThe new flags apply regardless of -std value, as does -fno-common
- Phyx 3y agoUhh no they don't, and it's explicitly documented under https://gcc.gnu.org/gcc-14/porting_to.html https://gcc.gnu.org/gcc-14/porting_to.html in "Turning errors back into warnings". Futher more every warning Explains why the std value affects them.