Author: Antonio Cuni <anto.c...@gmail.com> Branch: vmprof Changeset: r74215:585cacafb196 Date: 2014-10-25 15:03 +0100 http://bitbucket.org/pypy/pypy/changeset/585cacafb196/
Log: (antocuni, arigo): add Makefile rules to process manually written .asmgcc.s files through trackgcroot; rename trampoline.s into trampoline.asmgcc.s diff --git a/pypy/module/_vmprof/interp_vmprof.py b/pypy/module/_vmprof/interp_vmprof.py --- a/pypy/module/_vmprof/interp_vmprof.py +++ b/pypy/module/_vmprof/interp_vmprof.py @@ -26,7 +26,7 @@ eci_kwds = dict( include_dirs = [SRC], includes = ['vmprof.h', 'trampoline.h'], - separate_module_files = [SRC.join('trampoline.s')], + separate_module_files = [SRC.join('trampoline.asmgcc.s')], libraries = ['unwind'], post_include_bits=[""" diff --git a/pypy/module/_vmprof/src/trampoline.s b/pypy/module/_vmprof/src/trampoline.asmgcc.s rename from pypy/module/_vmprof/src/trampoline.s rename to pypy/module/_vmprof/src/trampoline.asmgcc.s diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py --- a/rpython/translator/c/genc.py +++ b/rpython/translator/c/genc.py @@ -458,10 +458,11 @@ mk.definition('PYTHON', get_recent_cpython_executable()) - mk.definition('GCMAPFILES', '$(subst .c,.gcmap,$(SOURCES))') - mk.definition('OBJECTS1', '$(subst .c,.o,$(SOURCES))') + mk.definition('GCMAPFILES', '$(subst .asmgcc.s,.o,$(subst .c,.gcmap,$(SOURCES)))') + mk.definition('OBJECTS1', '$(subst .asmgcc.s,.o,$(subst .c,.o,$(SOURCES)))') mk.definition('OBJECTS', '$(OBJECTS1) gcmaptable.s') + # the rule that transforms %.c into %.o, by compiling it to # %.s, then applying trackgcroot to get %.lbl.s and %.gcmap, and # finally by using the assembler ($(CC) again for now) to get %.o @@ -474,6 +475,14 @@ 'mv $*.gctmp $*.gcmap', 'rm $*.s $*.lbl.s']) + # this is for manually written assembly files which needs to be parsed by asmgcc + mk.rule('%.o %.gcmap', '%.asmgcc.s', [ + '$(PYTHON) $(RPYDIR)/translator/c/gcc/trackgcroot.py ' + '-t $*.asmgcc.s > $*.gctmp', + '$(CC) -o $*.o -c $*.asmgcc.lbl.s', + 'mv $*.gctmp $*.gcmap', + 'rm $*.asmgcc.lbl.s']) + # the rule to compute gcmaptable.s mk.rule('gcmaptable.s', '$(GCMAPFILES)', [ _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit