Skip to content

Commit 0fdc88d

Browse files
committed
bpo-41916: allow cross-compiled python to have -pthread set for CXX
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.
1 parent 586b24d commit 0fdc88d

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Allow override of ac_cv_cxx_thread so that cross compiled python can set
2+
-pthread for CXX.

configure

Lines changed: 9 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2322,11 +2322,11 @@ fi
23222322

23232323
# If we have set a CC compiler flag for thread support then
23242324
# check if it works for CXX, too.
2325-
ac_cv_cxx_thread=no
23262325
if test ! -z "$CXX"
23272326
then
23282327
AC_MSG_CHECKING(whether $CXX also accepts flags for thread support)
2329-
ac_save_cxx="$CXX"
2328+
AC_CACHE_VAL(ac_cv_cxx_thread,
2329+
[ac_save_cxx="$CXX"
23302330
23312331
if test "$ac_cv_kpthread" = "yes"
23322332
then
@@ -2355,9 +2355,11 @@ then
23552355
fi
23562356
rm -fr conftest*
23572357
fi
2358+
CXX="$ac_save_cxx"])
23582359
AC_MSG_RESULT($ac_cv_cxx_thread)
2360+
else
2361+
ac_cv_cxx_thread=no
23592362
fi
2360-
CXX="$ac_save_cxx"
23612363

23622364
dnl # check for ANSI or K&R ("traditional") preprocessor
23632365
dnl AC_MSG_CHECKING(for C preprocessor type)

0 commit comments

Comments
 (0)