From 3696f31bc6104c7706a41ee975d81795863f108a Mon Sep 17 00:00:00 2001 From: Jan Palus Date: Tue, 29 Jun 2021 15:42:04 +0000 Subject: [PATCH] build with -fno-semantic-interposition proposed by fedora where it's used by default and brings significant performance boost for dynamically linked python. to become upstream default in python 3.10. see https://bugs.python.org/issue38980 --- python3.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python3.spec b/python3.spec index 6bc2716..54f2012 100644 --- a/python3.spec +++ b/python3.spec @@ -7,6 +7,7 @@ %bcond_without tests # disables Python testing %bcond_with verbose_tests # runs tests in verbose mode %bcond_without optimizations # expensive, stable optimizations (PGO etc.) + LTO +%bcond_with semantic_interposition # build without \-fno-semantic-interposition # # tests which will not work on 64-bit platforms %define no64bit_tests -x test_audioop -x test_rgbimg -x test_imageop @@ -548,8 +549,10 @@ fi %configure \ CC="%{__cc}" \ OPT="%{rpmcflags}" \ + CFLAGS_NODIST="%{!?with_semantic_interposition: -fno-semantic-interposition}" \ CPPFLAGS="%{rpmcppflags}" \ LDFLAGS="%{rpmldflags}" \ + LDFLAGS_NODIST="%{!?with_semantic_interposition: -fno-semantic-interposition}" \ ac_cv_posix_semaphores_enabled=yes \ ac_cv_broken_sem_getvalue=no \ --enable-ipv6 \ -- 2.44.0