On 26/09/2019 21:33, Luc Van Oostenryck wrote: > On Thu, Sep 26, 2019 at 07:50:27PM +0100, Ramsay Jones wrote: [snip] > Randy had the problem on llvm-3.8.0. > >> I haven't looked into the errors/warnings yet, but they seem to >> relate to 'unknown/misused' pseudo-ops used for debug info. > > I really don't think it could be related to the last patch. > I don't use or have access to cygwin but I've tested on Debian > (bullseye/sid) with gcc-7 & gcc-9 and there wasn't any problem with > llvm-8 (on Ubuntu I can only test with llvm-7). So, I'm curious to > know more about this error you're seeing. I forgot to mention, in my previous email, that I was pretty sure this was a platform specific issue, so I am not surprised that you see no problem on Linux. So, tonight, I had a very quick look at the problem. If I use gcc or clang to generate the assembler version of one of the failing tests (backend/pointer-sub.c), then the pseudo-ops used are appropriate for use with a 'coff-type' object file (ie a PE file). However, the assembler produced by sparsec (saved from the output of llc), would typically used in ELF object files ... After studying the output of 'clang -###', I noticed that clang was passing (among other things) a 'triple' parameter to cc1. However, the triple displayed by clang and llc were different: $ llc --version | head -5 LLVM (http://llvm.org/): LLVM version 8.0.1 Optimized build. Default target: x86_64-unknown-cygwin Host CPU: haswell $ clang --version clang version 8.0.1 (tags/RELEASE_801/final) Target: x86_64-unknown-windows-cygnus Thread model: posix InstalledDir: /usr/bin $ I noticed that you could override the target triple used by llc, so decided to give it a try: $ git diff diff --git a/sparsec b/sparsec index bafe2da..8a056e7 100755 --- a/sparsec +++ b/sparsec @@ -39,6 +39,7 @@ case "$(uname -s)" in *CYGWIN*) # cygwin uses the sjlj (setjmp-longjmp) exception model LLC_ARCH_OPTS="-exception-model=sjlj" + LLC_ARCH_OPTS="$LLC_ARCH_OPTS -mtriple=x86_64-unknown-windows-cygnus" ;; *) ;; $ This fixes the testsuite on cygwin! :-D So, let me just play around some more ... > Two years ago or so, I had once a problem with the version of the C++ > library (libc++ vs. libstc++) and the Makefile currently contains a > hack for it (the line using llvm-config --cxxflags and then grepping > for -stdlib=libc++). Can you check the output of this comand and, if > it doesn't report '-stdlib=libc++', try to explicitly add -lc++ in > LLVM_LIBS? $ llvm-config --cxxflags -I/usr/include -std=gnu++11 -fno-exceptions -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS $ $ llvm-config --cppflags -I/usr/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS $ ATB, Ramsay Jones