diff -r 208d6d14c2a3 Makefile.pre.in --- a/Makefile.pre.in Thu Aug 13 21:52:56 2015 -0700 +++ b/Makefile.pre.in Mon Aug 24 11:04:32 2015 +0300 @@ -204,8 +204,7 @@ TCLTK_LIBS= @TCLTK_LIBS@ # The task to run while instrument when building the profile-opt target -PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck -#PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py +PROFILE_TASK= $(srcdir)/Lib/test/regrtest.py # === Definitions added by makesetup === @@ -424,6 +423,7 @@ profile-opt: @echo "Building with support for profile generation:" $(MAKE) clean + $(MAKE) profile-removal $(MAKE) build_all_generate_profile @echo "Running benchmark to generate profile data:" $(MAKE) profile-removal @@ -431,16 +431,17 @@ @echo "Rebuilding with profile guided optimizations:" $(MAKE) clean $(MAKE) build_all_use_profile + $(MAKE) profile-removal build_all_generate_profile: $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov" run_profile_task: : # FIXME: can't run for a cross build - ./$(BUILDPYTHON) $(PROFILE_TASK) + ./$(BUILDPYTHON) $(PROFILE_TASK) || true build_all_use_profile: - $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use" + $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use -fprofile-correction" coverage: @echo "Building with support for coverage checking:"