Skip to content

Commit 040cbb1

Browse files
committed
[GR-18163] Set RbConfig::CONFIG LIBPATH and RPATHFLAG like CRuby
PullRequest: truffleruby/2422
2 parents f68232e + a2eb131 commit 040cbb1

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Compatibility:
5353
* Refinements take place at `Object#method` and `Module#instance_method` (#2004, @ssnickolay).
5454
* Add support for `rb_scan_args_kw` in C API (#2244, @LillianZ).
5555
* Update random implementation layout to be more compatible (#2234).
56+
* Set `RbConfig::CONFIG['LIBPATHFLAG'/'RPATHFLAG']` like MRI to let `$LIBPATH` changes in `extconf.rb` work.
5657

5758
Performance:
5859

lib/truffle/rbconfig.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ module RbConfig
165165
'libdirname' => 'libdir',
166166
'LIBEXT' => 'a',
167167
'LIBPATHENV' => 'LD_LIBRARY_PATH',
168+
'LIBPATHFLAG' => ' -L%1$-s',
168169
'LIBRUBY' => '',
169170
'LIBRUBY_A' => '',
170171
'LIBRUBYARG' => librubyarg,
@@ -180,6 +181,7 @@ module RbConfig
180181
'prefix' => prefix,
181182
'RANLIB' => ranlib,
182183
'RM' => 'rm -f',
184+
'RPATHFLAG' => ' -Wl,-rpath,%1$-s',
183185
'RUBY_BASE_NAME' => ruby_base_name,
184186
'ruby_install_name' => ruby_install_name,
185187
'RUBY_INSTALL_NAME' => ruby_install_name,

0 commit comments

Comments
 (0)