From patchwork Tue Nov 1 08:37:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 689793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t7PkK67DYz9sR9 for ; Tue, 1 Nov 2016 19:37:45 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=lvQSGSpj; dkim-atps=neutral Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0B1D48A7FB; Tue, 1 Nov 2016 08:37:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MMi2V+w83+EA; Tue, 1 Nov 2016 08:37:40 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id A0CAF8A7C8; Tue, 1 Nov 2016 08:37:40 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 7C3481CE56F for ; Tue, 1 Nov 2016 08:37:39 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 778B2C127F for ; Tue, 1 Nov 2016 08:37:39 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MKJfwkw35PIG for ; Tue, 1 Nov 2016 08:37:38 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 2F46CC127E for ; Tue, 1 Nov 2016 08:37:38 +0000 (UTC) Received: by mail-wm0-f66.google.com with SMTP id p190so15449211wmp.1 for ; Tue, 01 Nov 2016 01:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id; bh=52GIJQ/7UiEG1Qv3HN/MF4LPfeegGwwfo1GmLSyO36E=; b=lvQSGSpjxr0MA2ELBIvMiKTikurP4fPKTHD7IQy22lApqlwJWmSo8RMHGG0QeELS6b +YdeU2LMIBKy9cdCWmPwDH8gbYn0+81MUx9XgwbCU/+NYOgcVVmbbWIZZY0ZFtcJdbG6 X+6IWS163u3vW02Jf9EyAWgpFWanSNF6zYVPf/hlE0l7InVQjqwHHKrY0e+gywg/1ME/ Et5WEJW0aph7n8enujpVneY0l0srhhCruRsCES/TxVa2BJ3Q94PXa6YFWCMtmslFSLy2 fI5QRX0RYXvxcLp2HVyzO7lrNPgDbNeDY7fmznCeeWg+S2rZqFUsSD4caGQ7SWeyfOWp 64Xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=52GIJQ/7UiEG1Qv3HN/MF4LPfeegGwwfo1GmLSyO36E=; b=V1gbqzsnTFFLwNJVa6KUXADSvjsZHALQqpMXAIUWiRrYFRBBAVN1jWaum0hFmtm5/G afnck9YPXnw6V9UiqWZmMPx7P8Yb+fOugEAu+1TaQNOWkngc9bJf/30Sv63fVzsoEM3m 9xFId+HA7Wf0ldYFk5qUAEWtS5gerrToFnsaddVEBMD5sWytmwG/GGKemUZBSmegPi9Z eJMsjl26GyshiwQFLDt2QM+r3vGsO2aKbxXG3EhUFgzfUL2910c1dU9mVYd5VDm2Bcmf G6S2vah0k6W/cVLq89bkmnlQ/lh2CL+tUEhbKWpNhhXjAlb6uXnbofV9ze0phwta3Fho 116A== X-Gm-Message-State: ABUngvdy6HUM2HINft0aD+Q7xu4gW1RdhV8u/LEmNWFLtWBJc4b910QJrfi02aRRtREwqA== X-Received: by 10.28.236.83 with SMTP id k80mr622773wmh.0.1477989456576; Tue, 01 Nov 2016 01:37:36 -0700 (PDT) Received: from gourin.bzh.lan (ns304657.ip-46-105-103.eu. [46.105.103.66]) by smtp.gmail.com with ESMTPSA id r1sm34334093wjc.43.2016.11.01.01.37.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Nov 2016 01:37:36 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Tue, 1 Nov 2016 09:37:32 +0100 Message-Id: <1477989452-26462-1-git-send-email-yann.morin.1998@free.fr> X-Mailer: git-send-email 2.7.4 Cc: "Yann E. MORIN" , Alistair Francis Subject: [Buildroot] [PATCH] package/xen: fix build failure on x86 after bump to 4.7 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" 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" Cc: Alistair Francis [Alistair: Tested on ARMv7 (little endian) boot.] Tested-by: Alistair Francis Reviewed-by: Alistair Francis --- ...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" +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" +--- + 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 +