-
-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_distutils fails when configured --with-lto #70974
Comments
When configured using './configure --with-lto' (added in bpo-25702) and doing a 'make profile-opt' build, test_distutils fails: ====================================================================== Traceback (most recent call last):
File "/home/greg/sandbox/python/cpython/3.5/Lib/distutils/tests/test_sysconfig.py", line 156, in test_sysconfig_compiler_vars
sysconfig.get_config_var('LDSHARED'))
AssertionError: 'gcc -pthread -shared -flto -fuse-linker-plugin -ffat-lto-obje[20 chars]none' != 'gcc -pthread -shared'
- gcc -pthread -shared -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none
+ gcc -pthread -shared ====================================================================== Traceback (most recent call last):
File "/home/greg/sandbox/python/cpython/3.5/Lib/distutils/tests/test_sysconfig.py", line 133, in test_sysconfig_module
sysconfig.get_config_var('LDFLAGS'))
AssertionError: '-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none' != ''
- -flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none
+ |
I will investigate this and submit a fix. At a first glance, it seems the test is failing because it does not have the knowledge of the LTO flags. |
Hello, You can find a patch for this issue attached. Basically, since LTO needs LD flags when used, I modified the makefile template file and the test to push the flags up to the sysconfig module. |
This patch is for CPython 3, and if it looks good I will post also the CPython 2 version. |
LGTM |
Would you send pull request on Github? |
Fixed in bpo-35257 |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: