summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-10-22 16:18:35 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-22 16:25:41 +0200
commit9cabab002b1180650236f3d1f5fd32dfdd4bf79a (patch)
tree70af93021bfb93130e8a252df61ae0d2bfb426b8
parentd72f3d53e05223a97efed6103fbcbfca5244c246 (diff)
CLANGPLUGIN_CPPFLAGS for building plugin for Clang in nonstandard location
(i.e., configure with CLANGPLUGIN_CPPFLAGS=-I.../clang-installation/include -I.../clang-build/tools/clang/include) Change-Id: Ic6d2973629103f71c32f44ebba2ac70d137d18e7
-rw-r--r--compilerplugins/Makefile-clang.mk2
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac3
3 files changed, 4 insertions, 2 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 818015fec19c..9b24df07ab6b 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -56,7 +56,7 @@ CLANGOBJS=
define clangbuildsrc
$(3): $(2) $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp
@echo [build CXX] $(subst $(SRCDIR)/,,$(2))
- $(CXX) $(CLANGCXXFLAGS) $(CLANGDEFS) $(CLANGINCLUDES) -DSRCDIR=$(SRCDIR) $(2) -fPIC -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
+ $(CXX) $(CLANGPLUGIN_CPPFLAGS) $(CLANGCXXFLAGS) $(CLANGDEFS) $(CLANGINCLUDES) -DSRCDIR=$(SRCDIR) $(2) -fPIC -c -o $(3) -MMD -MT $(3) -MP -MF $(CLANGOUTDIR)/$(1).d
-include $(CLANGOUTDIR)/$(1).d
diff --git a/config_host.mk.in b/config_host.mk.in
index 91acee5680b6..e867c5757978 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -59,6 +59,7 @@ ifneq ($(strip @CFLAGS@),)
export CFLAGS=@CFLAGS@
endif
export CHECK_PARALLELISM=@CHECK_PARALLELISM@
+export CLANGPLUGIN_CPPFLAGS=@CLANGPLUGIN_CPPFLAGS@
export CLASSPATH=@CLASSPATH@
export CLUCENE_CFLAGS=@CLUCENE_CFLAGS@
export CLUCENE_LIBS=@CLUCENE_LIBS@
diff --git a/configure.ac b/configure.ac
index c493a743f0d8..7b39f3ee7881 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5102,7 +5102,7 @@ if test "$COM_GCC_IS_CLANG" = "TRUE"; then
if test "$compiler_plugins" != "no"; then
AC_LANG_PUSH([C++])
save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
+ CPPFLAGS="$CPPFLAGS $CLANGPLUGIN_CPPFLAGS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS"
AC_CHECK_HEADER(clang/AST/RecursiveASTVisitor.h,
[COMPILER_PLUGINS=TRUE],
[
@@ -5122,6 +5122,7 @@ else
fi
fi
AC_SUBST(COMPILER_PLUGINS)
+AC_SUBST(CLANGPLUGIN_CPPFLAGS)
dnl ===================================================================
dnl Set the MinGW sys-root