All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/1] avoid duplicate symbol errors with clang
@ 2026-03-06 16:25 Edwin Török
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Edwin Török @ 2026-03-06 16:25 UTC (permalink / raw)
  To: xen-devel
  Cc: Edwin Török, Jan Beulich, Andrew Cooper,
	Roger Pau Monné, Anthony PERARD

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



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

end of thread, other threads:[~2026-03-09 10:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 16:25 [PATCH v3 0/1] avoid duplicate symbol errors with clang Edwin Török
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

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.