diff options
| author | Hans de Graaff <graaff@gentoo.org> | 2024-12-26 07:39:04 +0100 |
|---|---|---|
| committer | Hans de Graaff <graaff@gentoo.org> | 2024-12-29 10:04:35 +0100 |
| commit | 5e4cd90aa7db9ba0f03dffe6e1f024daca6616b4 (patch) | |
| tree | 79e17366e2990f762f551311b1c277de1fb80803 /dev-lang/ruby/files/3.4 | |
| parent | 6a79cb636b5cf1332ffad4c75f37b11b1a466903 (diff) | |
| download | gentoo-5e4cd90aa7db9ba0f03dffe6e1f024daca6616b4.tar.gz gentoo-5e4cd90aa7db9ba0f03dffe6e1f024daca6616b4.tar.bz2 gentoo-5e4cd90aa7db9ba0f03dffe6e1f024daca6616b4.zip | |
dev-lang/ruby: add 3.4.1
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Diffstat (limited to 'dev-lang/ruby/files/3.4')
| -rw-r--r-- | dev-lang/ruby/files/3.4/010-default-gem-location.patch | 11 | ||||
| -rw-r--r-- | dev-lang/ruby/files/3.4/902-hppa-pthread-stack-size.patch | 54 |
2 files changed, 65 insertions, 0 deletions
diff --git a/dev-lang/ruby/files/3.4/010-default-gem-location.patch b/dev-lang/ruby/files/3.4/010-default-gem-location.patch new file mode 100644 index 000000000000..36009ad66f61 --- /dev/null +++ b/dev-lang/ruby/files/3.4/010-default-gem-location.patch @@ -0,0 +1,11 @@ +--- a/tool/rbinstall.rb 2022-11-13 08:12:27.373041649 +0100 ++++ b/tool/rbinstall.rb 2022-11-13 08:16:09.110406705 +0100 +@@ -994,7 +994,7 @@ + end + + install?(:ext, :comm, :gem, :'bundled-gems') do +- gem_dir = Gem.default_dir ++ gem_dir = ENV['GEM_DESTDIR'] + install_dir = with_destdir(gem_dir) + prepare "bundled gems", gem_dir + RbInstall.no_write do diff --git a/dev-lang/ruby/files/3.4/902-hppa-pthread-stack-size.patch b/dev-lang/ruby/files/3.4/902-hppa-pthread-stack-size.patch new file mode 100644 index 000000000000..96e24a340ad9 --- /dev/null +++ b/dev-lang/ruby/files/3.4/902-hppa-pthread-stack-size.patch @@ -0,0 +1,54 @@ +https://bugs.gentoo.org/701494 + +From 40ccf3b91071d3603335b0b7095613ef1843f9e1 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Fri, 7 Apr 2023 11:46:12 +0100 +Subject: [PATCH] thread_pthread: Grow main_stack if required (fixes tests on + HPPA) + +On HPPA, test_insns.rb fails (along with various Ruby gems) with +'stack level too deep (SystemStackError)'. This turns out to be because HPPA +defaults to a small(er) stack. + +With this change, most of Ruby's test suite now passes on HPPA. + +Thanks to both Dave and Helge for the investigation and coming up with the +patch. + +Bug: https://bugs.gentoo.org/701494 +Bug: https://bugs.debian.org/881773 +Bug: https://bugs.debian.org/881772 (for PPC64) +Bug: https://github.com/rack/rack/issues/1640 +Thanks-to: John David Anglin <dave.anglin@bell.net> +Thanks-to: Helge Deller <deller@gmx.de> +Signed-off-by: Sam James <sam@gentoo.org> +--- a/thread_pthread.c ++++ b/thread_pthread.c +@@ -858,8 +858,22 @@ size_t pthread_get_stacksize_np(pthread_t); + # define MAINSTACKADDR_AVAILABLE 0 + # endif + #endif +-#if MAINSTACKADDR_AVAILABLE && !defined(get_main_stack) +-# define get_main_stack(addr, size) get_stack(addr, size) ++#if MAINSTACKADDR_AVAILABLE ++static int get_stack(void **, size_t *); ++static int ++get_main_stack(void **addr, size_t *size) ++{ ++ int ret = get_stack(addr, size); ++ ++#ifdef __hppa__ ++ /* On some architectures, the initial stack size may be too small, but fortunately, ++ it's growable. Bump it up to the minimum needed if it is too small. */ ++ if (*size < RUBY_VM_THREAD_VM_STACK_SIZE) ++ *size = RUBY_VM_THREAD_VM_STACK_SIZE; ++#endif ++ ++ return ret; ++} + #endif + + #ifdef STACKADDR_AVAILABLE +-- +2.40.0 + |
