xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Jan Beulich <jbeulich@suse.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v4 4/4] build/clang: add a check whether the assembler supports .skip with labels
Date: Mon, 19 Feb 2018 14:16:20 +0000	[thread overview]
Message-ID: <20180219141620.20008-5-roger.pau@citrix.com> (raw)
In-Reply-To: <20180219141620.20008-1-roger.pau@citrix.com>

Or else switch off the integrated assembler. This is relevant for
older clang versions which integrated assembler don't support .skip
with labels.

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 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/xen/Rules.mk b/xen/Rules.mk
index 322e11dba2..415b363859 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -72,7 +72,11 @@ 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
-AFLAGS-$(clang)         += -no-integrated-as
+ifeq ($(clang),y)
+ifeq ($(call as-insn,$(CC) $(AFLAGS),".L0:\n.L1:\n.skip (.L1 - .L0)",y,n),n)
+        AFLAGS += -no-integrated-as
+endif
+endif
 
 ALL_OBJS := $(ALL_OBJS-y)
 
-- 
2.16.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2018-02-19 14:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-19 14:16 [PATCH v4 0/4] clang fixes Roger Pau Monne
2018-02-19 14:16 ` [PATCH v4 1/4] build: filter out command line assembler arguments Roger Pau Monne
2018-02-19 15:43   ` Jan Beulich
2018-02-19 16:05     ` Roger Pau Monné
2018-02-19 16:14       ` Jan Beulich
2018-02-19 16:17         ` Roger Pau Monné
2018-02-19 14:16 ` [PATCH v4 2/4] x86/clang: restore integrated assembler usage with indirect thunks Roger Pau Monne
2018-02-19 15:57   ` Jan Beulich
2018-02-19 16:24     ` Roger Pau Monné
2018-02-19 17:09   ` Wei Liu
2018-02-19 14:16 ` [PATCH v4 3/4] x86: fix indirect thunk usage of CONFIG_INDIRECT_THUNK Roger Pau Monne
2018-02-19 16:09   ` Jan Beulich
2018-02-20  9:15   ` Jan Beulich
2018-02-20 10:19     ` Roger Pau Monné
2018-02-20 11:01       ` Roger Pau Monné
2018-02-20 11:13         ` Jan Beulich
2018-02-20 11:22           ` Roger Pau Monné
2018-02-20 12:32             ` Jan Beulich
2018-02-20 12:42               ` Roger Pau Monné
2018-02-20 12:53                 ` Jan Beulich
2018-02-20 12:57                   ` Roger Pau Monné
2018-02-19 14:16 ` Roger Pau Monne [this message]
2018-02-19 16:10   ` [PATCH v4 4/4] build/clang: add a check whether the assembler supports .skip with labels Jan Beulich
2018-02-19 16:16     ` Roger Pau Monné

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180219141620.20008-5-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=jbeulich@suse.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).