Update configure.ac
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
This commit is contained in:
parent
f3b54d5fc2
commit
1dfe007e16
Notes:
git
2022-06-17 11:58:32 +09:00
13
configure.ac
13
configure.ac
@ -782,14 +782,11 @@ AS_IF([test "$GCC" = yes], [
|
||||
|
||||
# aarch64 branch protection
|
||||
AS_CASE(["$target_cpu"], [aarch64], [
|
||||
branch_protection=no
|
||||
RUBY_TRY_CFLAGS(-mbranch-protection=pac-ret,[branch_protection=yes])
|
||||
AS_IF([test "x$branch_protection" = xyes], [
|
||||
RUBY_APPEND_OPTION(XCFLAGS, -mbranch-protection=pac-ret)
|
||||
],
|
||||
[
|
||||
RUBY_TRY_CFLAGS(-msign-return-address=all, [
|
||||
RUBY_APPEND_OPTION(XCFLAGS, -msign-return-address=all)
|
||||
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
|
||||
])
|
||||
])
|
||||
])
|
||||
|
Loading…
x
Reference in New Issue
Block a user