Dont use branch-protection=standard on linux ARM as it reportedly causes crashes

See https://github.com/kovidgoyal/kitty/issues/6845#issuecomment-1835886938
This commit is contained in:
Kovid Goyal 2023-12-01 16:48:30 +05:30
parent f2075f99fd
commit d4ff54e0d8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -448,7 +448,10 @@ def init_env(
std = '' if is_openbsd else '-std=c11'
sanitize_flag = ' '.join(sanitize_args)
march = '-march=native' if native_optimizations else ''
control_flow_protection = '-mbranch-protection=standard' if is_arm else '-fcf-protection=full'
# Using -mbranch-protection=standard causes crashes on Linux ARM, reported
# in https://github.com/kovidgoyal/kitty/issues/6845#issuecomment-1835886938
arm_control_flow_protection = '-mbranch-protection=standard' if is_macos else ''
control_flow_protection = arm_control_flow_protection if is_arm else '-fcf-protection=full'
cflags_ = os.environ.get(
'OVERRIDE_CFLAGS', (
f'-Wextra {float_conversion} -Wno-missing-field-initializers -Wall -Wstrict-prototypes {std}'