Description of problem: Since the upgrade to 3.7, we now export -flto as part of python3.7-config --cflags. This is changed since 3.6 and may bring troubles. See for example bz1593431. Version-Release number of selected component: python3-3.7.0-1.fc29, python37-3.7.0-1.fc28.x86_64 Steps to Reproduce: $ python3.7-config --cflags | grep -- -flto || echo nope Actual results: -I/usr/include/python3.7m -I/usr/include/python3.7m -Wno-unused-result -Wsign-compare -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv Expected results: nope Additional info: This is related to closed bz1217376. I think we should start getting a list of flags we don't want to export. Be it annobin, hardening, link time optimizations... If the list is not in redhat-rpm-config, we shall maintain our own.
Just to be clear, -flto comes from Python. It's not part of the recommended build flags for Fedora.
Right. It's because we invoke configure with --enable-optimizations. What's weird is that we did that with 3.6 as well.
Wasn't the flag exported with 3.6 as well?
Not on my Fedora 28.
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle. Changing version to '29'.
This is due to https://github.com/python/cpython/pull/3110/commits/84e153278217011fc0784d8a3487568823aa0682 I bisected it with: $ ./configure --prefix=$PWD/_install --with-lto && make -j4 && make install && ./_install/bin/python3-config --cflags | grep -- -flto || echo nope Note that python 3.6 is also affected now as the commit was backported by me to 3.6
python3-3.7.2-1.fc29 python3-docs-3.7.2-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-f9d5bbef82
python3-3.7.2-1.fc29, python3-docs-3.7.2-1.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.