forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpo-28015: Support LTO build with clang (pythonGH-9908)
.o generated by clang in LTO mode actually are LLVM bitcode files, which leads to a few errors during configure/build step: - add lto flags to the BASECFLAGS instead of CFLAGS, as CFLAGS are used to build autoconf test case, and some are not compatible with clang LTO (they assume binary in the .o, not bitcode) - force llvm-ar instead of ar, as ar is not aware of .o files generated by clang -flto
- Loading branch information
1 parent
890423f
commit 5ad36f9
Showing
4 changed files
with
235 additions
and
83 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
Misc/NEWS.d/next/Build/2018-10-16-12-22-36.bpo-28015.ylSgFh.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Have --with-lto works correctly with clang. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
|
||
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) | ||
dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- | ||
dnl serial 11 (pkg-config-0.29.1) | ||
dnl serial 11 (pkg-config-0.29) | ||
dnl | ||
dnl Copyright © 2004 Scott James Remnant <[email protected]>. | ||
dnl Copyright © 2012-2015 Dan Nicholson <[email protected]> | ||
|
@@ -55,7 +55,7 @@ dnl | |
dnl See the "Since" comment for each macro you use to see what version | ||
dnl of the macros you require. | ||
m4_defun([PKG_PREREQ], | ||
[m4_define([PKG_MACROS_VERSION], [0.29.1]) | ||
[m4_define([PKG_MACROS_VERSION], [0.29]) | ||
m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, | ||
[m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) | ||
])dnl PKG_PREREQ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters