summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2016-03-11 16:41:05 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-03-11 16:41:05 +1100
commitd1a59d8d5342fcaaa194a31a60ca6c4c9c55ba43 (patch)
tree42777b94aadf55c8f9cd66093e4dad105211fc48
parent3126b8768cff9801959166f4e104bcb5db72d57e (diff)
parentfcdc497ff3b96bcae41656ea42867571c193e418 (diff)
downloadmongo-d1a59d8d5342fcaaa194a31a60ca6c4c9c55ba43.tar.gz
Merge pull request #2561 from wiredtiger/wt-2459
WT-2459 - Force the CC tag under powerPC
-rw-r--r--build_posix/configure.ac.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/build_posix/configure.ac.in b/build_posix/configure.ac.in
index fc13ab2b183..3280a4e9af3 100644
--- a/build_posix/configure.ac.in
+++ b/build_posix/configure.ac.in
@@ -34,6 +34,22 @@ 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.
if test "`uname -s`" = "SunOS"; then