On 10/08/2020 15.06, Roman Bolshakov wrote: > For compatibility with other SVR4 assemblers, '/' starts a comment on > *-elf binutils target and thus division operator is not allowed [1][2]. > That breaks cstart64.S build: > > x86/cstart64.S: Assembler messages: > x86/cstart64.S:294: Error: unbalanced parenthesis in operand 1. > > The option is ignored on the Linux target of GNU binutils. > > 1. https://sourceware.org/binutils/docs/as/i386_002dChars.html > 2. https://sourceware.org/binutils/docs/as/i386_002dOptions.html#index-_002d_002ddivide-option_002c-i386 > > Cc: Cameron Esfahani <dirty@xxxxxxxxx> > Signed-off-by: Roman Bolshakov <r.bolshakov@xxxxxxxxx> > --- > x86/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/x86/Makefile b/x86/Makefile > index 8a007ab..22afbb9 100644 > --- a/x86/Makefile > +++ b/x86/Makefile > @@ -1 +1,3 @@ > include $(SRCDIR)/$(TEST_DIR)/Makefile.$(ARCH) > + > +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. And can you please put it next to the other COMMON_CFLAGS in x86/Makefile.common instead of x86/Makefile? Thanks, Thomas