ruby/ruby-3.4.0-fix-branch-protection-compilation-for-arm.patch
Jun Aruga d143dbbbc6 Upgrade to Ruby 3.3.1.
* Upgrade to Ruby 3.3.1.
  Resolves: RHEL-33975
* Fix buffer overread vulnerability in StringIO.
  Resolves: RHEL-34124
* Fix RCE vulnerability with .rdoc_options in RDoc.
  Resolves: RHEL-34116
* Fix arbitrary memory address read vulnerability with Regex search.
  Resolves: RHEL-33866

* Ruby bundled NKF, add appropriate `bundled` provide and test
* License review and clarification

This commit was merged and adjusted from Fedora rawhie latest commit
<ff5301a5f3>.

```
$ git remote add fedora https://src.fedoraproject.org/rpms/ruby.git
$ git fetch fedora
$ git merge --squash fedora/rawhide
```
2024-05-10 12:04:59 +02:00

25 lines
1.0 KiB
Diff

From db4ba95bf12f9303e38a9a78979cd363cb9a19fb Mon Sep 17 00:00:00 2001
From: Jarek Prokop <jprokop@redhat.com>
Date: Fri, 12 Jan 2024 18:33:34 +0100
Subject: [PATCH] aarch64: Prepend -mbranch-protection=standard option when
checking branch protection.
Related Upstream issue: https://bugs.ruby-lang.org/issues/20154
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 18b4247991..5ea8ada8f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -827,7 +827,7 @@ AS_IF([test "$GCC" = yes], [
# aarch64 branch protection
AS_CASE(["$target_cpu"], [aarch64], [
- AS_FOR(option, opt, [-mbranch-protection=pac-ret -msign-return-address=all], [
+ AS_FOR(option, opt, [-mbranch-protection=standard -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], [
# C compiler and assembler must be consistent for -mbranch-protection