-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
bpo-33473: Be slightly better about CFLAGS, LDFLAGS, and related #6771
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
configure.ac was fixed to correctly report CC, CFLAGS, and LDFLAGS |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1993,8 +1993,9 @@ then | |
AC_MSG_CHECKING(whether $CC accepts -pthread) | ||
AC_CACHE_VAL(ac_cv_pthread, | ||
[ac_save_cc="$CC" | ||
CC="$CC -pthread" | ||
AC_RUN_IFELSE([AC_LANG_SOURCE([[ | ||
CC="$CC" | ||
CFLAGS="-pthread" | ||
AC_LINK_IFELSE([AC_LANG_SOURCE([[ | ||
#include <stdio.h> | ||
#include <pthread.h> | ||
|
||
|
@@ -2030,7 +2031,8 @@ then | |
ac_cv_cxx_thread=yes | ||
elif test "$ac_cv_pthread" = "yes" | ||
then | ||
CXX="$CXX -pthread" | ||
CXX="$CXX" | ||
CXXFLAGS="-pthread" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this also stamps over whatever Also, it seems the cases above need this treatment? |
||
ac_cv_cxx_thread=yes | ||
fi | ||
|
||
|
@@ -2261,7 +2263,7 @@ then CC="$CC -Kpthread" | |
elif test "$ac_cv_kthread" = "yes" | ||
then CC="$CC -Kthread" | ||
elif test "$ac_cv_pthread" = "yes" | ||
then CC="$CC -pthread" | ||
then CC="$CC"; BASECFLAGS="$BASECFLAGS -pthread"; BASECXXFLAGS="$BASECXXFLAGS -pthread" | ||
fi | ||
|
||
AC_MSG_CHECKING(for pthread_t) | ||
|
@@ -2973,9 +2975,11 @@ then | |
posix_threads=yes | ||
elif test "$ac_cv_pthread" = "yes" | ||
then | ||
CC="$CC -pthread" | ||
CC="$CC" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this line seems rather otiose now |
||
BASECFLAGS="$BASECFLAGS -pthread" | ||
if test "$ac_cv_cxx_thread" = "yes"; then | ||
CXX="$CXX -pthread" | ||
CXX="$CXX" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ditto |
||
BASECXXFLAGS="$BASECFLAGS -pthread" | ||
fi | ||
posix_threads=yes | ||
else | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you're going to change it, you need to save and restore
CFLAGS
as is done forCC