Refer also CXX and CC env vars as linker command in gcc and clang toolchain
ref
MODIFY
tasks/toolchains/clang.rake
tasks/toolchains/clang.rake
@@ -5,5 +5,5 @@ MRuby::Toolchain.new(:clang) do |conf, _params|
cc.command = ENV['CC'] || 'clang'
end
conf.cxx.command = ENV['CXX'] || 'clang++'
- conf.linker.command = ENV['LD'] || 'clang'
+ conf.linker.command = ENV['LD'] || ENV['CXX'] || ENV['CC'] || 'clang'
end

MODIFY
tasks/toolchains/gcc.rake
tasks/toolchains/gcc.rake
@@ -20,7 +20,7 @@ MRuby::Toolchain.new(:gcc) do |conf, _params|
end
conf.linker do |linker|
- linker.command = ENV['LD'] || 'gcc'
+ linker.command = ENV['LD'] || ENV['CXX'] || ENV['CC'] || 'gcc'
linker.flags = [ENV['LDFLAGS'] || %w()]
linker.libraries = %w(m)
linker.library_paths = []

Refer also CXX and CC env vars as linker command in gcc and clang toolchain

ref #4292