All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stewart Hildebrand via buildroot <buildroot@buildroot.org>
To: Neal Frager <neal.frager@amd.com>, buildroot@buildroot.org
Cc: alistair@alistair23.me, stefano.stabellini@amd.com,
	ibai.erkiaga-elorza@amd.com, luca.ceresoli@bootlin.com,
	micheal.saleab@amd.com, yann.morin@orange.com,
	matthew.l.weber3@boeing.com, brandon.maier@collins.com,
	john.ernberg@actia.se, brian.j.wood2@boeing.com, ju.o@free.fr,
	thomas.petazzoni@bootlin.com, romain.naour@smile.fr,
	michal.simek@amd.com, romain.naour@gmail.com
Subject: Re: [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled
Date: Mon, 24 Aug 2026 12:41:53 +0200	[thread overview]
Message-ID: <85f125d6-df38-4e3d-a503-1b6443b939da@amd.com> (raw)
In-Reply-To: <20260803145152.102135-1-neal.frager@amd.com>

On 8/3/26 16:51, Neal Frager wrote:
> The 0002-Update-linker-flags.patch assumes that the qemu-xen files are included
> in the xen source tree. However, if BR2_PACKAGE_XEN_TOOLS is not enabled, the
> qemu-xen dependency will not be handled and the patch will fail to apply with
> the following error.
> 
> Fixes: build error below
> Applying 0002-Update-linker-flags.patch using patch:
> patching file tools/Makefile
> Hunk #1 succeeded at 36 (offset -1 lines).
> Hunk #2 succeeded at 185 (offset -8 lines).
> can't find file to patch at input line 76
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |diff --git a/tools/qemu-xen/include/hw/xen/xen_native.h b/tools/qemu-xen/include/hw/xen/xen_native.h
> |index 6bcc83ba..2590904e 100644
> |--- a/tools/qemu-xen/include/hw/xen/xen_native.h
> |+++ b/tools/qemu-xen/include/hw/xen/xen_native.h
> --------------------------
> No file to patch.  Skipping patch.
> 1 out of 1 hunk ignored
> make: *** [package/pkg-generic.mk:239: output/build/xen-4.21.1/.stamp_patched] Error 1
> 
> To avoid making BR2_PACKAGE_XEN_TOOLS a required option, fix the
> 0002-Update-linker-flags.patch so that the part that modifies the qemu-xen
> sources is correctly moved to a patch in the qemu-xen package.
> 
> Move this:
>  #define QEMU_HW_XEN_NATIVE_H
> 
>  #ifdef __XEN_INTERFACE_VERSION__
> -#error In Xen native files, include xen_native.h before other Xen headers
> +#warning In Xen native files, include xen_native.h before other Xen headers
>  #endif
> 
>  /*
> 
> to:
> package/qemu-xen/0001-Update-linker-flags.patch


Can you undefine __XEN_INTERFACE_VERSION__, and drop the xen_native.h hunk
altogether?

diff --git a/package/xen/xen.mk b/package/xen/xen.mk
index 75252d1123b7..bddfdbba38a6 100644
--- a/package/xen/xen.mk
+++ b/package/xen/xen.mk
@@ -40,7 +40,8 @@ XEN_MAKE_ENV = \
 	CROSS_COMPILE=$(TARGET_CROSS) \
 	HOST_EXTRACFLAGS="-Wno-error" \
 	XEN_HAS_CHECKPOLICY=n \
-	$(TARGET_CONFIGURE_OPTS)
+	$(TARGET_CONFIGURE_OPTS) \
+	EXTRA_CFLAGS_QEMU_XEN="-U__XEN_INTERFACE_VERSION__"
 
 ifeq ($(BR2_PACKAGE_XEN_HYPERVISOR),y)
 XEN_MAKE_OPTS += dist-xen
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2026-08-24 10:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 14:51 [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Neal Frager via buildroot
2026-08-03 14:51 ` [Buildroot] [PATCH v4 2/4] package/xen: add custom version support Neal Frager via buildroot
2026-08-03 15:21   ` [Buildroot] [EXTERNAL] " Weber (US), Matthew L via buildroot
2026-08-03 15:39     ` Frager, Neal via buildroot
2026-08-03 16:52       ` Weber (US), Matthew L via buildroot
2026-08-24 12:41   ` [Buildroot] " Stewart Hildebrand via buildroot
2026-08-24 13:15     ` Frager, Neal via buildroot
2026-08-03 14:51 ` [Buildroot] [PATCH v4 3/4] package/xen: add custom tarball support Neal Frager via buildroot
2026-08-25  8:37   ` Stewart Hildebrand via buildroot
2026-08-26  6:19     ` Frager, Neal via buildroot
2026-08-03 14:51 ` [Buildroot] [PATCH v4 4/4] package/xen: add custom git support Neal Frager via buildroot
2026-08-25 14:20   ` Stewart Hildebrand via buildroot
2026-08-24 10:41 ` Stewart Hildebrand via buildroot [this message]
2026-08-26  5:14   ` [Buildroot] [PATCH v4 1/4] package/xen: fix build error when BR2_PACKAGE_XEN_TOOLS not enabled Frager, Neal via buildroot

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=85f125d6-df38-4e3d-a503-1b6443b939da@amd.com \
    --to=buildroot@buildroot.org \
    --cc=alistair@alistair23.me \
    --cc=brandon.maier@collins.com \
    --cc=brian.j.wood2@boeing.com \
    --cc=ibai.erkiaga-elorza@amd.com \
    --cc=john.ernberg@actia.se \
    --cc=ju.o@free.fr \
    --cc=luca.ceresoli@bootlin.com \
    --cc=matthew.l.weber3@boeing.com \
    --cc=michal.simek@amd.com \
    --cc=micheal.saleab@amd.com \
    --cc=neal.frager@amd.com \
    --cc=romain.naour@gmail.com \
    --cc=romain.naour@smile.fr \
    --cc=stefano.stabellini@amd.com \
    --cc=stewart.hildebrand@amd.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=yann.morin@orange.com \
    /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.