Skip to content

Commit aec09e2

Browse files
authored
Disable rpath in cross compiled C extensions
This instructs cross rubies to omit the rpath linker option to the absolute path in the build environment, which is like ``` -Wl,-rpath,/home/kanis/.rvm/rubies/ruby-3.4.5/lib ``` This path is not present on the target system and could lead to security issues. Related to sparklemotion/nokogiri#3133
1 parent 1cf53d5 commit aec09e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build/patches/rake-compiler-1.2.9/0004-Enable-build-of-static-libruby.patch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ diff --git a/tasks/bin/cross-ruby.rake b/tasks/bin/cross-ruby.rake
22
index 8317a2a3..8ed21718 100644
33
--- a/tasks/bin/cross-ruby.rake
44
+++ b/tasks/bin/cross-ruby.rake
5-
@@ -116,11 +116,31 @@
5+
@@ -116,11 +116,32 @@
66
"--host=#{mingw_host}",
77
"--target=#{mingw_target}",
88
"--build=#{RUBY_BUILD}",
99
- '--enable-shared',
1010
+ '--enable-install-static-library',
1111
+ '--disable-jit-support',
12+
+ '--disable-rpath',
1213
+ 'ac_cv_lib_z_uncompress=no',
1314
+ 'ac_cv_lib_crypt_crypt=no',
1415
+ 'ac_cv_func_crypt_r=no',

0 commit comments

Comments
 (0)