diff options
Diffstat (limited to 'build_posix/configure.ac.in')
-rw-r--r-- | build_posix/configure.ac.in | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/build_posix/configure.ac.in b/build_posix/configure.ac.in index 875c8b436a8..9251873be73 100644 --- a/build_posix/configure.ac.in +++ b/build_posix/configure.ac.in @@ -32,6 +32,23 @@ AC_SUBST([LIBTOOL_DEPS]) AC_PROG_CC(cc gcc) AC_PROG_CXX(c++ g++) +AM_PROG_AS(as gas) + +# This is a workaround as part of WT-2459. Currently, clang (v3.7) does not +# support compiling the ASM code we have to perform the CRC checks on PowerPC. +# To compile with clang we need to override the ASM compiler with CCAS to use +# gcc. Unfortunately, doing the compilation in this manner means libtool can't +# determine what tag to use for that one .S file. If we catch that we are using +# two different compilers for CC and CCAS and we are on a PowerPC system we +# overload the libtool flags to provide CC by default. +if test "$CC" != "$CCAS"; then + AS_CASE([$host_cpu], + [ppc64*], [AM_LIBTOOLFLAGS+="--tag=CC"], + [elf64lppc], [AM_LIBTOOLFLAGS+="--tag=CC"], + [powerpc*], [AM_LIBTOOLFLAGS+="--tag=CC"], + []) +fi +AC_SUBST(AM_LIBTOOLFLAGS) if test "$GCC" = "yes"; then # The Solaris gcc compiler gets the additional -pthreads flag. @@ -96,6 +113,13 @@ AC_SYS_LARGEFILE AC_C_BIGENDIAN +AC_MSG_CHECKING([for a 64-bit build]) +AC_COMPUTE_INT(ac_cv_sizeof_void_p, [sizeof(void *)]) +if test "$ac_cv_sizeof_void_p" != "8" ; then + AC_MSG_ERROR([WiredTiger requires a 64-bit build.]) +fi +AC_MSG_RESULT(yes) + # Linux requires _GNU_SOURCE to be defined case "$host_os" in linux*) AM_CFLAGS="$AM_CFLAGS -D_GNU_SOURCE" ;; |