From 16daea3622468abf68a4f0ec22de0a46d57f17ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 10 Jan 2026 23:06:21 +0100 Subject: [PATCH] BasisUniversal: Disable strict aliasing to fix GCC optimization issue This is flagged by upstream as something important in `basisu.h`. And indeed, we've now seen why with a regression appearing with mingw-gcc 15. Fixes #114803. --- modules/basis_universal/SCsub | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/basis_universal/SCsub b/modules/basis_universal/SCsub index 2963babd253..381227228ed 100644 --- a/modules/basis_universal/SCsub +++ b/modules/basis_universal/SCsub @@ -56,6 +56,10 @@ if env["builtin_zstd"]: env_thirdparty = env_basisu.Clone() env_thirdparty.disable_warnings() +if not env.msvc: + # Required by upstream for GCC. Enabling also for LLVM-based compilers to be consistent. + env_thirdparty.Append(CCFLAGS=["-fno-strict-aliasing"]) + # Disable unneeded features to reduce binary size. # env_thirdparty.Append(