summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorYuta Saito <[email protected]>2023-12-27 06:22:45 +0000
committerYuta Saito <[email protected]>2023-12-28 12:20:50 +0900
commit02973b78f499acc28c714a082c82a846314a911f ()
tree7b70d49fa591f1f1adca663eee01d13bfcacdc41 /configure.ac
parent9ec4eae0b184ade7c7937c5fcb2f0d50bac14174 (diff)
[Bug #20085] Use consistent default options for `-mbranch-protection`
We need to use the same options for both C compiler and assembler when `-mbranch-protection` is guessed by configure. Otherwise, `coroutine/arm64/Context.{h,S}` will use incompatible PAC strategies.
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
@@ -830,7 +830,10 @@ AS_IF([test "$GCC" = yes], [
AS_FOR(option, opt, [-mbranch-protection=pac-ret -msign-return-address=all], [
RUBY_TRY_CFLAGS(option, [branch_protection=yes], [branch_protection=no])
AS_IF([test "x$branch_protection" = xyes], [
RUBY_APPEND_OPTION(XCFLAGS, option)
break
])
])