Fix for bug #17. Solaris provides stubs (who knows why, but they do) for
the pthreads library that don't do anything but are there when no special options are given. Both the GNU compiler and the Sun compiler could sometimes ignore the -K* options, causing badness when building with posix threads. Don't try those options ;). We still try -pthread and -pthreads because the compilers *do* error when they see those options and some versions of the GNU compiler do understand those flags (and do all the right things in that case). This commit was SVN r10126.
Этот коммит содержится в:
родитель
abc580b2d5
Коммит
0b09ba928c
@ -381,7 +381,15 @@ AC_DEFUN([OMPI_INTL_POSIX_THREADS_SPECIAL_FLAGS],[
|
||||
# Put -mt before -mthreads because HP-UX aCC will properly compile
|
||||
# with -mthreads (reading as -mt), but emit a warning about unknown
|
||||
# flags hreads. Stupid compilers.
|
||||
pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads"
|
||||
|
||||
case "${host_cpu}-${host_os}" in
|
||||
*solaris*)
|
||||
pflags="-pthread -pthreads -mt"
|
||||
;;
|
||||
*)
|
||||
pflags="-Kthread -kthread -pthread -pthreads -mt -mthreads"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Only run C++ and Fortran if those compilers already configured
|
||||
AC_PROVIDE_IFELSE([AC_PROG_CC],
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user