mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
configure.in: fix static-linked-ext
* configure.in (--with-static-linked-ext): fix for extensions to be linked statically. * Makefile.in, common.mk: use ENCSTATIC for enc directory. * ext/extmk.rb: supply dependencies of statically linked extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e0515646b9
commit
c2b0992156
6 changed files with 26 additions and 7 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Thu Jul 3 12:40:22 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* configure.in (--with-static-linked-ext): fix for extensions to
|
||||||
|
be linked statically.
|
||||||
|
|
||||||
|
* Makefile.in, common.mk: use ENCSTATIC for enc directory.
|
||||||
|
|
||||||
|
* ext/extmk.rb: supply dependencies of statically linked extension
|
||||||
|
libraries.
|
||||||
|
|
||||||
Wed Jul 2 15:45:49 2014 Koichi Sasada <ko1@atdot.net>
|
Wed Jul 2 15:45:49 2014 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* gc.c (gc_heap_lazy_sweep): simplify logic.
|
* gc.c (gc_heap_lazy_sweep): simplify logic.
|
||||||
|
|
|
@ -137,6 +137,7 @@ PREP = @PREP@
|
||||||
ARCHFILE = @ARCHFILE@
|
ARCHFILE = @ARCHFILE@
|
||||||
SETUP =
|
SETUP =
|
||||||
EXTSTATIC = @EXTSTATIC@
|
EXTSTATIC = @EXTSTATIC@
|
||||||
|
ENCSTATIC = @ENCSTATIC@
|
||||||
SET_LC_MESSAGES = env LC_MESSAGES=C
|
SET_LC_MESSAGES = env LC_MESSAGES=C
|
||||||
|
|
||||||
MAKEDIRS = @MKDIR_P@
|
MAKEDIRS = @MKDIR_P@
|
||||||
|
|
|
@ -144,7 +144,7 @@ COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb
|
||||||
|
|
||||||
all: showflags main docs
|
all: showflags main docs
|
||||||
|
|
||||||
main: showflags $(EXTSTATIC:static=lib)encs exts
|
main: showflags $(ENCSTATIC:static=lib)encs exts
|
||||||
@$(NULLCMD)
|
@$(NULLCMD)
|
||||||
|
|
||||||
.PHONY: showflags
|
.PHONY: showflags
|
||||||
|
@ -178,7 +178,7 @@ $(EXTS_MK): $(MKFILES) all-incs $(PREP) $(RBCONFIG) $(LIBRUBY)
|
||||||
configure-ext: $(EXTS_MK)
|
configure-ext: $(EXTS_MK)
|
||||||
|
|
||||||
build-ext: $(EXTS_MK)
|
build-ext: $(EXTS_MK)
|
||||||
$(Q)$(MAKE) -f $(EXTS_MK) $(MFLAGS) $(EXTSTATIC) LIBRUBY_EXTS=$(LIBRUBY_EXTS) ENCOBJS="$(ENCOBJS)"
|
$(Q)$(MAKE) -f $(EXTS_MK) $(MFLAGS) libdir="$(libdir)" LIBRUBY_EXTS=$(LIBRUBY_EXTS) ENCOBJS="$(ENCOBJS)"
|
||||||
|
|
||||||
prog: program wprogram
|
prog: program wprogram
|
||||||
|
|
||||||
|
@ -567,7 +567,7 @@ libtrans trans: {$(VPATH)}transdb.h
|
||||||
$(ENC_MK): $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \
|
$(ENC_MK): $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \
|
||||||
$(srcdir)/enc/encinit.c.erb $(srcdir)/lib/mkmf.rb $(RBCONFIG)
|
$(srcdir)/enc/encinit.c.erb $(srcdir)/lib/mkmf.rb $(RBCONFIG)
|
||||||
$(ECHO) generating $@
|
$(ECHO) generating $@
|
||||||
$(Q) $(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" --module$(EXTSTATIC) $@ $(ENCS)
|
$(Q) $(MINIRUBY) $(srcdir)/enc/make_encmake.rb --builtin-encs="$(BUILTIN_ENCOBJS)" --builtin-transes="$(BUILTIN_TRANSOBJS)" --module$(ENCSTATIC) $@ $(ENCS)
|
||||||
|
|
||||||
.PRECIOUS: $(MKFILES)
|
.PRECIOUS: $(MKFILES)
|
||||||
|
|
||||||
|
|
|
@ -3179,12 +3179,13 @@ EXTSTATIC=
|
||||||
AC_SUBST(EXTSTATIC)dnl
|
AC_SUBST(EXTSTATIC)dnl
|
||||||
AC_ARG_WITH(static-linked-ext,
|
AC_ARG_WITH(static-linked-ext,
|
||||||
AS_HELP_STRING([--with-static-linked-ext], [link external modules statically]),
|
AS_HELP_STRING([--with-static-linked-ext], [link external modules statically]),
|
||||||
[AS_CASE([$withval],[yes],[STATIC=;EXTSTATIC=static])])
|
[AS_CASE([$withval],[yes],[STATIC=;EXTSTATIC=static],[no],[],[EXTSTATIC="$withval"])])
|
||||||
if test x"$EXTSTATIC" = xstatic; then
|
AS_CASE([",$EXTSTATIC,"], [,static,|*,enc,*], [
|
||||||
ENCOBJS='enc/encinit.$(OBJEXT) enc/libenc.$(LIBEXT) enc/libtrans.$(LIBEXT)'
|
ENCOBJS='enc/encinit.$(OBJEXT) enc/libenc.$(LIBEXT) enc/libtrans.$(LIBEXT)'
|
||||||
EXTOBJS='ext/extinit.$(OBJEXT)'
|
EXTOBJS='ext/extinit.$(OBJEXT)'
|
||||||
AC_DEFINE_UNQUOTED(EXTSTATIC, 1)
|
AC_DEFINE_UNQUOTED(EXTSTATIC, 1)
|
||||||
fi
|
AC_SUBST(ENCSTATIC, static)
|
||||||
|
])
|
||||||
AC_SUBST(ENCOBJS)
|
AC_SUBST(ENCOBJS)
|
||||||
AC_SUBST(EXTOBJS)
|
AC_SUBST(EXTOBJS)
|
||||||
|
|
||||||
|
|
|
@ -716,7 +716,11 @@ if $configure_only and $command_output
|
||||||
mf.puts
|
mf.puts
|
||||||
mf.puts "#{rubies.join(' ')}: $(extensions:/.=/#{$force_static ? 'static' : 'all'})"
|
mf.puts "#{rubies.join(' ')}: $(extensions:/.=/#{$force_static ? 'static' : 'all'})"
|
||||||
submake = "$(Q)$(MAKE) $(MFLAGS) $(SUBMAKEOPTS)"
|
submake = "$(Q)$(MAKE) $(MFLAGS) $(SUBMAKEOPTS)"
|
||||||
mf.puts "all static:\n\t#{submake} #{rubies.join(' ')}\n"
|
mf.puts "all static: $(EXTOBJS)\n\t#{submake} #{rubies.join(' ')}\n"
|
||||||
|
$extobjs.each do |tgt|
|
||||||
|
mf.puts "#{tgt}: #{File.dirname(tgt)}/static"
|
||||||
|
end
|
||||||
|
mf.puts "#{rubies.join(' ')}: $(EXTOBJS)"
|
||||||
rubies.each do |tgt|
|
rubies.each do |tgt|
|
||||||
mf.puts "#{tgt}:\n\t#{submake} $@"
|
mf.puts "#{tgt}:\n\t#{submake} $@"
|
||||||
end
|
end
|
||||||
|
|
|
@ -360,6 +360,9 @@ COMMON_HEADERS = winsock2.h ws2tcpip.h windows.h
|
||||||
!if "$(EXTSTATIC)" == "static"
|
!if "$(EXTSTATIC)" == "static"
|
||||||
ENCOBJS = enc/encinit.$(OBJEXT) enc/libenc.lib enc/libtrans.lib
|
ENCOBJS = enc/encinit.$(OBJEXT) enc/libenc.lib enc/libtrans.lib
|
||||||
EXTOBJS = ext/extinit.$(OBJEXT)
|
EXTOBJS = ext/extinit.$(OBJEXT)
|
||||||
|
! if !defined(ENCSTATIC)
|
||||||
|
ENCSTATIC = static
|
||||||
|
! endif
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
arch_hdrdir = $(EXTOUT)/include/$(arch)
|
arch_hdrdir = $(EXTOUT)/include/$(arch)
|
||||||
|
|
Loading…
Add table
Reference in a new issue