From patchwork Mon Mar 19 15:59:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 132049 Delivered-To: patch@linaro.org Received: by 10.80.152.129 with SMTP id j1csp2986734edb; Mon, 19 Mar 2018 09:06:22 -0700 (PDT) X-Google-Smtp-Source: AG47ELtbElngybdcJDOKiq2m8m217gvQ58/pqT/E4EODki/qCGS9AnQP3/jzvCZbzwdDGjkwajpV X-Received: by 10.98.174.23 with SMTP id q23mr7281972pff.103.1521475582181; Mon, 19 Mar 2018 09:06:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521475582; cv=none; d=google.com; s=arc-20160816; b=CGA3iJnP5zJ8R8673TmmpsSFz5VQePpAW1Tvfk0xPr4HAZG6GJGn1qvZfV3CpZBuWJ MREYmWlHGkUj42iDStX0UKsHFXJui7ogN599vJPOpYvqsxKENARfoJkJRBDRKi5B7RQn MeBr4YLj7pseUrytQnNwQfn83x1VLDQGw9rf+mt8g0Qkm1W6GxKovhDObdKt0IyqeTBu b/JtJE38j/kAgO8i32WykA5QF9Oc6+xtVTtaYKQzUTLP05QfQbIqxlSAshP0IeZYwQVr wv8fyhJcYYsryTueV/KpfdjMNJ8LsU7ou3HDbawNmMjJm/+K/00huJYYvOGSvQpxxHCn v+sg== 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=arQGsYR9Tl765IrgiMTqFjlmkdsWbonefYgglIUPwpeQOeYjN+V4ArBw8s4B2mXGTN HjI0GRLNBRNUQWBP6KhfS3GoNSsSolv8hMkgfu1yjbN/WD9lPIMtK0wShAwfVC2iH0Bv +nYRYb5+VySVbHL/Q1ocGcJYj+gGOpUIp5xGnz+NahjnCthW96wpn1GGbvruCCu+Qv86 cb6TxJqJSeg11D7AJBF8C14Y7WyCNGsmRC1J8nm06deTjn/ayu3xA/EKEvT2vkMhV11t GqfCqcgmHrLH0V4Io5ASPGnbhjtlP4eX5VQ9bbZgBfBRn2DENyvMrNuK4x2IoF1seSfT HWmA== 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 v14si176092pgo.360.2018.03.19.09.06.21; Mon, 19 Mar 2018 09:06:22 -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 492317896D; Mon, 19 Mar 2018 16:06:19 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mail.openembedded.org (Postfix) with ESMTP id 8EB5A788E6 for ; Mon, 19 Mar 2018 16:06:17 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2018 09:06:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,331,1517904000"; d="scan'208";a="35076407" Received: from kanavin-desktop.fi.intel.com ([10.237.68.161]) by FMSMGA003.fm.intel.com with ESMTP; 19 Mar 2018 09:06:16 -0700 From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Date: Mon, 19 Mar 2018 17:59:32 +0200 Message-Id: <20180319155932.6575-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 = " \