From d1ceeeca229383ed44b74d4d9d248c50359d5b58 Mon Sep 17 00:00:00 2001 From: lizzie Date: Thu, 14 May 2026 00:17:13 +0200 Subject: [PATCH] [cmake] use -mtls-dialect=gnu2 (#3948) see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120933 we use TLS very sparingly (which is a good thing), some of our dependencies, in turn, may not we should be aware of that fact allegedly, there are minor glibc issues and such, but most distros should be fine additionally, this is only enabled for FreeBSD and Linux, if it works on FreeBSD, naturally every Linux distro should support it as well Signed-off-by: lizzie Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3948 Reviewed-by: CamilleLaVey Reviewed-by: Maufeat --- src/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 48544aeaec..58ae00e8d9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -159,7 +159,10 @@ else() endif() if (ARCHITECTURE_x86_64) - add_compile_options(-mcx16) + add_compile_options($<$:-mcx16>) + if (PLATFORM_LINUX OR PLATFORM_FREEBSD) + add_compile_options($<$:-mtls-dialect=gnu2>) + endif() endif() if (APPLE AND CXX_CLANG)