diff --git a/setup.py b/setup.py index 1cc38893e..a41ccd873 100755 --- a/setup.py +++ b/setup.py @@ -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}'