From patchwork Thu Feb 1 22:41:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 126595 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp69931ljc; Thu, 1 Feb 2018 14:41:24 -0800 (PST) X-Google-Smtp-Source: AH8x224WxVgWAd6IX8xBii6TRvvOlnsK5cs6w63EQkrbhNMifrIJn/fC+3tjEryN3GEVqc4NT3d0 X-Received: by 10.98.103.83 with SMTP id b80mr37965657pfc.223.1517524884323; Thu, 01 Feb 2018 14:41:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517524884; cv=none; d=google.com; s=arc-20160816; b=zIeuroUPDOMMDf3hgLFjR5wXx+ynGdd7o8fJCObBMqq7hA/kyHGGZQlyRs+OdZh1Jx AQ4EcO1k2Wp6G7q6VYyMAly4A9i9J1uVHiWyf938MIQIf54LRwvBR2vaccM5o84904U0 jbuhfZrw9vAKbmPstsUkrfpdancPpXsiQ/9F7RwcMB6cif9bP+NNAUO0vqySrWPZYUOJ fybbyUzzv0wBsfaSut9/dinIqDKNvsrTjUGvjRaI/606N+cIcOBgPlBrRby7UA5UaYlr kvC0ZBDm3xCn+q3yLB/qbICr5AXTXTzhzAXQLi4q/SK23ooTGSIBK6HqTQkaQWb85JTV q/Ag== 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 :references:in-reply-to:mime-version:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=vK0lz9JIDd9Fsar/d+0lYmxPUW+d2mZrw8iGSrRTuKY=; b=Syq/ot6VDu2fDUF1yKPecxvNHUPhAETXzmbbid9qwz/SzArx/6YWbhLoizHGv4C4Lo tzn6oBBPIEqYFoqKxwfljQOertG9FfQ7vCfZOhXVW7Z0hDn2eeukgo2oKhDyzbCem81s pFP7rpBeVLaRo0TYVjlCvlWR39fZl9iPxH519URChwKvMVVBokgeM9f6kP+6BrXLsgOI f7CzMFlKk86WM4wbebTJr1wbr8ftHk0MFhRunT0ZrwGZHKFMLmMuQo0DRAoQ1PJeyQtF oZpUWZhC1khhFhRFk28JGXzGLlyo9ob9JtqqwPLzf/O6GlVy1zXC0GiaF0oFBoMD6k9y Yslg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=oUMrO5XJ; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id u32si378982pgn.770.2018.02.01.14.41.24; Thu, 01 Feb 2018 14:41:24 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=oUMrO5XJ; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id F049178875; Thu, 1 Feb 2018 22:41:21 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by mail.openembedded.org (Postfix) with ESMTP id AE4DD7886E for ; Thu, 1 Feb 2018 22:41:20 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id w69so2743387pfd.13 for ; Thu, 01 Feb 2018 14:41:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version:in-reply-to :references:content-transfer-encoding; bh=SPJyQCiAjwILAXrXYUGQlnk0GkW6IbS4LmAIxtFL+ss=; b=oUMrO5XJQ8YNd8wflQVn0VG2C8LbrX6LT07r3ho4FtebohsOExmPOsOM/se58VhZY2 eEvGFzwlWyOMm2v5uU+c1t5XM2z0k05HPQ1L4Mdaj0rJzQDvQGiOMQd9+CKZBgjBV2F+ vr+maQeadUoHFM//kT4xEDIQKjK4sFoUePPwHx5s95Qx9LqDUymm+1kTX0NSrEUeLyhF nSYyFjKtr3yPCcYByvnS9IbpJFjbRYWaLY2X4tCloBndNRdn0fkug1eh/tIUebqB7EEB QTlcQV78uzYs4u/ROAQi8exln0ogVCuwxB3b/YbMasvyUPCY9acoL+mMTv1K9p/ABxY2 BChQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :in-reply-to:references:content-transfer-encoding; bh=SPJyQCiAjwILAXrXYUGQlnk0GkW6IbS4LmAIxtFL+ss=; b=Zxij1Ih2fuivU7G6k8W/z6mtPkbWNimTmW02sh52xQJUPEIYhDeTMnOpuodINHiHrI 8Q8E16+zXgTyavUG81QZUk3V+PdBvAoUrid8gkUIrOw0B4LwO1m3yUHdP4QPqSQ6mgCW ADH12xZnIEQx1RJiQqgsyLmNAzgd6dK9npu+PnsXlqHv6DeZXnJ4uePQGHb57lS2/ne0 iv1fks44ieda/34opcHBZUpDAIg158j/u1dVomEGPW2bM4xnBWOT9PnF4uwxucy2YTmV LKczIi1kNvey68Tr8DUlvr/oNY7SkIDBdctGoY9TFDuK8de/OFDtGCG9QUyodgPUeS+0 tAqQ== X-Gm-Message-State: AKwxytcR/YtGRzg5HFt7EyQ7a9BUX1N6cjjndhZ9GEnbMwBba6HDYQW8 bK/osGFxEg34sz6sqqHTj3p29w== X-Received: by 10.99.95.4 with SMTP id t4mr28978783pgb.291.1517524881516; Thu, 01 Feb 2018 14:41:21 -0800 (PST) Received: from localhost.localdomain ([2601:646:8880:466c::6dba]) by smtp.gmail.com with ESMTPSA id p14sm452826pgu.7.2018.02.01.14.41.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 14:41:20 -0800 (PST) From: Khem Raj To: openembedded-core@lists.openembedded.org Date: Thu, 1 Feb 2018 14:41:06 -0800 Message-Id: <1c844a236f9aa0aaa73a873b2a54f8defc95891e.1517524576.git.raj.khem@gmail.com> X-Mailer: git-send-email 2.16.1 MIME-Version: 1.0 In-Reply-To: References: Subject: [OE-core] [PATCH 1/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 --- meta/recipes-devtools/qemu/qemu/memfd.patch | 57 +++++++++++++++++++++++++++++ meta/recipes-devtools/qemu/qemu_2.11.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 0000000000..62e8d3800b --- /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.11.0.bb b/meta/recipes-devtools/qemu/qemu_2.11.0.bb index ccd8917f8d..8306db2ce5 100644 --- a/meta/recipes-devtools/qemu/qemu_2.11.0.bb +++ b/meta/recipes-devtools/qemu/qemu_2.11.0.bb @@ -21,6 +21,7 @@ SRC_URI = "http://wiki.qemu-project.org/download/${BP}.tar.bz2 \ file://chardev-connect-socket-to-a-spawned-command.patch \ file://apic-fixup-fallthrough-to-PIC.patch \ file://linux-user-Fix-webkitgtk-hangs-on-32-bit-x86-target.patch \ + file://memfd.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P\d+\..*)\.tar" @@ -55,4 +56,3 @@ do_install_ptest() { sed -i -e '/wildcard config-host.mak/d' \ -e '$ {/endif/d}' ${D}${PTEST_PATH}/tests/Makefile.include } -