Skip to content

Commit ce4e526

Browse files
committedFeb 23, 2016
Decouple linking for C-exts from clang/gcc.
1 parent a8b3449 commit ce4e526

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed
 

Diff for: ‎core/rbconfig.rb

+7-3
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,13 @@ module RbConfig
209209
CONFIG["PACKAGE_VERSION"] = ""
210210
CONFIG["PACKAGE_STRING"] = ""
211211
CONFIG["PACKAGE_BUGREPORT"] = ""
212-
CONFIG["LDSHARED"] = Rubinius::LDSHARED.dup
213-
CONFIG["LIBRUBY_LDSHARED"] = Rubinius::LDSHARED.dup
214-
CONFIG["LDSHAREDXX"] = Rubinius::LDSHAREDXX.dup
212+
213+
ldshared = (ENV["LDSHARED"] || Rubinius::LDSHARED.sub(/^(gcc|clang)/, "cc")).dup
214+
ldsharedxx = (ENV["LDSHAREDXX"] || Rubinius::LDSHAREDXX.sub(/^(g|clang)\+\+/, "c++")).dup
215+
216+
CONFIG["LDSHARED"] = ldshared
217+
CONFIG["LIBRUBY_LDSHARED"] = ldshared
218+
CONFIG["LDSHAREDXX"] = ldsharedxx
215219

216220
# absolute path to ruby executable (pulled directly from MRI's mkconfig.rb)
217221
def RbConfig.ruby

0 commit comments

Comments
 (0)
Please sign in to comment.