xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-4.7 0/2] assembly test fixes
@ 2016-05-30 16:27 Roger Pau Monne
  2016-05-30 16:27 ` [PATCH for-4.7 1/2] build/clang: disable the usage of the integrated clang assembler Roger Pau Monne
  2016-05-30 16:27 ` [PATCH for-4.7 2/2] build: use CFLAGS instead of AFLAGS for as-insn checks Roger Pau Monne
  0 siblings, 2 replies; 7+ messages in thread
From: Roger Pau Monne @ 2016-05-30 16:27 UTC (permalink / raw)
  To: xen-devel

Hello,

The following series attempts to fix the build issue introduced by 
7fb252bd41, and to make sure the same assembler is used thorough all the 
build process. It also supersedes the fix by Jan Beulich for this same issue 
[0].

Roger.

[0] http://lists.xenproject.org/archives/html/xen-devel/2016-05/msg02822.html


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH for-4.7 1/2] build/clang: disable the usage of the integrated clang assembler
  2016-05-30 16:27 [PATCH for-4.7 0/2] assembly test fixes Roger Pau Monne
@ 2016-05-30 16:27 ` Roger Pau Monne
  2016-05-31  8:16   ` Jan Beulich
  2016-05-30 16:27 ` [PATCH for-4.7 2/2] build: use CFLAGS instead of AFLAGS for as-insn checks Roger Pau Monne
  1 sibling, 1 reply; 7+ messages in thread
From: Roger Pau Monne @ 2016-05-30 16:27 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, Roger Pau Monne

For all the build process, not only the assembly-only files.

This prevents assembling certain code with the integrated assembler, while
other code would be assembled by the external assembler.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 xen/Rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 961d533..12efd6a 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -71,7 +71,7 @@ endif
 AFLAGS-y                += -D__ASSEMBLY__ -include $(BASEDIR)/include/xen/config.h
 
 # Clang's built-in assembler can't handle .code16/.code32/.code64 yet
-AFLAGS-$(clang)         += -no-integrated-as
+CFLAGS-$(clang)         += -no-integrated-as
 
 ALL_OBJS := $(ALL_OBJS-y)
 
-- 
2.7.4 (Apple Git-66)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH for-4.7 2/2] build: use CFLAGS instead of AFLAGS for as-insn checks
  2016-05-30 16:27 [PATCH for-4.7 0/2] assembly test fixes Roger Pau Monne
  2016-05-30 16:27 ` [PATCH for-4.7 1/2] build/clang: disable the usage of the integrated clang assembler Roger Pau Monne
@ 2016-05-30 16:27 ` Roger Pau Monne
  2016-05-31  8:25   ` Jan Beulich
  1 sibling, 1 reply; 7+ messages in thread
From: Roger Pau Monne @ 2016-05-30 16:27 UTC (permalink / raw)
  To: xen-devel
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, Jan Beulich, Roger Pau Monne

The test code is a C file with inline assembly, not plain assembly.

This fixes the fallout introduced by commit 7fb252bd41 ("build/xen: fix
assembler instruction tests")

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 Config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Config.mk b/Config.mk
index 5ddfbf8..13475e0 100644
--- a/Config.mk
+++ b/Config.mk
@@ -150,7 +150,7 @@ endif
 # as-insn: Check whether assembler supports an instruction.
 # Usage: cflags-y += $(call as-insn "insn",option-yes,option-no)
 as-insn = $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \
-                       | $(1) $(AFLAGS) -c -x c -o /dev/null - 2>&1),$(4),$(3))
+                       | $(1) $(CFLAGS) -c -x c -o /dev/null - 2>&1),$(4),$(3))
 
 # as-insn-check: Add an option to compilation flags, but only if insn is
 #                supported by assembler.
-- 
2.7.4 (Apple Git-66)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH for-4.7 1/2] build/clang: disable the usage of the integrated clang assembler
  2016-05-30 16:27 ` [PATCH for-4.7 1/2] build/clang: disable the usage of the integrated clang assembler Roger Pau Monne
@ 2016-05-31  8:16   ` Jan Beulich
  2016-05-31 10:31     ` Roger Pau Monne
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2016-05-31  8:16 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, xen-devel

>>> On 30.05.16 at 18:27, <roger.pau@citrix.com> wrote:
> For all the build process, not only the assembly-only files.
> 
> This prevents assembling certain code with the integrated assembler, while
> other code would be assembled by the external assembler.

Without you giving a reason why this needs to be that way, I don't
think this is an acceptable change. I, for one, don't see why in a
clang build we shouldn't use as much of clang as possible (and hence
limit exceptions to a minimum).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH for-4.7 2/2] build: use CFLAGS instead of AFLAGS for as-insn checks
  2016-05-30 16:27 ` [PATCH for-4.7 2/2] build: use CFLAGS instead of AFLAGS for as-insn checks Roger Pau Monne
@ 2016-05-31  8:25   ` Jan Beulich
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2016-05-31  8:25 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, xen-devel

>>> On 30.05.16 at 18:27, <roger.pau@citrix.com> wrote:
> The test code is a C file with inline assembly, not plain assembly.
> 
> This fixes the fallout introduced by commit 7fb252bd41 ("build/xen: fix
> assembler instruction tests")

I don't follow (did you check this time that previous behavior gets
restored; you clearly can't have checked that old behavior was
retained for gcc builds with that earlier change of yours):

> --- a/Config.mk
> +++ b/Config.mk
> @@ -150,7 +150,7 @@ endif
>  # as-insn: Check whether assembler supports an instruction.
>  # Usage: cflags-y += $(call as-insn "insn",option-yes,option-no)
>  as-insn = $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \
> -                       | $(1) $(AFLAGS) -c -x c -o /dev/null - 2>&1),$(4),$(3))
> +                       | $(1) $(CFLAGS) -c -x c -o /dev/null - 2>&1),$(4),$(3))

Afaict this leaves in place the problematic -M options. Changing from
AFLAGS to CFLAGS is probably fine here (if only patch 1, which is a
prereq to the change here, was okay), but leaving out the other
change my patch did I can't see how you fix aforementioned fallout.
Please explain.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH for-4.7 1/2] build/clang: disable the usage of the integrated clang assembler
  2016-05-31  8:16   ` Jan Beulich
@ 2016-05-31 10:31     ` Roger Pau Monne
  2016-05-31 10:53       ` Jan Beulich
  0 siblings, 1 reply; 7+ messages in thread
From: Roger Pau Monne @ 2016-05-31 10:31 UTC (permalink / raw)
  To: Jan Beulich
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, xen-devel

On Tue, May 31, 2016 at 02:16:49AM -0600, Jan Beulich wrote:
> >>> On 30.05.16 at 18:27, <roger.pau@citrix.com> wrote:
> > For all the build process, not only the assembly-only files.
> > 
> > This prevents assembling certain code with the integrated assembler, while
> > other code would be assembled by the external assembler.
> 
> Without you giving a reason why this needs to be that way, I don't
> think this is an acceptable change. I, for one, don't see why in a
> clang build we shouldn't use as much of clang as possible (and hence
> limit exceptions to a minimum).

For once, the external and the integrated assembler might have a different 
set of features, so we would have to execute some of the checks twice 
against each of them and then choose the minimum set of features that are 
supported by both, IMHO we don't want to get down that road.

Roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH for-4.7 1/2] build/clang: disable the usage of the integrated clang assembler
  2016-05-31 10:31     ` Roger Pau Monne
@ 2016-05-31 10:53       ` Jan Beulich
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2016-05-31 10:53 UTC (permalink / raw)
  To: Roger Pau Monne
  Cc: Stefano Stabellini, Wei Liu, George Dunlap, Andrew Cooper,
	Ian Jackson, Tim Deegan, xen-devel

>>> On 31.05.16 at 12:31, <roger.pau@citrix.com> wrote:
> On Tue, May 31, 2016 at 02:16:49AM -0600, Jan Beulich wrote:
>> >>> On 30.05.16 at 18:27, <roger.pau@citrix.com> wrote:
>> > For all the build process, not only the assembly-only files.
>> > 
>> > This prevents assembling certain code with the integrated assembler, while
>> > other code would be assembled by the external assembler.
>> 
>> Without you giving a reason why this needs to be that way, I don't
>> think this is an acceptable change. I, for one, don't see why in a
>> clang build we shouldn't use as much of clang as possible (and hence
>> limit exceptions to a minimum).
> 
> For once, the external and the integrated assembler might have a different 
> set of features, so we would have to execute some of the checks twice 
> against each of them and then choose the minimum set of features that are 
> supported by both, IMHO we don't want to get down that road.

Why not? These checks already say which flags they want to update.
And I don't think many CONFIG_AS_* uses exist in .S files, so the
amount of redundancy (to also update AFLAGS) would be small (or
even zero).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-31 10:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-30 16:27 [PATCH for-4.7 0/2] assembly test fixes Roger Pau Monne
2016-05-30 16:27 ` [PATCH for-4.7 1/2] build/clang: disable the usage of the integrated clang assembler Roger Pau Monne
2016-05-31  8:16   ` Jan Beulich
2016-05-31 10:31     ` Roger Pau Monne
2016-05-31 10:53       ` Jan Beulich
2016-05-30 16:27 ` [PATCH for-4.7 2/2] build: use CFLAGS instead of AFLAGS for as-insn checks Roger Pau Monne
2016-05-31  8:25   ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).