mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Remove leading spaces from LIBPATHFLAG
and RPATHFLAG
Join with a space in `MakeMakefile#libpathflag` instead.
This commit is contained in:
parent
9138b388ee
commit
1f6d2e77d9
Notes:
git
2024-09-29 14:40:10 +00:00
4 changed files with 8 additions and 7 deletions
|
@ -662,9 +662,9 @@ RUBY_WERROR_FLAG([
|
||||||
[enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"])
|
[enable_rpath=$enableval], [enable_rpath="$rb_cv_binary_elf"])
|
||||||
|
|
||||||
AS_IF([test "$enable_rpath:${RPATHFLAG}" = yes:], [
|
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])
|
RUBY_TRY_LDFLAGS(-fdeclspec, [fdeclspec=yes], [fdeclspec=no])
|
||||||
|
|
|
@ -583,14 +583,15 @@ MSG
|
||||||
end
|
end
|
||||||
|
|
||||||
def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
|
def libpathflag(libpath=$DEFLIBPATH|$LIBPATH)
|
||||||
|
libpathflags = nil
|
||||||
libpath.map{|x|
|
libpath.map{|x|
|
||||||
case x
|
case x
|
||||||
when "$(topdir)", /\A\./
|
when "$(topdir)", /\A\./
|
||||||
LIBPATHFLAG
|
LIBPATHFLAG
|
||||||
else
|
else
|
||||||
LIBPATHFLAG+RPATHFLAG
|
libpathflags ||= [LIBPATHFLAG, RPATHFLAG].grep(/\S/).join(" ")
|
||||||
end % x.quote
|
end % x.quote
|
||||||
}.join
|
}.join(" ")
|
||||||
end
|
end
|
||||||
|
|
||||||
def werror_flag(opt = nil)
|
def werror_flag(opt = nil)
|
||||||
|
@ -2906,7 +2907,7 @@ MESSAGE
|
||||||
##
|
##
|
||||||
# Argument which will add a library path to the linker
|
# 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
|
# 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) sed '/^\$$:\.unshift/q' $(arch)-fake.rb > fake.rb
|
||||||
$(Q) $(BASERUBY) -p \
|
$(Q) $(BASERUBY) -p \
|
||||||
-e '~/^\s*CONFIG\["LDFLAGS"\]/ and' \
|
-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
|
rbconfig.rb > fake-rbconfig.rb
|
||||||
$(INSTALL_SCRIPT) fake.rb $(XRUBY_RUBYLIBDIR)/$(arch)/fake.rb
|
$(INSTALL_SCRIPT) fake.rb $(XRUBY_RUBYLIBDIR)/$(arch)/fake.rb
|
||||||
$(INSTALL_SCRIPT) fake-rbconfig.rb $(XRUBY_RUBYLIBDIR)/$(arch)/rbconfig.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,@CPPOUTFILE@,-P,;t t
|
||||||
s,@PRELOADENV@,,;t t
|
s,@PRELOADENV@,,;t t
|
||||||
s,@LIBPATHENV@,PATH,;t t
|
s,@LIBPATHENV@,PATH,;t t
|
||||||
s,@LIBPATHFLAG@, -libpath:%s,;t t
|
s,@LIBPATHFLAG@,-libpath:%s,;t t
|
||||||
s,@RPATHFLAG@,,;t t
|
s,@RPATHFLAG@,,;t t
|
||||||
s,@LIBARG@,%s.lib,;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
|
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue