On Fri, Aug 28, 2020 at 07:00:19AM +0200, Thomas Huth wrote: > On 10/08/2020 15.06, Roman Bolshakov wrote: > > + > > +COMMON_CFLAGS += -Wa,--divide > > Some weeks ago, I also played with an elf cross compiler and came to the > same conclusion, that we need this option there. Unfortunately, it does > not work with clang: > > https://gitlab.com/huth/kvm-unit-tests/-/jobs/707986800#L1629 > > You could try to wrap it with "cc-option" instead ... or use a proper > check in the configure script to detect whether it's needed or not. > Hi Thomas, I've wrapped it but clang can't deal with another option: -Woverride-init Even if I wrap it with cc-option and add wrapped clang's -Winitializer-overrides, the build fails with: x86/vmexit.c:577:5: error: no previous prototype for function 'main' [-Werror,-Wmissing-prototypes] int main(int ac, char **av) ^ 1 error generated. <builtin>: recipe for target 'x86/vmexit.o' failed I'm puzzled with this one. CI log (ubuntu focal + clang 10): https://travis-ci.com/github/roolebo/kvm-unit-tests/jobs/379561410 Now I wonder if wrong clang is used... Perhaps I should try --cc=clang-10 in .travis.yml instead of --cc=clang. Thanks, Roman