Project

General

Profile

early-libdir.patch

sorah (Sorah Fukumori), 08/27/2015 05:18 PM

View differences:

lib/mkmf.rb
468 468
    end
469 469
  end
470 470

  
471
  def link_command(ldflags, opt="", libpath=$LIBPATH|$DEFLIBPATH)
471
  def link_command(ldflags, opt="", libpath=[$libdir]|$LIBPATH|$DEFLIBPATH)
472 472
    librubyarg = $extmk ? $LIBRUBYARG_STATIC : "$(LIBRUBYARG)"
473 473
    conf = RbConfig::CONFIG.merge('hdrdir' => $hdrdir.quote,
474 474
                                  'src' => "#{CONFTEST_C}",
......
504 504
                     conf)
505 505
  end
506 506

  
507
  def libpathflag(libpath=$LIBPATH|$DEFLIBPATH)
507
  def libpathflag(libpath=[$libdir]|$LIBPATH|$DEFLIBPATH)
508 508
    libpath.map{|x|
509 509
      case x
510 510
      when "$(topdir)", /\A\./
......
2180 2180
  #
2181 2181
  def create_makefile(target, srcprefix = nil)
2182 2182
    $target = target
2183
    libpath = $LIBPATH|$DEFLIBPATH
2183
    libpath = [$libdir]|$LIBPATH|$DEFLIBPATH
2184 2184
    message "creating Makefile\n"
2185 2185
    MakeMakefile.rm_f "#{CONFTEST}*"
2186 2186
    if CONFIG["DLEXT"] == $OBJEXT
......
2261 2261
    conf = yield(conf) if block_given?
2262 2262
    mfile.puts(conf)
2263 2263
    mfile.print "
2264
libpath = #{($LIBPATH|$DEFLIBPATH).join(" ")}
2264
libpath = #{([$libdir]|$LIBPATH|$DEFLIBPATH).join(" ")}
2265 2265
LIBPATH = #{libpath}
2266 2266
DEFFILE = #{deffile}
2267 2267