twhl-community / halflife-unified-sdk

Half-Life Updated SDK with Opposing Force and Blue Shift merged in, along with other improvements. Check README.md for more information.
Other
143 stars 24 forks source link

cmake: LinuxToolchainConfig: build portable binaries and workaround gcc bug #82366 #539

Closed a1batross closed 10 months ago

a1batross commented 10 months ago

Without -static-libgcc -static-libstdc++ it crashes in GoldSrc with error about missing GCC_7.0.0 symbols in libgcc_s. Just in case link statically with libstdc++ too.

After applying these flags, it crashes with std::bad_cast exception in std::regex constructor (in CommandsSections.cpp). It seems like connected with this issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82366. Apply suggested flag to work around this bug.