Enable TLS descriptors on x86-64 (GCC only)

Part of: <https://fedoraproject.org/wiki/Changes/GNUToolchainF40>
This commit is contained in:
Florian Weimer 2024-03-14 11:21:58 +01:00
parent c758552a10
commit b7d1bfae1f
3 changed files with 8 additions and 2 deletions

View File

@ -622,6 +622,8 @@ tuning in the `gcc` package. These settings are:
applied. The default can be overriden (for any distribution)
by specifying `--target x86_64_v2`, `--target x86_64_v3`,
`--target x86_64_v4` in the `rpmbuild` invocation.
With the GCC toolchain, TLS descriptors are enabled using
`-mtls-dialect=gnu2`.
* **aarch64** does not have any architecture-specific tuning.
### Vala-specific compiler flags

3
macros
View File

@ -148,7 +148,8 @@ for k,_ in pairs(stripped_flags) do print(k .. " ") end
%__cflags_arch_x86_64_level %[0%{?rhel} == 9 ? "-v2" : ""]%[0%{?rhel} > 9 ? "-v3" : ""]
%__cflags_arch_x86_64 -march=x86-64%{?__cflags_arch_x86_64_level:%{__cflags_arch_x86_64_level}}
%__cflags_arch_x86_64_common -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection %{_frame_pointers_cflags} %{_frame_pointers_cflags_x86_64}
# -mtls-dialect=gnu2 is currently specific to GCC (#2263181).
%__cflags_arch_x86_64_common -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection %[ "%{toolchain}" == "gcc" ? "-mtls-dialect=gnu2 " : "" ]%{_frame_pointers_cflags} %{_frame_pointers_cflags_x86_64}
# Also used for s390.
%__cflags_arch_s390x %[0%{?rhel} >= 9 ? "-march=z14 -mtune=z15" : "-march=z13 -mtune=z14"]

View File

@ -4,7 +4,7 @@
# 2) When making changes, increment the version (in baserelease) by 1.
# rpmdev-bumpspec and other tools update the macro below, which is used
# in Version: to get the desired effect.
%global baserelease 286
%global baserelease 287
Summary: Red Hat specific rpm configuration files
Name: redhat-rpm-config
@ -262,6 +262,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora common.lua
%doc buildflags.md
%changelog
* Thu Mar 14 2024 Florian Weimer <fweimer@redhat.com> - 287-1
- Enable TLS descriptors on x86-64 (GCC only)
* Tue Mar 12 2024 Omair Majid <omajid@redhat.com> - 286-1
- Define %%dotnet_arches with a list of .NET-compatible architectures