* [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments
@ 2019-11-15 10:43 Jan Beulich
2019-11-15 10:48 ` [Xen-devel] [PATCH v2 1/2] x86: fix clang .macro retention check Jan Beulich
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Jan Beulich @ 2019-11-15 10:43 UTC (permalink / raw)
To: xen-devel
Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Roger Pau Monné
1: fix clang .macro retention check
2: clang: move and fix .skip check
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Xen-devel] [PATCH v2 1/2] x86: fix clang .macro retention check
2019-11-15 10:43 [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Jan Beulich
@ 2019-11-15 10:48 ` Jan Beulich
2019-11-15 10:48 ` [Xen-devel] [PATCH v2 2/2] x86/clang: move and fix .skip check Jan Beulich
2019-11-15 14:45 ` [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Roger Pau Monné
2 siblings, 0 replies; 9+ messages in thread
From: Jan Beulich @ 2019-11-15 10:48 UTC (permalink / raw)
To: xen-devel
Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Roger Pau Monné
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.
Furthermore there appears to be a puzzling problem with \n getting
expanded to an actual newline too early in some environments. Convert
these to semicolons at the same time.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: Also replace \n by semicolons.
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
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.
--- 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
@@ -81,6 +81,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;.endm"$$(close); asm volatile $$(open)".macro FOO;.endm",\
-no-integrated-as)
endif
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Xen-devel] [PATCH v2 2/2] x86/clang: move and fix .skip check
2019-11-15 10:43 [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Jan Beulich
2019-11-15 10:48 ` [Xen-devel] [PATCH v2 1/2] x86: fix clang .macro retention check Jan Beulich
@ 2019-11-15 10:48 ` Jan Beulich
2019-11-15 14:45 ` [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Roger Pau Monné
2 siblings, 0 replies; 9+ messages in thread
From: Jan Beulich @ 2019-11-15 10:48 UTC (permalink / raw)
To: xen-devel
Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, Roger Pau Monné
From: Roger Pau Monné <roger.pau@citrix.com>
.skip is only used by x86 code, so place the clang .skip with labels
check in x86/Rules.mk instead of the top level Rules.mk. While there
also fix an issue with it by removing the '\n' which triggers the
following error:
<stdin>:1:31: error: missing terminating '"' character [-Werror,-Winvalid-pp-token]
void _(void) { asm volatile ( ".L0:
^
<stdin>:1:31: error: expected string literal in 'asm'
<stdin>:3:18: error: missing terminating '"' character [-Werror,-Winvalid-pp-token]
.skip (.L1 - .L0)" ); }
^
<stdin>:3:24: error: expected ')'
.skip (.L1 - .L0)" ); }
^
<stdin>:1:29: note: to match this '('
void _(void) { asm volatile ( ".L0:
^
<stdin>:3:24: error: expected '}'
.skip (.L1 - .L0)" ); }
^
<stdin>:1:14: note: to match this '{'
void _(void) { asm volatile ( ".L0:
^
5 errors generated.
Suggested-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: Put moved check 1st in ifeq() block.
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -76,13 +76,6 @@ endif
AFLAGS-y += -D__ASSEMBLY__
-# Older clang's built-in assembler doesn't understand .skip with labels:
-# https://bugs.llvm.org/show_bug.cgi?id=27369
-ifeq ($(clang),y)
-$(call as-option-add,CFLAGS,CC,".L0:\n.L1:\n.skip (.L1 - .L0)",,\
- -no-integrated-as)
-endif
-
ALL_OBJS := $(ALL_OBJS-y)
# Get gcc to generate the dependencies for us.
--- a/xen/arch/x86/Rules.mk
+++ b/xen/arch/x86/Rules.mk
@@ -74,6 +74,11 @@ ifeq ($(clang),y)
# Note: Any test which adds -no-integrated-as will cause subsequent tests to
# succeed, and not trigger further additions.
+# Older clang's built-in assembler doesn't understand .skip with labels:
+# https://bugs.llvm.org/show_bug.cgi?id=27369
+$(call as-option-add,CFLAGS,CC,".L0: .L1: .skip (.L1 - .L0)",,\
+ -no-integrated-as)
+
# Check whether clang asm()-s support .include.
$(call as-option-add,CFLAGS,CC,".include \"asm/indirect_thunk_asm.h\"",,\
-no-integrated-as)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments
2019-11-15 10:43 [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Jan Beulich
2019-11-15 10:48 ` [Xen-devel] [PATCH v2 1/2] x86: fix clang .macro retention check Jan Beulich
2019-11-15 10:48 ` [Xen-devel] [PATCH v2 2/2] x86/clang: move and fix .skip check Jan Beulich
@ 2019-11-15 14:45 ` Roger Pau Monné
2019-11-15 14:50 ` Andrew Cooper
` (2 more replies)
2 siblings, 3 replies; 9+ messages in thread
From: Roger Pau Monné @ 2019-11-15 14:45 UTC (permalink / raw)
To: Jan Beulich
Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Wilk,
George Dunlap, Andrew Cooper, Ian Jackson, xen-devel
On Fri, Nov 15, 2019 at 11:43:21AM +0100, Jan Beulich wrote:
> 1: fix clang .macro retention check
> 2: clang: move and fix .skip check
For both:
Tested-by: Roger Pau Monné <roger.pasu@citrix.com>
[On FreeBSD and Debian 9.5]
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Note there's a typo in this email's subject (clank v clang). Also, if
possible, could both patches have the same prefix? (x86/clang)
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments
2019-11-15 14:45 ` [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Roger Pau Monné
@ 2019-11-15 14:50 ` Andrew Cooper
2019-11-15 15:00 ` [Xen-devel] [PATCH v2 0/2] x86: clang " Jan Beulich
2019-11-30 16:08 ` [Xen-devel] [PATCH v2 0/2] x86: clank " Doug Goldstein
2 siblings, 0 replies; 9+ messages in thread
From: Andrew Cooper @ 2019-11-15 14:50 UTC (permalink / raw)
To: Roger Pau Monné, Jan Beulich
Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Wilk,
George Dunlap, Ian Jackson, xen-devel
On 15/11/2019 14:45, Roger Pau Monné wrote:
> On Fri, Nov 15, 2019 at 11:43:21AM +0100, Jan Beulich wrote:
>> 1: fix clang .macro retention check
>> 2: clang: move and fix .skip check
> For both:
>
> Tested-by: Roger Pau Monné <roger.pasu@citrix.com>
> [On FreeBSD and Debian 9.5]
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Note there's a typo in this email's subject (clank v clang). Also, if
> possible, could both patches have the same prefix? (x86/clang)
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] [PATCH v2 0/2] x86: clang build check adjustments
2019-11-15 14:45 ` [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Roger Pau Monné
2019-11-15 14:50 ` Andrew Cooper
@ 2019-11-15 15:00 ` Jan Beulich
2019-11-15 15:20 ` Roger Pau Monné
2019-11-30 16:08 ` [Xen-devel] [PATCH v2 0/2] x86: clank " Doug Goldstein
2 siblings, 1 reply; 9+ messages in thread
From: Jan Beulich @ 2019-11-15 15:00 UTC (permalink / raw)
To: Roger Pau Monné
Cc: Stefano Stabellini, JulienGrall, Wei Liu, Konrad Wilk,
George Dunlap, AndrewCooper, Ian Jackson, xen-devel
On 15.11.2019 15:45, Roger Pau Monné wrote:
> On Fri, Nov 15, 2019 at 11:43:21AM +0100, Jan Beulich wrote:
>> 1: fix clang .macro retention check
>> 2: clang: move and fix .skip check
>
> For both:
>
> Tested-by: Roger Pau Monné <roger.pasu@citrix.com>
> [On FreeBSD and Debian 9.5]
Thanks much. I'll take the liberty and drop the seemingly stray
's' from your email address here.
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Note there's a typo in this email's subject (clank v clang).
Yeah, I had noticed this right after sending. Fingers and brain
must have had a disconnect.
> Also, if
> possible, could both patches have the same prefix? (x86/clang)
I did notice the prefix difference before sending the series.
I wouldn't mind making both just x86: (moving "clang" elsewhere
in the title of yours), but I don't want to make mine have
x86/clang, because I think these should represent subsystems or
alike.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] [PATCH v2 0/2] x86: clang build check adjustments
2019-11-15 15:00 ` [Xen-devel] [PATCH v2 0/2] x86: clang " Jan Beulich
@ 2019-11-15 15:20 ` Roger Pau Monné
0 siblings, 0 replies; 9+ messages in thread
From: Roger Pau Monné @ 2019-11-15 15:20 UTC (permalink / raw)
To: Jan Beulich
Cc: Stefano Stabellini, JulienGrall, Wei Liu, Konrad Wilk,
George Dunlap, AndrewCooper, Ian Jackson, xen-devel
On Fri, Nov 15, 2019 at 04:00:42PM +0100, Jan Beulich wrote:
> On 15.11.2019 15:45, Roger Pau Monné wrote:
> > Also, if
> > possible, could both patches have the same prefix? (x86/clang)
>
> I did notice the prefix difference before sending the series.
> I wouldn't mind making both just x86: (moving "clang" elsewhere
> in the title of yours), but I don't want to make mine have
> x86/clang, because I think these should represent subsystems or
> alike.
Oh, that's fine then. Feel free to move the 'clang' part somewhere
else. Ie: 'x86: move and fix .skip clang check' LGTM for example.
Thanks.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments
2019-11-15 14:45 ` [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Roger Pau Monné
2019-11-15 14:50 ` Andrew Cooper
2019-11-15 15:00 ` [Xen-devel] [PATCH v2 0/2] x86: clang " Jan Beulich
@ 2019-11-30 16:08 ` Doug Goldstein
2019-12-01 13:31 ` Roger Pau Monné
2 siblings, 1 reply; 9+ messages in thread
From: Doug Goldstein @ 2019-11-30 16:08 UTC (permalink / raw)
To: Roger Pau Monné, Jan Beulich
Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Wilk,
George Dunlap, Andrew Cooper, xen-devel, Ian Jackson
On 11/15/19 8:45 AM, Roger Pau Monné wrote:
> On Fri, Nov 15, 2019 at 11:43:21AM +0100, Jan Beulich wrote:
>> 1: fix clang .macro retention check
>> 2: clang: move and fix .skip check
> For both:
>
> Tested-by: Roger Pau Monné <roger.pasu@citrix.com>
> [On FreeBSD and Debian 9.5]
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Note there's a typo in this email's subject (clank v clang). Also, if
> possible, could both patches have the same prefix? (x86/clang)
>
Roger,
Do we need to make changes to the containers that build the tree? These
patches broken the clang builds in CI as can be seen here:
https://gitlab.com/xen-project/xen/-/jobs/365246563#L2371
--
Doug
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments
2019-11-30 16:08 ` [Xen-devel] [PATCH v2 0/2] x86: clank " Doug Goldstein
@ 2019-12-01 13:31 ` Roger Pau Monné
0 siblings, 0 replies; 9+ messages in thread
From: Roger Pau Monné @ 2019-12-01 13:31 UTC (permalink / raw)
To: Doug Goldstein
Cc: Stefano Stabellini, Julien Grall, Wei Liu, Konrad Wilk,
George Dunlap, Andrew Cooper, Jan Beulich, xen-devel,
Ian Jackson
On Sat, Nov 30, 2019 at 10:08:40AM -0600, Doug Goldstein wrote:
> On 11/15/19 8:45 AM, Roger Pau Monné wrote:
>
> > On Fri, Nov 15, 2019 at 11:43:21AM +0100, Jan Beulich wrote:
> > > 1: fix clang .macro retention check
> > > 2: clang: move and fix .skip check
> > For both:
> >
> > Tested-by: Roger Pau Monné <roger.pasu@citrix.com>
> > [On FreeBSD and Debian 9.5]
> > Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
> >
> > Note there's a typo in this email's subject (clank v clang). Also, if
> > possible, could both patches have the same prefix? (x86/clang)
> >
> Roger,
>
> Do we need to make changes to the containers that build the tree? These
> patches broken the clang builds in CI as can be seen here:
> https://gitlab.com/xen-project/xen/-/jobs/365246563#L2371
That's unexpected, the version of clang in that job is 3.5, so it
should be using -no-integrated-as which is it indeed doing. Will check
tomorrow to see what's going on.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-12-01 13:32 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-15 10:43 [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Jan Beulich
2019-11-15 10:48 ` [Xen-devel] [PATCH v2 1/2] x86: fix clang .macro retention check Jan Beulich
2019-11-15 10:48 ` [Xen-devel] [PATCH v2 2/2] x86/clang: move and fix .skip check Jan Beulich
2019-11-15 14:45 ` [Xen-devel] [PATCH v2 0/2] x86: clank build check adjustments Roger Pau Monné
2019-11-15 14:50 ` Andrew Cooper
2019-11-15 15:00 ` [Xen-devel] [PATCH v2 0/2] x86: clang " Jan Beulich
2019-11-15 15:20 ` Roger Pau Monné
2019-11-30 16:08 ` [Xen-devel] [PATCH v2 0/2] x86: clank " Doug Goldstein
2019-12-01 13:31 ` Roger Pau Monné
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.