diff options
author | Dustin Spicuzza <dustin@virtualroadside.com> | 2023-01-05 22:57:31 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 22:57:31 (GMT) |
commit | cc8748712e78805c5be4a0a3f98cfb5c35026d0e (patch) | |
tree | 249b050fac6835c78a2db72216a80bc90be9a15a /configure.ac | |
parent | 1ae619c911ec8e096f83eeb7cc57fcd966950a3d (diff) | |
download | cpython-cc8748712e78805c5be4a0a3f98cfb5c35026d0e.zip cpython-cc8748712e78805c5be4a0a3f98cfb5c35026d0e.tar.gz cpython-cc8748712e78805c5be4a0a3f98cfb5c35026d0e.tar.bz2 |
gh-86082: bpo-41916: allow cross-compiled python to have -pthread set for CXX (#22525)
When cross-compiling, the compile/run test for -pthread always fails so -pthread
will never be automatically set without an override from the cache. ac_cv_pthread
can already be overridden, so do the same thing for ac_cv_cxx_thread.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 2202897..0ed5a24 100644 --- a/configure.ac +++ b/configure.ac @@ -2653,11 +2653,10 @@ fi # If we have set a CC compiler flag for thread support then # check if it works for CXX, too. -ac_cv_cxx_thread=no if test ! -z "$CXX" then -AC_MSG_CHECKING(whether $CXX also accepts flags for thread support) -ac_save_cxx="$CXX" +AC_CACHE_CHECK([whether $CXX also accepts flags for thread support], [ac_cv_cxx_thread], +[ac_save_cxx="$CXX" if test "$ac_cv_kpthread" = "yes" then @@ -2671,6 +2670,8 @@ elif test "$ac_cv_pthread" = "yes" then CXX="$CXX -pthread" ac_cv_cxx_thread=yes +else + ac_cv_cxx_thread=no fi if test $ac_cv_cxx_thread = yes @@ -2686,9 +2687,10 @@ then fi rm -fr conftest* fi -AC_MSG_RESULT($ac_cv_cxx_thread) +CXX="$ac_save_cxx"]) +else + ac_cv_cxx_thread=no fi -CXX="$ac_save_cxx" dnl # check for ANSI or K&R ("traditional") preprocessor dnl AC_MSG_CHECKING(for C preprocessor type) |