On 25/09/2019 23:16, Luc Van Oostenryck wrote: > On Fri, Apr 26, 2019 at 05:46:22PM +0100, Ramsay Jones wrote: >> On 26/04/2019 16:20, Randy Dunlap wrote: [snip] >> However, I should have made it clear that I meant to suggest >> that we should _replace_ the definition of LLVM_CFLAGS with >> that single call to llvm-config. So, I also tested the >> following on cygwin: >> >> $ git diff >> diff --git a/Makefile b/Makefile >> index f816a50..7e8c2ab 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -165,8 +165,7 @@ ifeq ($(shell expr "$(LLVM_VERSION)" : '[3-9]\.'),2) >> LLVM_PROGS := sparse-llvm >> $(LLVM_PROGS): LD := g++ >> LLVM_LDFLAGS := $(shell $(LLVM_CONFIG) --ldflags) >> -LLVM_CFLAGS := -I$(shell $(LLVM_CONFIG) --includedir) \ >> - $(shell $(LLVM_CONFIG) --cppflags) >> +LLVM_CFLAGS := $(shell $(LLVM_CONFIG) --cppflags) >> LLVM_LIBS := $(shell $(LLVM_CONFIG) --libs) >> LLVM_LIBS += $(shell $(LLVM_CONFIG) --system-libs 2>/dev/null) >> LLVM_LIBS += $(shell $(LLVM_CONFIG) --cxxflags | grep -F -q -e '-stdlib=libc++' && echo -lc++) >> $ >> >> ... which also works! The only difference is that '-I/usr/include' >> is not passed to gcc twice. >> >> Looking at commit 65840c61dc ("build: only need includedir from >> llvm-config", 2018-12-18), Luc only wanted the 'pre-processor' >> flags not all of the '--cflags'. The '--cppflags' argument to >> llvm-config is used for just that. ;-) >> >> If you could confirm that the above works for you also, that >> would be great. Thanks! > > Yes, I agree and applied. > Thank both and really sorry for the delay. Welcome back Luc. ;-) [BTW, we are still in 'RC' period! I have been using sparse version v0.6.1-rc1-7-g2b96cd8 in 'production' all this time ...] I just fetched sparse and tested master@3c74809, and it failed on cygwin! At first I thought it was this patch (ie it was all sparse-llvm tests which failed), but I was equally sure I had tested back when Randy sent the patch (_not_ just compile tested). However, if I go back to v0.6.1-rc1-7-g2b96cd8, it also fails, so this is not the smoking gun. Then I remembered that the cygwin package for clang/llvm was updated recently ... Back when Randy sent the patch I was on clang/llvm v3.x.y (I _think_ it was 3.0.1, but don't quote me), but now I am on v8.0.1. I haven't looked into the errors/warnings yet, but they seem to relate to 'unknown/misused' pseudo-ops used for debug info. Just a heads up! (If Randy hasn't also updated, he may well still be fine). ATB, Ramsay Jones