aboutsummaryrefslogtreecommitdiffstats
path: root/meta-boot2qt-distro/recipes-devtools
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2020-12-10 09:38:33 +0200
committerSamuli Piippo <samuli.piippo@qt.io>2020-12-18 14:55:13 +0200
commit7031f145b3ec262269bda1e90055a8db00c600e2 (patch)
tree6c2969e05c1b1c011781ed4d7e769ce5cdcdb15a /meta-boot2qt-distro/recipes-devtools
parent814ac1bee875b20434bc4bd6dad31bd454f52f10 (diff)
Update toolchain for CI usage
Include Qt modules to get all the dependencies into the toolchain, but exclude all development packages for the Qt modules as they will interfere with the Qt builds when done in the CI. Move the madvice patch from CI provisionin to the qemu recipe, which is needed for QML tests to pass. Change-Id: Iff14f0036040e662dc6529bdccf3e4878df1d772 Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
Diffstat (limited to 'meta-boot2qt-distro/recipes-devtools')
-rw-r--r--meta-boot2qt-distro/recipes-devtools/qemu/qemu/0001-linux-user-add-support-for-MADV_DONTNEED.patch62
-rw-r--r--meta-boot2qt-distro/recipes-devtools/qemu/qemu_%.bbappend33
2 files changed, 95 insertions, 0 deletions
diff --git a/meta-boot2qt-distro/recipes-devtools/qemu/qemu/0001-linux-user-add-support-for-MADV_DONTNEED.patch b/meta-boot2qt-distro/recipes-devtools/qemu/qemu/0001-linux-user-add-support-for-MADV_DONTNEED.patch
new file mode 100644
index 00000000..d56e6a64
--- /dev/null
+++ b/meta-boot2qt-distro/recipes-devtools/qemu/qemu/0001-linux-user-add-support-for-MADV_DONTNEED.patch
@@ -0,0 +1,62 @@
+From 8fa39dc69b2565e3932979bbe89b24059715ddf8 Mon Sep 17 00:00:00 2001
+From: Simon Hausmann <simon.hausmann@qt.io>
+Date: Fri, 24 Aug 2018 10:38:29 +0200
+Subject: [PATCH] linux-user: add support for MADV_DONTNEED
+
+Most flags to madvise() are just hints, so typically ignoring the
+syscall and returning okay is fine. However applications exist that do
+rely on MADV_DONTNEED behavior to guarantee that upon subsequent access
+the mapping is refreshed from the backing file or zero for anonymous
+mappings.
+---
+ linux-user/mmap.c | 13 +++++++++++++
+ linux-user/qemu.h | 1 +
+ linux-user/syscall.c | 2 +-
+ 3 files changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/linux-user/mmap.c b/linux-user/mmap.c
+index 46a6e3a7..da9edc1e 100644
+--- a/linux-user/mmap.c
++++ b/linux-user/mmap.c
+@@ -767,3 +767,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
+ mmap_unlock();
+ return new_addr;
+ }
++
++int target_madvise(abi_ulong start, abi_ulong len, int flags)
++{
++ /* A straight passthrough may not be safe because qemu sometimes
++ turns private file-backed mappings into anonymous mappings.
++ Most flags are hints, except for MADV_DONTNEED that applications
++ may rely on to zero out pages, so we pass that through.
++ Otherwise returning success is ok. */
++ if (flags & MADV_DONTNEED) {
++ return madvise(g2h(start), len, MADV_DONTNEED);
++ }
++ return 0;
++}
+diff --git a/linux-user/qemu.h b/linux-user/qemu.h
+index f6f5fe5f..3d1d8716 100644
+--- a/linux-user/qemu.h
++++ b/linux-user/qemu.h
+@@ -441,6 +441,7 @@ int target_munmap(abi_ulong start, abi_ulong len);
+ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
+ abi_ulong new_size, unsigned long flags,
+ abi_ulong new_addr);
++int target_madvise(abi_ulong start, abi_ulong len, int flags);
+ extern unsigned long last_brk;
+ extern abi_ulong mmap_next_start;
+ abi_ulong mmap_find_vma(abi_ulong, abi_ulong, abi_ulong);
+diff --git a/linux-user/syscall.c b/linux-user/syscall.c
+index 171c0cae..a4b72f51 100644
+--- a/linux-user/syscall.c
++++ b/linux-user/syscall.c
+@@ -11035,7 +11035,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
+ turns private file-backed mappings into anonymous mappings.
+ This will break MADV_DONTNEED.
+ This is a hint, so ignoring and returning success is ok. */
+- return 0;
++ return get_errno(target_madvise(arg1, arg2, arg3));
+ #endif
+ #if TARGET_ABI_BITS == 32
+ case TARGET_NR_fcntl64:
diff --git a/meta-boot2qt-distro/recipes-devtools/qemu/qemu_%.bbappend b/meta-boot2qt-distro/recipes-devtools/qemu/qemu_%.bbappend
new file mode 100644
index 00000000..b09058c9
--- /dev/null
+++ b/meta-boot2qt-distro/recipes-devtools/qemu/qemu_%.bbappend
@@ -0,0 +1,33 @@
+############################################################################
+##
+## Copyright (C) 2020 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
+##
+## This file is part of the Boot to Qt meta layer.
+##
+## $QT_BEGIN_LICENSE:GPL$
+## Commercial License Usage
+## Licensees holding valid commercial Qt licenses may use this file in
+## accordance with the commercial license agreement provided with the
+## Software or, alternatively, in accordance with the terms contained in
+## a written agreement between you and The Qt Company. For licensing terms
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
+##
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 or (at your option) any later version
+## approved by the KDE Free Qt Foundation. The licenses are as published by
+## the Free Software Foundation and appearing in the file LICENSE.GPL3
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
+##
+## $QT_END_LICENSE$
+##
+############################################################################
+
+FILESEXTRAPATHS_append := "${THISDIR}/${PN}:"
+SRC_URI += " \
+ file://0001-linux-user-add-support-for-MADV_DONTNEED.patch \
+"