[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 2/4] x86/clang: restore integrated assembler usage with indirect thunks
On Mon, Feb 19, 2018 at 08:57:15AM -0700, Jan Beulich wrote: > >>> On 19.02.18 at 15:16, <roger.pau@xxxxxxxxxx> wrote: > > --- a/xen/arch/x86/Rules.mk > > +++ b/xen/arch/x86/Rules.mk > > @@ -44,3 +44,17 @@ endif > > > > # Set up the assembler include path properly for older toolchains. > > CFLAGS += -Wa,-I$(BASEDIR)/include > > + > > +ifeq ($(clang),y) > > + # Check whether clang asm()-s support .include. > > + ifeq ($(call as-insn,$(CC) $(CFLAGS),".include > > \"asm/indirect_thunk_asm.h\"",y,n),n) > > Is there anything keeping you from using the slightly less ugly to use > as-insn-check here? Oh, it's apparently that you want to use CFLAGS, > not AFLAGS. I wonder whether the other as-insn-check uses wouldn't > better have CFLAGS passed too. Otherwise please clarify why the > other construct can't be used by extending the comment. Right, it's because the .include directive is used with asm()-s in C files so the parameters for building those use CFLAGS, not AFLAGS. Also as-insn-check only let's you add to a variable in the success case, and here I need to do the opposite here. > > + CFLAGS += -no-integrated-as > > + # Check whether clang keeps .macro-s between asm()-s: > > + # https://bugs.llvm.org/show_bug.cgi?id=36110 > > + else ifeq ($(if $(shell echo 'void _(void) { asm volatile ( ".macro > > FOO\n.endm" ); \ > > Careful with this; ./README still says "GNU make 3.80 or later" and > iirc 3.80 doesn't support "else if..." on a single line. Hm, OK, I'm afraid I don't have access to make 3.80, but I can certainly expand this to be else ifeq endif endif Thanks, Roger. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |