[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86: fix clang .macro retention check
On Wed, Nov 13, 2019 at 06:01:40PM +0100, Jan Beulich wrote: > There were two problems here: The first closing parentheses got parsed > by make to end the $(call invocation, and the escaping of the quotes > wasn't right either, as there's nowhere they would get un-escaped. > > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> > --- > This needs to be tested in an environment where this was actually found > to matter; I can't see how it can have worked in its former shape. I Well, I could swear this was working, but obviously I did something wrong. > also don't understand why the same commit introducing the check that > gets fixed here put the .skip check in xen/Rules.mk - the only use of > .skip that I can spot is in x86 code. I recall removing some usages of .skip, but TBH I'm not sure whether ARM was also involved. I guess it's fine to move it to x86/Rules.mk now, since I also have to fix an issue with it. > > --- a/Config.mk > +++ b/Config.mk > @@ -6,6 +6,8 @@ endif > > # Convenient variables > comma := , > +open := ( > +close := ) > squote := ' > #' Balancing squote, to help syntax highlighting > empty := > --- a/xen/arch/x86/Rules.mk > +++ b/xen/arch/x86/Rules.mk > @@ -82,6 +64,6 @@ $(call as-option-add,CFLAGS,CC,".include > # Check whether clang keeps .macro-s between asm()-s: > # https://bugs.llvm.org/show_bug.cgi?id=36110 > $(call as-option-add,CFLAGS,CC,\ > - ".macro FOO\n.endm\"); asm volatile (\".macro > FOO\n.endm",\ > + ".macro FOO\n.endm"$$(close); asm volatile > $$(open)".macro FOO\n.endm",\ Thanks, while here could you also replace the '\n' with a ';'? '\n' doesn't work properly and gives me the following error: <stdin>:1:32: error: missing terminating '"' character [-Werror,-Winvalid-pp-token] void _(void) { asm volatile ( ".macro FOO ^ <stdin>:1:32: error: expected string literal in 'asm' <stdin>:3:6: error: missing terminating '"' character [-Werror,-Winvalid-pp-token] .endm" ); } ^ <stdin>:3:12: error: expected ')' .endm" ); } ^ <stdin>:1:29: note: to match this '(' void _(void) { asm volatile ( ".macro FOO ^ <stdin>:3:12: error: expected '}' .endm" ); } ^ <stdin>:1:14: note: to match this '{' void _(void) { asm volatile ( ".macro FOO ^ 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 |