* Use AC_TRY_LINK instead of AC_TRY_cOMPILE to see if the compiler hints
for prefetch and branch prediction work. A non-happy compiler could just think these were functions and we wouldn't get the error, because we didn't try to link. Refs trac:287 This commit was SVN r11333. The following Trac tickets were found above: Ticket 287 --> https://svn.open-mpi.org/trac/ompi/ticket/287
Этот коммит содержится в:
родитель
4f984056ac
Коммит
53925dfd88
@ -202,7 +202,7 @@ AC_DEFUN([OMPI_SETUP_CC],[
|
||||
# see if the C compiler supports __builtin_expect
|
||||
AC_CACHE_CHECK([if $CC supports __builtin_expect],
|
||||
[ompi_cv_cc_supports___builtin_expect],
|
||||
[AC_TRY_COMPILE([],
|
||||
[AC_TRY_LINK([],
|
||||
[void *ptr = (void*) 0;
|
||||
if (__builtin_expect (ptr != (void*) 0, 1)) return 0;],
|
||||
[ompi_cv_cc_supports___builtin_expect="yes"],
|
||||
@ -218,7 +218,7 @@ AC_DEFUN([OMPI_SETUP_CC],[
|
||||
# see if the C compiler supports __builtin_prefetch
|
||||
AC_CACHE_CHECK([if $CC supports __builtin_prefetch],
|
||||
[ompi_cv_cc_supports___builtin_prefetch],
|
||||
[AC_TRY_COMPILE([],
|
||||
[AC_TRY_LINK([],
|
||||
[int ptr;
|
||||
__builtin_prefetch(&ptr,0,0);],
|
||||
[ompi_cv_cc_supports___builtin_prefetch="yes"],
|
||||
|
@ -137,7 +137,7 @@ AC_DEFUN([OMPI_SETUP_CXX],[
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CACHE_CHECK([if $CXX supports __builtin_expect],
|
||||
[ompi_cv_cxx_supports___builtin_expect],
|
||||
[AC_TRY_COMPILE([],
|
||||
[AC_TRY_LINK([],
|
||||
[void *ptr = (void*) 0;
|
||||
if (__builtin_expect (ptr != (void*) 0, 1)) return 0;],
|
||||
[ompi_cv_cxx_supports___builtin_expect="yes"],
|
||||
@ -155,7 +155,7 @@ AC_DEFUN([OMPI_SETUP_CXX],[
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CACHE_CHECK([if $CXX supports __builtin_prefetch],
|
||||
[ompi_cv_cxx_supports___builtin_prefetch],
|
||||
[AC_TRY_COMPILE([],
|
||||
[AC_TRY_LINK([],
|
||||
[int ptr;
|
||||
__builtin_prefetch(&ptr,0,0);],
|
||||
[ompi_cv_cxx_supports___builtin_prefetch="yes"],
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user