зеркало из https://github.com/github/ruby.git
Remove leading spaces from `LIBPATHFLAG` and `RPATHFLAG`
Join with a space in `MakeMakefile#libpathflag` instead.
This commit is contained in:
Родитель
9138b388ee
Коммит
1f6d2e77d9
|
@ -662,9 +662,9 @@ RUBY_WERROR_FLAG([
|
|||
[enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"])
|
||||
|
||||
AS_IF([test "$enable_rpath:${RPATHFLAG}" = yes:], [
|
||||
RPATHFLAG="${rpathflag:+ ${rpathflag}%1\$-s}"
|
||||
RPATHFLAG="${rpathflag:+${rpathflag}%1\$-s}"
|
||||
])
|
||||
AS_CASE([${RPATHFLAG}],[*'%1$'*],[: ${LIBPATHFLAG=' -L%1$-s'}],[: ${LIBPATHFLAG=' -L%s'}])
|
||||
AS_CASE([${RPATHFLAG}],[*'%1$'*],[: ${LIBPATHFLAG='-L%1$-s'}],[: ${LIBPATHFLAG='-L%s'}])
|
||||
}
|
||||
|
||||
RUBY_TRY_LDFLAGS(-fdeclspec, [fdeclspec=yes], [fdeclspec=no])
|
||||
|
|
|
@ -583,14 +583,15 @@ MSG
|
|||
end
|
||||
|
||||
def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
|
||||
libpathflags = nil
|
||||
libpath.map{|x|
|
||||
case x
|
||||
when "$(topdir)", /\A\./
|
||||
LIBPATHFLAG
|
||||
else
|
||||
LIBPATHFLAG+RPATHFLAG
|
||||
libpathflags ||= [LIBPATHFLAG, RPATHFLAG].grep(/\S/).join(" ")
|
||||
end % x.quote
|
||||
}.join
|
||||
}.join(" ")
|
||||
end
|
||||
|
||||
def werror_flag(opt = nil)
|
||||
|
@ -2906,7 +2907,7 @@ MESSAGE
|
|||
##
|
||||
# Argument which will add a library path to the linker
|
||||
|
||||
LIBPATHFLAG = config_string('LIBPATHFLAG') || ' -L%s'
|
||||
LIBPATHFLAG = config_string('LIBPATHFLAG') || '-L%s'
|
||||
|
||||
##
|
||||
# Argument which will add a runtime library path to the linker
|
||||
|
|
|
@ -360,7 +360,7 @@ install-cross: $(arch)-fake.rb $(RBCONFIG) rbconfig.rb $(arch_hdrdir)/ruby/confi
|
|||
$(Q) sed '/^\$$:\.unshift/q' $(arch)-fake.rb > fake.rb
|
||||
$(Q) $(BASERUBY) -p \
|
||||
-e '~/^\s*CONFIG\["LDFLAGS"\]/ and' \
|
||||
-e '$$_[/(?=\s*"$$)/] = %q[ #{(CONFIG["LIBPATHFLAG"]%File.dirname(__FILE__)).strip}]' \
|
||||
-e '$$_[/(?=\s*"$$)/] = %q[ #{CONFIG["LIBPATHFLAG"]%File.dirname(__FILE__)}]' \
|
||||
rbconfig.rb > fake-rbconfig.rb
|
||||
$(INSTALL_SCRIPT) fake.rb $(XRUBY_RUBYLIBDIR)/$(arch)/fake.rb
|
||||
$(INSTALL_SCRIPT) fake-rbconfig.rb $(XRUBY_RUBYLIBDIR)/$(arch)/rbconfig.rb
|
||||
|
|
|
@ -1095,7 +1095,7 @@ s,@CSRCFLAG@,$(CSRCFLAG),;t t
|
|||
s,@CPPOUTFILE@,-P,;t t
|
||||
s,@PRELOADENV@,,;t t
|
||||
s,@LIBPATHENV@,PATH,;t t
|
||||
s,@LIBPATHFLAG@, -libpath:%s,;t t
|
||||
s,@LIBPATHFLAG@,-libpath:%s,;t t
|
||||
s,@RPATHFLAG@,,;t t
|
||||
s,@LIBARG@,%s.lib,;t t
|
||||
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) -link $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;t t
|
||||
|
|
Загрузка…
Ссылка в новой задаче