1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-29 08:47:35 +00:00

Toolchain: Use -ftls-model=initial-exec by default

Our TLS implementation relies on the TLS model being "initial-exec".
We previously enforced this by adding the '-ftls-model=initial-exec'
flag in the root CmakeLists file, but that did not affect ports - So
now we put that flag in the gcc spec files.

Closes #5366
This commit is contained in:
Itamar 2021-02-19 15:54:40 +02:00 committed by Andreas Kling
parent 4f80bb6ce3
commit 7df61e2c9b
3 changed files with 12 additions and 6 deletions

View file

@ -73,9 +73,9 @@ set(CMAKE_CXX_EXTENSIONS OFF)
if (${CMAKE_HOST_SYSTEM_NAME} MATCHES SerenityOS)
# FIXME: Something makes this go crazy and flag unused variables that aren't flagged as such when building with the toolchain.
# Disable -Werror for now.
add_compile_options(-Wno-unknown-warning-option -Wall -Wextra -Wmissing-declarations -Wformat=2 -fdiagnostics-color=always -ftls-model=initial-exec)
add_compile_options(-Wno-unknown-warning-option -Wall -Wextra -Wmissing-declarations -Wformat=2 -fdiagnostics-color=always)
else()
add_compile_options(-Wno-unknown-warning-option -Wall -Wextra -Werror -Wmissing-declarations -Wformat=2 -fdiagnostics-color=always -ftls-model=initial-exec)
add_compile_options(-Wno-unknown-warning-option -Wall -Wextra -Werror -Wmissing-declarations -Wformat=2 -fdiagnostics-color=always)
endif()
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")