From patchwork Mon Mar 19 16:00:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 132050 Delivered-To: patch@linaro.org Received: by 10.80.152.129 with SMTP id j1csp2987454edb; Mon, 19 Mar 2018 09:06:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELt3MuUqgFvhknEwrrBR0FrE0Mdp6evN3TCAloJXTf0rPHCuiTjjgvJOlemjimeBooERI9Kn X-Received: by 10.99.168.68 with SMTP id i4mr9412540pgp.420.1521475618232; Mon, 19 Mar 2018 09:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521475618; cv=none; d=google.com; s=arc-20160816; b=h6o4tjfLpKpcITixyuf6tc7kE9+TEQL+wdv4lsmW2nQPKvDmAUPGn/Jq7edD4zrmae UHkrE5Xqccuz2t+AvpNoV9/koj04jyy6talR9hT7cl2czVqn7dJPNDoeDMgUwNWYUrM/ FsB7NFzdDnSONIGCgoN6bffnNsxYX+HCrLseTmumIZhleQJc5W8IAnR51QjS/kBLMtTp 8N98+Sro2653YtsrmgBUDpbAzzZidXUAKNW4UmpJYrhY+hN27mMU4MGZbHnzJ0rWChIw oG1Vd7Ff2ras9g6dhHrEO1l5XH5PxrXsbooaIQMfmdAuhVKrm/tF/M0QON6RgxQnL0ez AIaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:message-id:date:to:from:delivered-to :arc-authentication-results; bh=hC5B5KM/r6ZtLpt1OeX/zN4g+mKQ+Zl5gXc80XI3/GE=; b=K87Y9fYKlhv/3ya7eg+uDSEr/g5v5nQVCiKqveIw2oD4+KYDG0I5pE91v8M+mqjz7P prerJ2bcMJYfFm03SXycd9DyUD4iaHaz4FgGKhaM4/GhZRUZrCFomVFNKVZuu0HuMe0K d1EaFgFfuZadgpXrUoU0YBhpVyWnNSr7dxFtKe1rikZ48u07VHgsfijoF6EGKbzl9x2J GTdBKPvKYx5Xpi9GuqnZDCKxBjnnokQSVkJ80vgfTRTiSezRMS3H7+IB8qkT1rymZsq+ i3teoST4Hcpr2OrKElOd6WTvxE31gJc00YPFtnQZbvRmj8dIMUpEwyKh1iwsOgHdob9n mrUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id u16-v6si231813plq.183.2018.03.19.09.06.57; Mon, 19 Mar 2018 09:06:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 8E8ED78981; Mon, 19 Mar 2018 16:06:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mail.openembedded.org (Postfix) with ESMTP id 5C570788E6 for ; Mon, 19 Mar 2018 16:06:54 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2018 09:06:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,331,1517904000"; d="scan'208";a="184119329" Received: from kanavin-desktop.fi.intel.com ([10.237.68.161]) by orsmga004.jf.intel.com with ESMTP; 19 Mar 2018 09:06:54 -0700 From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Date: Mon, 19 Mar 2018 18:00:12 +0200 Message-Id: <20180319160012.6734-1-alexander.kanavin@linux.intel.com> X-Mailer: git-send-email 2.16.1 MIME-Version: 1.0 Subject: [OE-core] [rocko][PATCH] qemu: fix memfd_create with glibc 2.27 X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org From: Ross Burton glibc 2.27 has added memfd_create() but this conflicts with a copy in qemu, so take a patch from upstream to fix building with glibc 2.27. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Signed-off-by: Alexander Kanavin --- meta/recipes-devtools/qemu/qemu/memfd.patch | 57 +++++++++++++++++++++++++++++ meta/recipes-devtools/qemu/qemu_2.10.0.bb | 2 +- 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-devtools/qemu/qemu/memfd.patch diff --git a/meta/recipes-devtools/qemu/qemu/memfd.patch b/meta/recipes-devtools/qemu/qemu/memfd.patch new file mode 100644 index 00000000000..62e8d3800bd --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/memfd.patch @@ -0,0 +1,57 @@ +Upstream-Status: Backport +Signed-off-by: Ross Burton + +From 75e5b70e6b5dcc4f2219992d7cffa462aa406af0 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Tue, 28 Nov 2017 11:51:27 +0100 +Subject: [PATCH] memfd: fix configure test +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Recent glibc added memfd_create in sys/mman.h. This conflicts with +the definition in util/memfd.c: + + /builddir/build/BUILD/qemu-2.11.0-rc1/util/memfd.c:40:12: error: static declaration of memfd_create follows non-static declaration + +Fix the configure test, and remove the sys/memfd.h inclusion since the +file actually does not exist---it is a typo in the memfd_create(2) man +page. + +Cc: Marc-André Lureau +Signed-off-by: Paolo Bonzini +--- + configure | 2 +- + util/memfd.c | 4 +--- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/configure b/configure +index 9c8aa5a98b..99ccc1725a 100755 +--- a/configure ++++ b/configure +@@ -3923,7 +3923,7 @@ fi + # check if memfd is supported + memfd=no + cat > $TMPC << EOF +-#include ++#include + + int main(void) + { +diff --git a/util/memfd.c b/util/memfd.c +index 4571d1aba8..412e94a405 100644 +--- a/util/memfd.c ++++ b/util/memfd.c +@@ -31,9 +31,7 @@ + + #include "qemu/memfd.h" + +-#ifdef CONFIG_MEMFD +-#include +-#elif defined CONFIG_LINUX ++#if defined CONFIG_LINUX && !defined CONFIG_MEMFD + #include + #include + +-- +2.11.0 diff --git a/meta/recipes-devtools/qemu/qemu_2.10.0.bb b/meta/recipes-devtools/qemu/qemu_2.10.0.bb index a9b4939b049..bdf6c21f877 100644 --- a/meta/recipes-devtools/qemu/qemu_2.10.0.bb +++ b/meta/recipes-devtools/qemu/qemu_2.10.0.bb @@ -29,6 +29,7 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \ file://CVE-2017-13672.patch \ file://CVE-2017-14167.patch \ file://ppc_locking.patch \ + file://memfd.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P\d+\..*)\.tar" @@ -60,4 +61,3 @@ do_install_ptest() { cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests } -