All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: "Edwin Török" <edwin.torok@citrix.com>
Cc: xen-devel@lists.xenproject.org, Jan Beulich <jbeulich@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Anthony PERARD <anthony.perard@vates.tech>
Subject: Re: [PATCH v4] tools/tests/x86_emulator: avoid duplicate symbol error with clang: use -O0
Date: Mon, 9 Mar 2026 15:15:26 +0100	[thread overview]
Message-ID: <aa7V_nOG0ctnjxH3@macbook.local> (raw)
In-Reply-To: <d0178858e5f3ff7a8b64e822b55c6179adc92ea6.1773052835.git.edwin.torok@citrix.com>

On Mon, Mar 09, 2026 at 10:41:35AM +0000, Edwin Török wrote:
> clang would duplicate the loop body and end up with a double definition
> of the symbol:
> ```
> /tmp/test_x86_emulator-0f3576.s:27823: Error: symbol `vmovsh_to_mem' is already defined
> /tmp/test_x86_emulator-0f3576.s:27825: Error: symbol `.Lvmovsh_to_mem_end' is already defined
> ```
> 
> Until a better solution is found: reduce optimizations in the test runner.
> 
> Using -Os might also work, but we can't rely on the size optimization
> always avoiding the duplication of asm blocks.
> This is test code, not performance critical code, and -O0 is more future
> proof.
> However for debugging -Og is recommended over -O0, and this still
> avoids the duplicate label problem.
> 
> Signed-off-by: Edwin Török <edwin.torok@citrix.com>

Building the x86 emulator test harness is currently gated on:

ifneq ($(clang),y)
SUBDIRS-$(CONFIG_X86) += x86_emulator
endif

So I think there should be a further patch (or done here) that removed
this check.  And then we should also run the test harness from one of
the LLVM FreeBSD builds ideally.

Have you tested with a full LLVM based toolchain (so also using LLVM
linker?)

Thanks, Roger.


  parent reply	other threads:[~2026-03-09 14:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-09 10:41 [PATCH v4] tools/tests/x86_emulator: avoid duplicate symbol error with clang: use -O0 Edwin Török
2026-03-09 11:00 ` Jan Beulich
2026-03-09 14:15 ` Roger Pau Monné [this message]
2026-03-09 14:36   ` 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=aa7V_nOG0ctnjxH3@macbook.local \
    --to=roger.pau@citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=edwin.torok@citrix.com \
    --cc=jbeulich@suse.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.