Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8becd82

Browse files
committed
Check for ignored thread compiler options to reduce compiler noise.
1 parent8a54a51 commit8becd82

File tree

2 files changed

+42
-14
lines changed

2 files changed

+42
-14
lines changed

‎config/acx_pthread.m4

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,31 @@ for flag in $acx_pthread_flags; do
129129
pthread_create(0,0,0,0); pthread_cleanup_pop(0);],
130130
[acx_pthread_ok=yes],[acx_pthread_ok=no])
131131
132+
if test "x$acx_pthread_ok" = xyes; then
133+
# Don't use options that are ignored by the compiler.
134+
# We find them by checking stderror.
135+
cat >conftest.$ac_ext <<_ACEOF
136+
int
137+
main ()
138+
{
139+
return 0;
140+
}
141+
_ACEOF
142+
rm -f conftest.$ac_objext conftest$ac_exeext
143+
if test "`(eval $ac_link 2>&1 >/dev/null)`" = ""; then
144+
# we continue with more flags because Linux needs -lpthread
145+
# for libpq builds on PostgreSQL. The test above only
146+
# tests for building binaries, not shared libraries.
147+
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
148+
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
149+
else acx_pthread_ok=no
150+
fi
151+
fi
152+
132153
LIBS="$save_LIBS"
133154
CFLAGS="$save_CFLAGS"
134155
135156
AC_MSG_RESULT($acx_pthread_ok)
136-
if test "x$acx_pthread_ok" = xyes; then
137-
# we continue with more flags because Linux needs -lpthread
138-
# for libpq builds on PostgreSQL. The test above only
139-
# tests for building binaries, not shared libraries.
140-
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
141-
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
142-
fi
143157
done
144158
fi
145159

‎configure

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13325,18 +13325,32 @@ acx_pthread_ok=no
1332513325
fi
1332613326
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
1332713327

13328+
if test "x$acx_pthread_ok" = xyes; then
13329+
# Don't use options that are ignored by the compiler.
13330+
# We find them by checking stderror.
13331+
cat >conftest.$ac_ext <<_ACEOF
13332+
int
13333+
main ()
13334+
{
13335+
return 0;
13336+
}
13337+
_ACEOF
13338+
rm -f conftest.$ac_objext conftest$ac_exeext
13339+
if test "`(eval $ac_link 2>&1 >/dev/null)`" = ""; then
13340+
# we continue with more flags because Linux needs -lpthread
13341+
# for libpq builds on PostgreSQL. The test above only
13342+
# tests for building binaries, not shared libraries.
13343+
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
13344+
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
13345+
else acx_pthread_ok=no
13346+
fi
13347+
fi
13348+
1332813349
LIBS="$save_LIBS"
1332913350
CFLAGS="$save_CFLAGS"
1333013351

1333113352
echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
1333213353
echo "${ECHO_T}$acx_pthread_ok" >&6
13333-
if test "x$acx_pthread_ok" = xyes; then
13334-
# we continue with more flags because Linux needs -lpthread
13335-
# for libpq builds on PostgreSQL. The test above only
13336-
# tests for building binaries, not shared libraries.
13337-
PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
13338-
PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
13339-
fi
1334013354
done
1334113355
fi
1334213356

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp