File tree 4 files changed +27
-0
lines changed
4 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,14 @@ Optimizations
256
256
It is about 36% faster now. (Contributed by Pablo Galindo and Yury Selivanov
257
257
in :issue: `42093 `.)
258
258
259
+ * When building Python with ``--enable-optimizations `` now
260
+ `-fno-semantic-interposition ` is added to both the compile and link line.
261
+ This speeds builds of the Python interpreter created with ``--enable-shared ``
262
+ with ``gcc `` by up to 30%. See `this article
263
+ <https://developers.redhat.com/blog/2020/06/25/red-hat-enterprise-linux-8-2-brings-faster-python-3-8-run-speeds/> `_
264
+ for more details. (Contributed by Victor Stinner and Pablo Galindo in
265
+ :issue: `38980 `)
266
+
259
267
Deprecated
260
268
==========
261
269
Original file line number Diff line number Diff line change
1
+ Add ``-fno-semantic-interposition `` to both the compile and link line when
2
+ building with ``--enable-optimizations ``. Patch by Victor Stinner and Pablo
3
+ Galindo.
Original file line number Diff line number Diff line change @@ -6482,6 +6482,14 @@ if test "$Py_OPT" = 'true' ; then
6482
6482
DEF_MAKE_ALL_RULE="profile-opt"
6483
6483
REQUIRE_PGO="yes"
6484
6484
DEF_MAKE_RULE="build_all"
6485
+ case $CC in
6486
+ *gcc*)
6487
+ CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
6488
+ LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
6489
+ ;;
6490
+ esac
6491
+
6492
+
6485
6493
else
6486
6494
DEF_MAKE_ALL_RULE="build_all"
6487
6495
REQUIRE_PGO="no"
Original file line number Diff line number Diff line change @@ -1318,6 +1318,14 @@ if test "$Py_OPT" = 'true' ; then
1318
1318
DEF_MAKE_ALL_RULE="profile-opt"
1319
1319
REQUIRE_PGO="yes"
1320
1320
DEF_MAKE_RULE="build_all"
1321
+ case $CC in
1322
+ *gcc*)
1323
+ CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"
1324
+ LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition"
1325
+ ;;
1326
+ esac
1327
+
1328
+
1321
1329
else
1322
1330
DEF_MAKE_ALL_RULE="build_all"
1323
1331
REQUIRE_PGO="no"
You can’t perform that action at this time.
0 commit comments