]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-35499: make profile-opt don't override CFLAGS_NODIST (GH-11164) (GH-11179) 11181/head
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 16 Dec 2018 22:24:04 +0000 (14:24 -0800)
committerVictor Stinner <vstinner@redhat.com>
Sun, 16 Dec 2018 22:24:04 +0000 (23:24 +0100)
"make profile-opt" no longer replaces CFLAGS_NODIST with CFLAGS. It
now adds profile-guided optimization (PGO) flags to CFLAGS_NODIST,
existing CFLAGS_NODIST flags are kept.
(cherry picked from commit 640ed520dd6a43a8bf470b79542f58b5d57af9de)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Makefile.pre.in
Misc/NEWS.d/next/Build/2018-12-14-19-36-05.bpo-35499.9yAldM.rst [new file with mode: 0644]

index 7d9cbd5c8bf3f5045c6f46860954a3a6a83a134e..4ec2d3511fc4c1080af6afe3931acbeb70e52b6f 100644 (file)
@@ -497,7 +497,7 @@ profile-run-stamp:
        touch $@
 
 build_all_generate_profile:
-       $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
+       $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_GEN_FLAG)" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG)" LIBS="$(LIBS)"
 
 run_profile_task:
        @ # FIXME: can't run for a cross build
@@ -511,7 +511,7 @@ build_all_merge_profile:
 profile-opt: profile-run-stamp
        @echo "Rebuilding with profile guided optimizations:"
        -rm -f profile-clean-stamp
-       $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG)" LDFLAGS="$(LDFLAGS)"
+       $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS_NODIST) $(PGO_PROF_USE_FLAG)" LDFLAGS="$(LDFLAGS)"
 
 # Compile and run with gcov
 .PHONY=coverage coverage-lcov coverage-report
diff --git a/Misc/NEWS.d/next/Build/2018-12-14-19-36-05.bpo-35499.9yAldM.rst b/Misc/NEWS.d/next/Build/2018-12-14-19-36-05.bpo-35499.9yAldM.rst
new file mode 100644 (file)
index 0000000..ed730b9
--- /dev/null
@@ -0,0 +1,3 @@
+``make profile-opt`` no longer replaces ``CFLAGS_NODIST`` with ``CFLAGS``. It
+now adds profile-guided optimization (PGO) flags to ``CFLAGS_NODIST``: existing
+``CFLAGS_NODIST`` flags are kept.