summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-06-29 22:34:02 +0200
committerCaolán McNamara <caolanm@redhat.com>2016-06-30 08:22:43 +0000
commit02e751037b5ff301ba356793c10af9b4bfb5817e (patch)
tree518b772d652155ce54d22619c6d18f6afd7bd68d /compilerplugins
parent39f64074d34116d9aa647fa637d982b27fef8ae4 (diff)
compilerplugins: -isystem /usr/include breaks the build
... on Fedora 24, and it's a Bad Idea in general because it breaks "#include_next" ordering of GCC's and glibc's variously distributed headers. Change-Id: I0c8b51a6d7191ec9cc5187636ea2717e8fd97715 (cherry picked from commit 11f69994b0231a760231b712d9faf6806334232f) Reviewed-on: https://gerrit.libreoffice.org/26783 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/Makefile-clang.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 868b5b0c9568..cc2bdc7674c3 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -25,7 +25,8 @@ CLANGCXXFLAGS=-O2 -Wall -Wextra -Wundef -g
# Clang headers require these.
CLANGDEFS=-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti
# All include locations needed.
-CLANGINCLUDES=-isystem $(CLANGDIR)/include -isystem $(CLANGDIR)/tools/clang/include
+CLANGINCLUDES=$(if $(filter /usr,$(CLANGDIR)),,-isystem $(CLANGDIR)/include) \
+ -isystem $(CLANGDIR)/tools/clang/include
# Clang/LLVM libraries are intentionally not linked in, they are usually built as static libraries, which means the resulting
# plugin would be big (even though the clang binary already includes it all) and it'd be necessary to explicitly specify