All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edwin Török" <edwin.torok@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: "Edwin Török" <edwin.torok@citrix.com>,
	"Jan Beulich" <jbeulich@suse.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>
Subject: [PATCH v3 0/1] avoid duplicate symbol errors with clang
Date: Fri,  6 Mar 2026 16:25:42 +0000	[thread overview]
Message-ID: <cover.1772813802.git.edwin.torok@citrix.com> (raw)

The previous attempt with .ifndef is not necessarily always correct,
and may lead to subtle bugs. The instructions executed from the
emulator would always come from the first (and now only) labeled block.
Although the approach worked with the existing tests, it may have broken
again when more instructions are added in the future.

Using -O0 achieves the same outcome as the .ifndef patch (being able to
compile the tests with clang), without the drawbacks.
Only added -O0 to the test runner code, which is not performance
critical.

This is a workaround, if a better solution is found then this can be
removed.

Edwin Török (1):
  tools/tests/x86_emulator: avoid duplicate symbol error with clang: use
    -O0

 tools/tests/x86_emulator/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.47.3



             reply	other threads:[~2026-03-06 16:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-06 16:25 Edwin Török [this message]
2026-03-06 16:25 ` [PATCH v3 1/1] tools/tests/x86_emulator: avoid duplicate symbol error with clang: use -O0 Edwin Török
2026-03-09  7:47   ` Jan Beulich
2026-03-09  9:49     ` Edwin Torok
2026-03-09 10:20       ` Jan Beulich
2026-03-09 10:46         ` Edwin Torok

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=cover.1772813802.git.edwin.torok@citrix.com \
    --to=edwin.torok@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@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 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.