From 5e250b695113c87e2183bb3b03160ae02fd748d1 Mon Sep 17 00:00:00 2001 From: Jyun-Yan You Date: Thu, 26 Jan 2012 17:13:57 +0800 Subject: [PATCH] change the order of llvm include path --- Makefile.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index e7d5650a881..149f4122231 100644 --- a/Makefile.in +++ b/Makefile.in @@ -212,7 +212,9 @@ LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir) LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir) LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS)) LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags) -LLVM_CXXFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --cxxflags) +# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM), +# so we replace -I with -iquote to ensure that it searches bundled LLVM first. +LLVM_CXXFLAGS_$(1)=$$(subst -I, -iquote , $$(shell "$$(LLVM_CONFIG_$(1))" --cxxflags)) LLVM_HOST_TRIPLE_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --host-target) LLVM_AS_$(1)=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-as$$(X)