[cmake] use -mtls-dialect=gnu2 (#3948)
Some checks are pending
tx-src / sources (push) Waiting to run
Check Strings / check-strings (push) Waiting to run

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 <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3948
Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
Reviewed-by: Maufeat <sahyno1996@gmail.com>
This commit is contained in:
lizzie 2026-05-14 00:17:13 +02:00 committed by crueter
parent ee188168c1
commit d1ceeeca22
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6

View file

@ -159,7 +159,10 @@ else()
endif()
if (ARCHITECTURE_x86_64)
add_compile_options(-mcx16)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-mcx16>)
if (PLATFORM_LINUX OR PLATFORM_FREEBSD)
add_compile_options($<$<COMPILE_LANGUAGE:C,CXX>:-mtls-dialect=gnu2>)
endif()
endif()
if (APPLE AND CXX_CLANG)