* common.mk (COMMONOBJS): include $(DTRACE_OBJ) which is necessary
  for $(DTRACE_DEPENDENT_OBJS).

* configure.in (RUBY_DTRACE_POSTPROCESS): separate whether dtrace
  is needed to genearate probes.o and whether it modifies input
  object files.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-01-30 11:45:29 +00:00
Родитель df445b470e
Коммит 1b11ba706d
3 изменённых файлов: 10 добавлений и 7 удалений

Просмотреть файл

@ -213,7 +213,7 @@ all:
miniruby$(EXEEXT):
@-if test -f $@; then $(MV) -f $@ $@.old; $(RM) $@.old; fi
$(ECHO) linking $@
$(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) $(DTRACE_OBJ) $(MAINLIBS) $(LIBS) $(OUTFLAG)$@
$(Q) $(PURIFY) $(CC) $(LDFLAGS) $(XLDFLAGS) $(NORMALMAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(INITOBJS) $(MAINLIBS) $(LIBS) $(OUTFLAG)$@
$(PROGRAM):
@$(RM) $@
@ -236,7 +236,7 @@ $(LIBRUBY_A):
$(LIBRUBY_SO):
@-$(PRE_LIBRUBY_UPDATE)
$(ECHO) linking shared-library $@
$(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(DTRACE_OBJ) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
$(Q) $(LDSHARED) $(DLDFLAGS) $(OBJS) $(DLDOBJS) $(SOLIBS) $(EXTSOLIBS) $(OUTFLAG)$@
-$(Q) $(OBJCOPY) -w -L '$(SYMBOL_PREFIX)Init_*' -L '$(SYMBOL_PREFIX)*_threadptr_*' $@
$(Q) $(POSTLINK)
@-$(MINIRUBY) -e 'ARGV.each{|link| File.delete link rescue nil; \

Просмотреть файл

@ -101,6 +101,7 @@ COMMONOBJS = array.$(OBJEXT) \
vm_trace.$(OBJEXT) \
thread.$(OBJEXT) \
cont.$(OBJEXT) \
$(DTRACE_OBJ) \
$(BUILTIN_ENCOBJS) \
$(BUILTIN_TRANSOBJS) \
$(MISSING)
@ -192,7 +193,7 @@ prog: program wprogram
$(PREP): $(MKFILES)
miniruby$(EXEEXT): config.status $(ALLOBJS) $(ARCHFILE) $(DTRACE_OBJ)
miniruby$(EXEEXT): config.status $(ALLOBJS) $(ARCHFILE)
objs: $(ALLOBJS)
@ -218,7 +219,7 @@ mini: PHONY miniruby$(EXEEXT)
$(PROGRAM) $(WPROGRAM): $(LIBRUBY) $(MAINOBJ) $(OBJS) $(EXTOBJS) $(SETUP) $(PREP)
$(LIBRUBY_A): $(OBJS) $(MAINOBJ) $(DTRACE_OBJ) $(DTRACE_GLOMMED_OBJ) $(INITOBJS) $(ARCHFILE)
$(LIBRUBY_A): $(LIBRUBY_A_OBJS) $(MAINOBJ) $(INITOBJS) $(ARCHFILE)
$(LIBRUBY_SO): $(OBJS) $(DLDOBJS) $(LIBRUBY_A) $(PREP) $(LIBRUBY_SO_UPDATE) $(BUILTIN_ENCOBJS)

Просмотреть файл

@ -644,10 +644,10 @@ _PROBES
_CONF
$CC $CFLAGS $CPPFLAGS -c -o conftest.o conftest.c &&
cp -p conftest.o conftest.oo &&
$DTRACE -G -s conftest_provider.d conftest.o 2>/dev/null &&
! cmp -b conftest.o conftest.oo
$DTRACE -G -s conftest_provider.d conftest.o 2>/dev/null
}; then
rb_cv_prog_dtrace_g=yes
cmp -b conftest.o conftest.oo || rb_cv_prog_dtrace_g=rebuild
else
rb_cv_prog_dtrace_g=no
fi
@ -3608,8 +3608,10 @@ if test "${enable_dtrace}" = "yes"; then
AC_MSG_ERROR([--enable-dtrace, however, USDT is not available])
fi
RUBY_DTRACE_POSTPROCESS()
if test "$rb_cv_prog_dtrace_g" = 'yes'; then
if test "$rb_cv_prog_dtrace_g" != 'no'; then
DTRACE_OBJ='probes.$(OBJEXT)'
fi
if test "$rb_cv_prog_dtrace_g" = 'rebuild'; then
DTRACE_GLOMMED_OBJ='ruby-glommed.$(OBJEXT)'
LIBRUBY_A_OBJS='$(DTRACE_GLOMMED_OBJ)'
fi