mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-22 06:43:25 +02:00
Merge bitcoin/bitcoin#30433: build: add standard branch-protection
to hardening flags for aarch64-linux
001b1cf010453adbb1316a6fa8911398953afe61 build: use standard branch-protection for aarch64-linux (fanquake) Pull request description: Use `-mbranch-protection=standard` when targetting `*aarch64-*-linux*`. Part of #24123, but this flag can already be used on a best effort basis. Note that this flag is also already used by default, in the toolchain, on various distros (i.e Fedora). ACKs for top commit: hebasto: ACK 001b1cf010453adbb1316a6fa8911398953afe61. TheCharlatan: ACK 001b1cf010453adbb1316a6fa8911398953afe61 Tree-SHA512: 2d7ae60f59921a62d51139cb0fd5cecbed4f63266564b2623b7d160f5b0c2c42c78ef8aeff787f485eccc46a9ffd5da70023ec093df6add7c982e0d48a1601b5
This commit is contained in:
commit
06a9f7789e
@ -506,7 +506,11 @@ if(ENABLE_HARDENING)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64" OR CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
|
||||
try_append_cxx_flags("-mbranch-protection=bti" TARGET hardening_interface SKIP_LINK)
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
try_append_cxx_flags("-mbranch-protection=bti" TARGET hardening_interface SKIP_LINK)
|
||||
else()
|
||||
try_append_cxx_flags("-mbranch-protection=standard" TARGET hardening_interface SKIP_LINK)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
try_append_linker_flag("-Wl,--enable-reloc-section" TARGET hardening_interface)
|
||||
|
Loading…
x
Reference in New Issue
Block a user