summaryrefslogtreecommitdiffstats
path: root/lang/python/python3/patches/009-don-t-run-profile-task-during-cross-build.patch
blob: 907839bf9a90ef8b2b8aff3a4def8ccaf25dee29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -746,6 +746,7 @@ profile-gen-stamp: profile-clean-stamp
 
 # Run task with profile generation build to create profile information.
 profile-run-stamp:
+ifneq ($(PROFILE_TASK),)
 	@echo "Running code to generate profile data (this can take a while):"
 	# First, we need to create a clean build with profile generation
 	# enabled.
@@ -759,6 +760,7 @@ profile-run-stamp:
 	# This is an expensive target to build and it does not have proper
 	# makefile dependency information.  So, we create a "stamp" file
 	# to record its completion and avoid re-running it.
+endif
 	touch $@
 
 # Compile Python binary with profile guided optimization.
--- a/configure.ac
+++ b/configure.ac
@@ -1905,7 +1905,7 @@ fi
 
 AC_ARG_VAR([PROFILE_TASK], [Python args for PGO generation task])
 AC_MSG_CHECKING([PROFILE_TASK])
-if test -z "$PROFILE_TASK"
+if test -z "$PROFILE_TASK" -a "x$cross_compiling" = xno
 then
 	PROFILE_TASK='-m test --pgo --timeout=$(TESTTIMEOUT)'
 fi