* [PATCH 1/8 v2] opensm/configure.in: check that compiler supports __builtin_expect()
@ 2012-09-11 15:24 Yevgeny Kliteynik
[not found] ` <504F57AE.20208-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Yevgeny Kliteynik @ 2012-09-11 15:24 UTC (permalink / raw)
To: alexne-VPRAkNaXOzVWk0Htik3J/w, Linux RDMA, Yevgeny Kliteynik
Signed-off-by: Yevgeny Kliteynik <kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
---
configure.in | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/configure.in b/configure.in
index e48c066..eb252ff 100644
--- a/configure.in
+++ b/configure.in
@@ -56,6 +56,17 @@ AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
+dnl See if we have __builtin_expect
+AC_MSG_CHECKING([if the compiler supports __builtin_expect])
+AC_TRY_COMPILE(, [ return __builtin_expect(1, 1) ? 1 : 0],
+ [ have_builtin_expect=yes
+ AC_MSG_RESULT([yes]) ],
+ [ have_builtin_expect=no
+ AC_MSG_RESULT([no]) ])
+if test "x_$have_builtin_expect" = "x_yes" ; then
+ AC_DEFINE([HAVE_BUILTIN_EXPECT], [1], [Define to 1 if the compiler supports __builtin_expect.])
+fi
+
dnl We use --version-script with ld if possible
AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
--
1.7.11.1
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/8 v2] opensm/configure.in: check that compiler supports __builtin_expect()
[not found] ` <504F57AE.20208-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
@ 2012-09-16 10:10 ` Alex Netes
0 siblings, 0 replies; 2+ messages in thread
From: Alex Netes @ 2012-09-16 10:10 UTC (permalink / raw)
To: kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb; +Cc: Linux RDMA
Hi Yevgeny,
On 18:24 Tue 11 Sep , Yevgeny Kliteynik wrote:
>
> Signed-off-by: Yevgeny Kliteynik <kliteyn-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
> ---
Applied all the patches. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-16 10:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-11 15:24 [PATCH 1/8 v2] opensm/configure.in: check that compiler supports __builtin_expect() Yevgeny Kliteynik
[not found] ` <504F57AE.20208-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
2012-09-16 10:10 ` Alex Netes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).