Skip to content

Commit f005384

Browse files
committed
Better support for thread-support flag detection with clang
When testing the stderr produced by various thread-support flags, also run a compilation in addition to a link, because clang warns on certain flags when compiling but not when linking.
1 parent 66d6b4c commit f005384

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config/acx_pthread.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ main (int argc, char **argv)
142142
}
143143
_ACEOF
144144
rm -f conftest.$ac_objext conftest$ac_exeext
145-
if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
145+
# Check both linking and compiling, because they might tolerate different options.
146+
if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
146147
# we continue with more flags because Linux needs -lpthread
147148
# for libpq builds on PostgreSQL. The test above only
148149
# tests for building binaries, not shared libraries.

configure

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22814,7 +22814,8 @@ main (int argc, char **argv)
2281422814
}
2281522815
_ACEOF
2281622816
rm -f conftest.$ac_objext conftest$ac_exeext
22817-
if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
22817+
# Check both linking and compiling, because they might tolerate different options.
22818+
if test "`(eval $ac_link 2>&1 1>&5)`" = "" && test "`(eval $ac_compile 2>&1 1>&5)`" = ""; then
2281822819
# we continue with more flags because Linux needs -lpthread
2281922820
# for libpq builds on PostgreSQL. The test above only
2282022821
# tests for building binaries, not shared libraries.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy