From patchwork Wed Apr 4 09:33:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 132802 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp4830119ljb; Wed, 4 Apr 2018 02:40:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Jeqzo6J1C+8rKC2Jx8Jia2MVUZIuYArXIiRK78jyQPGYdRVjyHwO98fPtIVfwlbH7PWSl X-Received: by 2002:a17:902:64cf:: with SMTP id y15-v6mr18159835pli.49.1522834808434; Wed, 04 Apr 2018 02:40:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522834808; cv=none; d=google.com; s=arc-20160816; b=wzhm6Oj6oyG33HYZRy3EJhiafoqzeX/QYF28jC9aKCGhZdXRosRgYsXbYJ/cnNV+v8 vfDW6ByE6cMDFSVZQTjnk7ZEoybxb9BF4EuYOqwVxLzkV9OGwnPZq0tIo0xxvd9VliBj 8QI/8Vs2ZqHBHesjn0Jd9RJ5GwQDasAlXdFEUvWJJk7xOj+oCpArN817w5giJYbxaifs tcgChp5VVamFB+gCWZNaX7Uf5B40JUjPd1myPZpVv2WyESMsMMP68RBnLAMT1vlfGKYI hGy71N3NFmpTfeFnVrI1/jTIlzJoSBds4PquwwmfmKZ/egUA2W9FLybRDTO8mzs4uuJO a5Cg== 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:references:in-reply-to:message-id:date:to:from :delivered-to:arc-authentication-results; bh=Gu/k9u1kFpQSZqZgeB9eFv6DWlxiFVd4q20Ujxzr36o=; b=wMGX8me0L6sdkZcOa/G/rSERj5lgN2lJ8ACivg+DMC5zTTAHiLknrBrmq+Pn0VYbSQ JLZ14BjnkQZbmOzYHyWw3+1dwCSm/bQpbHwzLJzxJuNjMQXCSzbLaHT6WvjJqSKdL3fL UjsqJluCK9jalnK/b3FFdRSEWonmdXPmxABgXQJsnIUvO+eQS48SWbUAD8rikmdMhDxR cHc7/1ZCle7VwIid8KHX/MAvLoL7Z1BrDlLAm6YuFalrIdpvTo9FhVWeZuH4n3LoXCl8 nsGAVueR5NSrBf/prv7K4Ko7RKVoKR3LMSV7GNoqDVbIoszqVQvzvRYpINf/na7WQ4t9 NWCQ== 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 f3-v6si3023629plm.433.2018.04.04.02.40.08; Wed, 04 Apr 2018 02:40:08 -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 56D42746C6; Wed, 4 Apr 2018 09:40:05 +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 B096074604 for ; Wed, 4 Apr 2018 09:39:59 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2018 02:40:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,405,1517904000"; d="scan'208";a="30914170" Received: from kanavin-desktop.fi.intel.com ([10.237.68.161]) by orsmga008.jf.intel.com with ESMTP; 04 Apr 2018 02:39:59 -0700 From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Date: Wed, 4 Apr 2018 12:33:31 +0300 Message-Id: <20180404093331.22593-2-alexander.kanavin@linux.intel.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180404093331.22593-1-alexander.kanavin@linux.intel.com> References: <20180404093331.22593-1-alexander.kanavin@linux.intel.com> MIME-Version: 1.0 Subject: [OE-core] [morty][PATCH 2/2] 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.7.0.bb | 1 + 2 files changed, 58 insertions(+) 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.7.0.bb b/meta/recipes-devtools/qemu/qemu_2.7.0.bb index 85aadecf09c..65ae539dc4f 100644 --- a/meta/recipes-devtools/qemu/qemu_2.7.0.bb +++ b/meta/recipes-devtools/qemu/qemu_2.7.0.bb @@ -14,6 +14,7 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \ file://0003-fix-CVE-2016-7908.patch \ file://0004-fix-CVE-2016-7909.patch \ file://04b33e21866412689f18b7ad6daf0a54d8f959a7.patch \ + file://memfd.patch \ " SRC_URI_prepend = "http://wiki.qemu-project.org/download/${BP}.tar.bz2"