1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

LIBRUBY_A with exts

* Makefile.in, win32/Makefile.sub (LIBRUBY_A): link with extension
  libraries if EXTSTATIC is set, so that static-ruby would work
  too.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2018-02-17 05:52:21 +00:00
parent e28a7c204d
commit a4f2606b2d
3 changed files with 11 additions and 2 deletions

View file

@ -248,6 +248,7 @@ PRE_LIBRUBY_UPDATE = [ -n "$(LIBRUBY_SO_UPDATE)" ] || $(exec) $(RM) $(LIBRUBY_EX
# supported.
$(LIBRUBY_A):
@$(RM) $@
@-[ -z "$(EXTSTATIC)" ] || $(PRE_LIBRUBY_UPDATE)
$(ECHO) linking static-library $@
$(Q) $(AR) $(ARFLAGS) $@ $(LIBRUBY_A_OBJS) $(INITOBJS)
@-$(RANLIB) $@ 2> /dev/null || true
@ -258,7 +259,7 @@ verify-static-library: $(LIBRUBY_A)
@$(RMALL) conftest$(EXEEXT) conftest.c conftest.dSYM
$(LIBRUBY_SO):
@-$(PRE_LIBRUBY_UPDATE)
@-[ -n "$(EXTSTATIC)" ] || $(PRE_LIBRUBY_UPDATE)
$(ECHO) linking shared-library $@
$(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
-$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)ruby_static_id_*' \
@ -268,6 +269,9 @@ $(LIBRUBY_SO):
File.symlink "$(LIBRUBY_SO)", link}' \
$(LIBRUBY_ALIASES) || true
LIBRUBY_WITH_EXT = @LIBRUBY_WITH_EXT@
$(LIBRUBY_$(LIBRUBY_WITH_EXT)): $(LIBRUBY_SO_UPDATE)
ruby_pc = @ruby_pc@
$(ruby_pc):
@./config.status --file=$@:$(srcdir)/template/ruby.pc.in

View file

@ -322,7 +322,7 @@ $(PROGRAM) $(WPROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP
$(LIBRUBY_A): $(LIBRUBY_A_OBJS) $(MAINOBJ) $(INITOBJS) $(ARCHFILE)
$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE) $(BUILTIN_ENCOBJS)
$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(BUILTIN_ENCOBJS)
$(LIBRUBY_EXTS):
@exit > $@

View file

@ -1064,6 +1064,9 @@ PRE_LIBRUBY_UPDATE =
!endif
$(LIBRUBY_A): $(OBJS) $(INITOBJS)
!if "$(EXTSTATIC)" != ""
@-$(PRE_LIBRUBY_UPDATE)
!endif
$(ECHO) linking static-library $(@:\=/)
$(Q) $(AR) $(ARFLAGS)$@ $(OBJS) $(INITOBJS)
@ -1073,7 +1076,9 @@ $(LIBRUBY): $(RUBYDEF)
$(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
@echo $(DLDOBJS)
!if "$(EXTSTATIC)" == ""
@-$(PRE_LIBRUBY_UPDATE)
!endif
$(ECHO) linking shared-library $(@:\=/)
$(Q) $(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
$(RUBY_SO_NAME).res $(SOLIBS) $(EXTSOLIBS) $(LIBS) -Fe$@ -link $(LDFLAGS) \