summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-01-09 21:20:44 +0100
committerMichael Stahl <mstahl@redhat.com>2014-01-10 00:21:51 +0100
commit3bdb781018c9a9a6778b1771a3e9346c2426e4f2 (patch)
tree89609c0e59f49a01187bbba41ed6a4d6b97a2395 /configure.ac
parent913bf64b0bf1330a5055c26770faedf2ad7fc3c5 (diff)
compilerplugins: strip out -m32/-m64 from CXX
These are not part of LO and need to be built with native bitness of the compiler. Change-Id: I41fdec130a63e0c0d07f1df228031014cd2351c2
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index fcf8fd1f684b..1b81ee1f70f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5628,6 +5628,10 @@ if test "$COM_GCC_IS_CLANG" = "TRUE"; then
fi
AC_LANG_PUSH([C++])
save_CPPFLAGS=$CPPFLAGS
+ save_CXX=$CXX
+ # compiler plugins must be built with "native" bitness of clang
+ # because they link against clang libraries
+ CXX=`echo $CXX | sed -e s/-m64// -e s/-m32//`
CPPFLAGS="$CPPFLAGS -I$CLANGDIR/include -I$CLANGDIR/tools/clang/include -I$CLANGBUILD/include -I$CLANGBUILD/tools/clang/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
[COMPILER_PLUGINS=TRUE],
@@ -5639,6 +5643,7 @@ if test "$COM_GCC_IS_CLANG" = "TRUE"; then
add_warning "Cannot find Clang headers to build compiler plugins, plugins disabled."
fi
])
+ CXX=$save_CXX
CPPFLAGS=$save_CPPFLAGS
AC_LANG_POP([C++])
fi