From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/xen: fix build failure on x86 after bump to 47
Date: Sat, 29 Oct 2016 20:27:14 +0200 [thread overview]
Message-ID: <20161029182714.GA3490@free.fr> (raw)
In-Reply-To: <1477752207-16549-1-git-send-email-yann.morin.1998@free.fr>
Alistair, All,
On 2016-10-29 16:43 +0200, Yann E. MORIN spake thusly:
> Since the bump to 4.7, Xen fails to build because of a double definition
> of __OBJECT_FILE__. This is due to (who would have guessed) the weirdness
> of their buildsystem.
>
> Fix that with a dirty hack: undefine the macro before defining it.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Alistair Francis <alistair.francis@xilinx.com>
>
> ---
> Note: totally untested.
Now build-tested, the double-definition issue is fixed, and the build
succeeds with this defconfig:
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_XEN=y
BR2_PACKAGE_XEN_HYPERVISOR=y
BR2_PACKAGE_XEN_TOOLS=y
Not booted, I don't know Xen enough to test...
Regards,
Yann E. MORIN.
> ---
> ...mk-fix-build-with-CFLAGS-from-environment.patch | 36 ++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
> create mode 100644 package/xen/0002-xen-Rules.mk-fix-build-with-CFLAGS-from-environment.patch
>
> diff --git a/package/xen/0002-xen-Rules.mk-fix-build-with-CFLAGS-from-environment.patch b/package/xen/0002-xen-Rules.mk-fix-build-with-CFLAGS-from-environment.patch
> new file mode 100644
> index 0000000..0d4e581
> --- /dev/null
> +++ b/package/xen/0002-xen-Rules.mk-fix-build-with-CFLAGS-from-environment.patch
> @@ -0,0 +1,36 @@
> +From 2a310549aaeaba05f640ade43488bb893101ce4a Mon Sep 17 00:00:00 2001
> +From: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +Date: Sat, 29 Oct 2016 16:35:26 +0200
> +Subject: [PATCH] xen/Rules.mk: fix build with CFLAGS from environment
> +
> +When CFLAGS are passed from the environment, the first-level make
> +invocation will append -D__OBJECT_FILE__ to it, then call a second
> +make invocation, that will have those new CFLAGS in its environment,
> +but will also append -D__OBJECT_FILE__ to those.
> +
> +Then, the compiler fails because __OBEJECT_FILE__ is defined twice.
> +
> +Just undefine it before defining it again, as a *workaround* to this
> +issue.
> +
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +---
> + xen/Rules.mk | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/xen/Rules.mk b/xen/Rules.mk
> +index a9fda71..09ccbfa 100644
> +--- a/xen/Rules.mk
> ++++ b/xen/Rules.mk
> +@@ -49,7 +49,7 @@ ALL_OBJS-$(CONFIG_CRYPTO) += $(BASEDIR)/crypto/built_in.o
> + CFLAGS += -nostdinc -fno-builtin -fno-common
> + CFLAGS += -Werror -Wredundant-decls -Wno-pointer-arith
> + CFLAGS += -pipe -g -D__XEN__ -include $(BASEDIR)/include/xen/config.h
> +-CFLAGS += '-D__OBJECT_FILE__="$@"'
> ++CFLAGS += -U__OBJECT_FILE__ '-D__OBJECT_FILE__="$@"'
> +
> + ifneq ($(clang),y)
> + # Clang doesn't understand this command line argument, and doesn't appear to
> +--
> +2.7.4
> +
> --
> 2.7.4
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2016-10-29 18:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-13 20:45 [Buildroot] [PATCH 1/2] xen: Disable -Werror when building Alistair Francis
2016-09-13 20:45 ` [Buildroot] [PATCH 2/2] xen: Remove TARGET_CONFIGURE_OPTS from make Alistair Francis
2016-09-13 23:23 ` Arnout Vandecappelle
2016-09-17 14:09 ` Thomas Petazzoni
2016-09-17 14:44 ` Thomas Petazzoni
2016-09-19 18:41 ` Alistair Francis
2016-10-03 18:06 ` Alistair Francis
2016-10-22 21:18 ` Thomas Petazzoni
2016-10-24 7:19 ` Alistair Francis
2016-10-28 20:26 ` Alistair Francis
2016-10-29 14:43 ` [Buildroot] [PATCH] package/xen: fix build failure on x86 after bump to 47 Yann E. MORIN
2016-10-29 18:27 ` Yann E. MORIN [this message]
2016-10-31 22:06 ` Alistair Francis
2016-11-01 0:42 ` Alistair Francis
2016-11-01 8:37 ` Yann E. MORIN
2016-09-13 22:57 ` [Buildroot] [PATCH 1/2] xen: Disable -Werror when building Arnout Vandecappelle
2016-09-13 23:19 ` Arnout Vandecappelle
2016-09-19 16:18 ` Alistair Francis
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=20161029182714.GA3490@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/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