From patchwork Wed Apr 4 09:19:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 132801 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp4819123ljb; Wed, 4 Apr 2018 02:26:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+vFIslu+nF4H0srJD4cNo5H2YWesf0E8b1qXy+y25ZMaugXrQD1y52Y9zBcbOPTfZ1x5YL X-Received: by 10.99.163.9 with SMTP id s9mr11495269pge.187.1522833974037; Wed, 04 Apr 2018 02:26:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522833974; cv=none; d=google.com; s=arc-20160816; b=tXJOvAXSJX04hoRSpc5w84bEEWMQ1Imoj02xH654gemWfH4WeLrrMTa1SZkc158nbn YTkAZQAvC5Nhn/bZPV9MAJMEL4CUyEWBpjo5XvI7dVKo9NMUkxnOZsSTASx4G4m9amFB rnYd4H4IPhgyRRjSG5SVUvpV1MpY70xIUuQjW/OrHhbXVm62HbM/+nu01tjaFerTsq2F F9i94qFGMX92kJVV5gpG0jww5Vrf3SUnR3Q3GwPGTd237pk7evZ83sA2ZRyj0+7MSJJ5 rzWZzGwfoBke51JXPEycNl7CdmLVb20wlEXXvA+m8Y7BQj/YMjTrIpl7tisKbOEyRrDf GtHg== 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=b8XQRgZD0R9EoPfkAMLoDIPSC79lw4AU+k2mQYRdjXg=; b=WCjPdKb6ZunR60qJK7ALZ+2KsfHIXbCSx0UDCnSht4h5GI/px7XA4OPhxNFvXg3Nxh 1Ub76kwXEjf1gy8dFDFgTkwiYHlMhM8SxF0W/PzE3PG+D3oi6NLw5VCl65S/vmLWhemR GRcK7MBhbD0FM6XHor+J80bPyIP/uSePNZHxgx+9fYgnLhMSTl4nzZ7csn8JCiCKptUP WsxNnLNYSLATeZbndt0eBP2KWaGuRuzXO+YJOeJMQp0yPyctDAq8YOg8/gj3zDmWG+JO JGS+5nTUnR1PdoaoxB1kWhk9TosD5oCYTsp1Fwcz6zOGSEYqfuhad0MEamkq6sgAod3a ro1Q== 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 h188si3410490pgc.330.2018.04.04.02.26.13; Wed, 04 Apr 2018 02:26:14 -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 57BD274605; Wed, 4 Apr 2018 09:26:09 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mail.openembedded.org (Postfix) with ESMTP id 2FD55745E3 for ; Wed, 4 Apr 2018 09:26:07 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Apr 2018 02:26:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,405,1517904000"; d="scan'208";a="43293628" Received: from kanavin-desktop.fi.intel.com ([10.237.68.161]) by fmsmga004.fm.intel.com with ESMTP; 04 Apr 2018 02:26:07 -0700 From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Date: Wed, 4 Apr 2018 12:19:39 +0300 Message-Id: <20180404091939.2826-1-alexander.kanavin@linux.intel.com> X-Mailer: git-send-email 2.16.1 MIME-Version: 1.0 Subject: [OE-core] [pyro][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.8.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.8.0.bb b/meta/recipes-devtools/qemu/qemu_2.8.0.bb index fa70009f725..41014f16634 100644 --- a/meta/recipes-devtools/qemu/qemu_2.8.0.bb +++ b/meta/recipes-devtools/qemu/qemu_2.8.0.bb @@ -31,6 +31,7 @@ SRC_URI += " \ file://0004-Add-support-for-VM-suspend-resume-for-TPM-TIS.patch \ file://CVE-2016-9908.patch \ file://CVE-2016-9912.patch \ + file://memfd.patch \ " SRC_URI_append_class-native = " \