aboutsummaryrefslogtreecommitdiff
path: root/examples/python2.7/patches/profiled-build.diff
diff options
context:
space:
mode:
Diffstat (limited to 'examples/python2.7/patches/profiled-build.diff')
-rw-r--r--examples/python2.7/patches/profiled-build.diff27
1 files changed, 27 insertions, 0 deletions
diff --git a/examples/python2.7/patches/profiled-build.diff b/examples/python2.7/patches/profiled-build.diff
new file mode 100644
index 0000000..0bca60a
--- /dev/null
+++ b/examples/python2.7/patches/profiled-build.diff
@@ -0,0 +1,27 @@
+# DP: Fix profiled build; don't use Python/thread.gc*, gcc complains
+
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -388,18 +388,18 @@
+ $(MAKE) build_all_use_profile
+
+ build_all_generate_profile:
+- $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
++ $(MAKE) all PY_CFLAGS="$(PY_CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
+
+ run_profile_task:
+- ./$(BUILDPYTHON) $(PROFILE_TASK)
++ -./$(BUILDPYTHON) $(PROFILE_TASK)
+
+ build_all_use_profile:
+- $(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
++ $(MAKE) all PY_CFLAGS="$(PY_CFLAGS) -fprofile-use -fprofile-correction"
+
+ coverage:
+ @echo "Building with support for coverage checking:"
+ $(MAKE) clean
+- $(MAKE) all CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"
++ $(MAKE) all PY_CFLAGS="$(PY_CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"
+
+
+ # Build the interpreter