From patchwork Mon Mar 19 15:58:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Alexander Kanavin X-Patchwork-Id: 132048 Delivered-To: patch@linaro.org Received: by 10.80.152.129 with SMTP id j1csp2985989edb; Mon, 19 Mar 2018 09:05:46 -0700 (PDT) X-Google-Smtp-Source: AG47ELtG+C8lzkM7B5XXt7LMbJhHDZS0iw7GJw1KBKzrojPc1x44ZjTCoxZE9VGOYiV9bY7s+eaL X-Received: by 10.99.171.11 with SMTP id p11mr7496163pgf.176.1521475546158; Mon, 19 Mar 2018 09:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521475546; cv=none; d=google.com; s=arc-20160816; b=XARHv27CW7j1mLnSaJ9d88Hh1zxfN3InBtG+hNR5CoofnTBbZkGK2IJF8XlgdnXOFq eUKEMS2zNjUDUkKAmOwctRHzJfCJyt5RZXRmCPtTOnjuaSIpHf6sS6E6qEdssRopXFC0 IEpE45N5LiYlrl8AZjwwvAetujyzYIDOct5D1bAqbIPh/SCd1r9x2T3RYTOX49eBvNZt nr40/cfWIR54GoyFrc+Y7s1AMwss1gsRyYyex0RGKeVb9JYnuYUj/w1B+5nBK/2xHDbO A8xGkJdsUtMqNa14VatSBxPLwUtK1V7QDQykSfdimhI4LLNnWTVtSkuBCEjVPYxY00SK kZLw== 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=Gu/k9u1kFpQSZqZgeB9eFv6DWlxiFVd4q20Ujxzr36o=; b=ZZcTCuBAGHHkX0Txrbsm6XfXXYOga8XhQmuXxR0xJuTnuLi9akQ/WZEk1SxYo76kGo DgOjBTO4ae8x4CQjpid9J5nIKNQ/uipS05507EBYxnabSZIpHKLe9hXJtbaixnYu0dyL u3ZT3QZlOVPtDkTO04VwJSFf3MUBTadVea9Q7lMRX2zeP20cvfcIqWPIrcuD+h/JzbAp MCjBz9zua80GNrzwB1XNcaQKU8tp5p3tQ28zwfQzGiB/rA7h7T2Bo4g8jphYMbMx/OHE w+py7VI+xdAif0Wa6QGfAAiAXBIZsJhcQJlB8o45W/mBIQPNCgKHbsE9J/8q78zRk1Qn PrLQ== 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 c2si202510pfj.37.2018.03.19.09.05.44; Mon, 19 Mar 2018 09:05:46 -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 A63D97895F; Mon, 19 Mar 2018 16:05:41 +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 05C30788E6 for ; Mon, 19 Mar 2018 16:05:40 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Mar 2018 09:05:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,331,1517904000"; d="scan'208";a="25772228" Received: from kanavin-desktop.fi.intel.com ([10.237.68.161]) by fmsmga008.fm.intel.com with ESMTP; 19 Mar 2018 09:05:39 -0700 From: Alexander Kanavin To: openembedded-core@lists.openembedded.org Date: Mon, 19 Mar 2018 17:58:56 +0200 Message-Id: <20180319155856.6511-1-alexander.kanavin@linux.intel.com> X-Mailer: git-send-email 2.16.1 MIME-Version: 1.0 Subject: [OE-core] [morty][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.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"