From patchwork Thu Sep 3 08:31:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=u2tlUM6K; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvG73Ttvz9sSP for ; Thu, 3 Sep 2020 18:33:19 +1000 (AEST) Received: from localhost ([::1]:58548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkgH-00008D-Da for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:33:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53994) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkf8-0007d1-CT for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:06 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:54911) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkf6-0001Vj-Oe for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:06 -0400 Received: by mail-pj1-x1042.google.com with SMTP id mm21so1161640pjb.4 for ; Thu, 03 Sep 2020 01:32:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W6KPp+bY7QhvrPjQuzc5G0s+mWhPDfMNCdKRNThSh6I=; b=u2tlUM6KWeJMwrsPAvNqvjEZWiWZShEhzgvWsgfnqkFfI0YEhQsrnNhH/LA0fn1wAV Cfr4mGZJisBtV38LCA1Bq7ZK3VZ+uCcLBkhTaniPgNbOdxdaKkGFFuddAkKtyyanxli9 720Vod65rvHylQNGiPtsn5aW2WUTtpEejtSb4vRNVjPw1O6e32OCfWZKpB0nl7zyEnY9 H2YyztR3bAZMSRM83i0DzVHkdpocgYmmqcjnbqgfg2x3yKhbLB0L1lBpbCs4SagvOuH/ YXWxsMu18DiI/UzpleJuff7lSUGEB35iYt4vdN1/L69Ye2SkKWgGa9JMa3FGroNNYt36 4bhw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=W6KPp+bY7QhvrPjQuzc5G0s+mWhPDfMNCdKRNThSh6I=; b=o3Nk1eXVGCOGeKvQcQSCxv9LiUOQN3cwNeaZAZCLJYppz0Mx3+6qDx+WK8komNbp+k ZUlKlDz2W+8HQY7ZvWkt20uDw5pRapx/6UUGc036G5j8L8pH96fbpuuD6Lvxh8WaJCby 0U0h42ZCSZ1ocDbsKRZtHcnfbA0vvsVoOuJKrxwmjeyTtmtkA8tvmo36zi+KpirpX5tv akYniN+SQRUj6T0ZBeKkEo/B4pAz9zy5BEyX7pt5QyJ9gu6QE9Fw13+zCok07JdThS9S 6DK/4n1BEY1vG3z2B0eCGshuwzAwqSTM/yPNi2+Je98OXWzeN/A8H3JmhuQg8tVMMtrn orvg== X-Gm-Message-State: AOAM532vPPdcxjlO0gDLDqBweVmM6osMo0RLqT9a6jTDhX0vP7A2L/JE pIbbmpTPs6tCIea474cOZXIHaMP+LXM0Stvz X-Google-Smtp-Source: ABdhPJzpwc/AgVeQVea2//zxbar2sYfkfhycQpG2yYXv17W5dR1tTc+yti73t4f/bjiyMK+8qzLirg== X-Received: by 2002:a17:90a:880e:: with SMTP id s14mr2235609pjn.140.1599121922742; Thu, 03 Sep 2020 01:32:02 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:02 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 01/12] configure: fixes dtc not cloned when running msys2 CI Date: Thu, 3 Sep 2020 16:31:36 +0800 Message-Id: <20200903083147.707-2-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1042.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Symlink dtc after git submodule update, because on win32 symlink to non-exist folder are forbidden. Signed-off-by: Yonggang Luo --- configure | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 8a3acef89d..30f8c4db29 100755 --- a/configure +++ b/configure @@ -2053,9 +2053,6 @@ fi if test "$meson" = git; then git_submodules="${git_submodules} meson" fi -if test "$git_update" = yes; then - (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh" update "$git_submodules") -fi case "$meson" in git | internal) @@ -4261,9 +4258,6 @@ EOF if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.git" ; then fdt=git mkdir -p dtc - if [ "$pwd_is_source_path" != "y" ] ; then - symlink "$source_path/dtc/Makefile" "dtc/Makefile" - fi fdt_cflags="-I${source_path}/dtc/libfdt" fdt_ldflags="-L$PWD/dtc/libfdt" fdt_libs="$fdt_libs" @@ -6593,6 +6587,16 @@ if test "$cpu" = "s390x" ; then fi fi +if test $git_update = 'yes' ; then + (cd "${source_path}" && GIT="$git" "./scripts/git-submodule.sh" update "$git_submodules") + + if test "$fdt" = "git" ; then + if [ "$pwd_is_source_path" != "y" ] ; then + symlink "$source_path/dtc/Makefile" "dtc/Makefile" + fi + fi +fi + # Check that the C++ compiler exists and works with the C compiler. # All the QEMU_CXXFLAGS are based on QEMU_CFLAGS. Keep this at the end to don't miss any other that could be added. if has $cxx; then From patchwork Thu Sep 3 08:31:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356428 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=U+/m3NZN; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvFZ4rnSz9sSP for ; Thu, 3 Sep 2020 18:32:50 +1000 (AEST) Received: from localhost ([::1]:56698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkfo-0007le-GZ for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:32:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfA-0007i5-Sr for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:08 -0400 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]:46232) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkf8-0001Vy-Tu for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:08 -0400 Received: by mail-pf1-x432.google.com with SMTP id b124so1698366pfg.13 for ; Thu, 03 Sep 2020 01:32:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=khVmfuvTdyvS7QBmYXBUkXeRmJb4FrO0KFERex1f1TA=; b=U+/m3NZNlc1pfFZqoLNgskTiXKs1ZMecZI8gDN4POkgRjXmlTndGM+9P+DVVagEME7 t4shwbNJqU8Tt7W2hoEBztuYQrfFrcj2WhRoYz8qDeP9qTaMm0DQqTFjeGUy7lb+KTDT 6rlDbA6BhIlJquJzJo3kUI4ANH1q7Xkvp7JTcBNOafsu+RUtRTtlDuUuJ/PadS7F+RQb I8WOHxh2VZJN+PkiSBD92w7aIm0WG2vd6agC2lrc/a9voUTKFRR479NlwJaAgWmBGDwA WBeL05pLEEfKhcfECdD2roHkKguUhWbL1av6W73w/mEKqcl+3h3V7tLVkH6OtT2Vtsb+ 4atw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=khVmfuvTdyvS7QBmYXBUkXeRmJb4FrO0KFERex1f1TA=; b=Kc2EXtLIuVKNIEp8KM6Ef5KRKVFiFvMl0TnVHzYKVm9/dl3xAFt6YBWHxfblHmEjo/ GOPn0lF1NmplAx88G+k+STI9uYis1sqJGto9xEqmJ4dMRDITU98LeVxowEpev63u/XSB G6ksSlf+UP6XKimqHzj61g0JXsci5JWtXx2Kx2segJ6yrHQYzm1nIOukq094Yi7Gh77Y 0XSHs4fDUnhEBingDThE+rMwNOsEc4bXBHAgPplW+gquge+98/rMQNF25RQmyHOtrFo5 cMyBmXauTitcx+anMB5Z+ZvLnNfLhld4vJa0KuH/OT1IaXvHFa2Ve79nTF7b8M2mIi/0 67Dw== X-Gm-Message-State: AOAM533Vjy6tC4OpnrDaCZcoGmcLXunXCQWkbdTtZ6D4i0hk/BxWAcGd eSSSn1b3wo22ITJPQtDfSyDlwLcJAKGetvO/ X-Google-Smtp-Source: ABdhPJwY/tnEQnLIL6ZjcD6ACzS5uXb0RnWsMY51Lc8iOjPswnrWRhF7vOrCsBSpjh3b0RVd9Ug0uQ== X-Received: by 2002:a17:902:bc44:: with SMTP id t4mr1984703plz.77.1599121924811; Thu, 03 Sep 2020 01:32:04 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:04 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 02/12] meson: Convert undefsym.sh to undefsym.py Date: Thu, 3 Sep 2020 16:31:37 +0800 Message-Id: <20200903083147.707-3-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x432.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" undefsym.sh are not msys2 compatible, convert it to python script Signed-off-by: Yonggang Luo --- meson.build | 2 +- scripts/undefsym.py | 57 +++++++++++++++++++++++++++++++++++++++++++++ scripts/undefsym.sh | 20 ---------------- 3 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 scripts/undefsym.py delete mode 100755 scripts/undefsym.sh diff --git a/meson.build b/meson.build index 55c7d2318c..c9f5d05664 100644 --- a/meson.build +++ b/meson.build @@ -863,7 +863,7 @@ foreach d, list : modules endforeach nm = find_program('nm') -undefsym = find_program('scripts/undefsym.sh') +undefsym = find_program('scripts/undefsym.py') block_syms = custom_target('block.syms', output: 'block.syms', input: [libqemuutil, block_mods], capture: true, diff --git a/scripts/undefsym.py b/scripts/undefsym.py new file mode 100644 index 0000000000..c690f88c7a --- /dev/null +++ b/scripts/undefsym.py @@ -0,0 +1,57 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Before a shared module's DSO is produced, a static library is built for it +# and passed to this script. The script generates -Wl,-u options to force +# the inclusion of symbol from libqemuutil.a if the shared modules need them, +# This is necessary because the modules may use functions not needed by the +# executable itself, which would cause the function to not be linked in. +# Then the DSO loading would fail because of the missing symbol. + + +""" +Compare the static library with the shared module for compute the symbol duplication +""" + +import sys +import subprocess + +def filter_lines_set(stdout, is_static = True): + linesSet = set() + for line in stdout.splitlines(): + tokens = line.split(b' ') + if len(tokens) >= 1: + if len(tokens) > 1: + if is_static and tokens[1] == b'U': + continue + if not is_static and tokens[1] != b'U': + continue + new_line = b'-Wl,-u,' + tokens[0] + if not new_line in linesSet: + linesSet.add(new_line) + return linesSet + +def main(args): + if len(args) <= 3: + sys.exit(0) + + nm = args[1] + staticlib = args[2] + pc = subprocess.run([nm, "-P", "-g", staticlib], stdout=subprocess.PIPE) + if pc.returncode != 0: + sys.exit(-1) + lines_set_left = filter_lines_set(pc.stdout) + + shared_modules = args[3:] + pc = subprocess.run([nm, "-P", "-g"] + shared_modules, stdout=subprocess.PIPE) + if pc.returncode != 0: + sys.exit(-1) + lines_set_right = filter_lines_set(pc.stdout, False) + lines = [] + for line in sorted(list(lines_set_right)): + if line in lines_set_left: + lines.append(line) + sys.stdout.write(b'\n'.join(lines).decode()) + +if __name__ == "__main__": + main(sys.argv) diff --git a/scripts/undefsym.sh b/scripts/undefsym.sh deleted file mode 100755 index b9ec332e95..0000000000 --- a/scripts/undefsym.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /usr/bin/env bash - -# Before a shared module's DSO is produced, a static library is built for it -# and passed to this script. The script generates -Wl,-u options to force -# the inclusion of symbol from libqemuutil.a if the shared modules need them, -# This is necessary because the modules may use functions not needed by the -# executable itself, which would cause the function to not be linked in. -# Then the DSO loading would fail because of the missing symbol. - -if test $# -le 2; then - exit 0 -fi - -NM=$1 -staticlib=$2 -shift 2 -# Find symbols defined in static libraries and undefined in shared modules -comm -12 \ - <( $NM -P -g $staticlib | awk '$2!="U"{print "-Wl,-u," $1}' | sort -u) \ - <( $NM -P -g "$@" | awk '$2=="U"{print "-Wl,-u," $1}' | sort -u) From patchwork Thu Sep 3 08:31:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356432 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=RsHWqg2R; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvJB0MG2z9sSP for ; Thu, 3 Sep 2020 18:35:06 +1000 (AEST) Received: from localhost ([::1]:38228 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkhz-0003RA-T2 for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:35:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfC-0007lN-Mr for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:10 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:35876) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfA-0001W7-R4 for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:10 -0400 Received: by mail-pf1-x442.google.com with SMTP id m8so1734543pfh.3 for ; Thu, 03 Sep 2020 01:32:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fCP0cNZ4D2nuzBkSSr3MTW3OAB9zlS/A3EmERAQOTPw=; b=RsHWqg2RXKdG7w1y6mIg4rgQUXKqu+OyjzxIdA+OyTN8bouQU+EdPpHIn4zF3Rd1D/ kfQtJuLwcL7uqpyP4jupzKHGEORhQjpbXb6ysDXaLyLV0yCr2KdmjHYr/RGEyBOr50nA gUvliVq+PPyj0xrKPoZocHEaaOm36J1RP5QZFyjH3DRyBoyWj0AeO5dJXpwMh7kb/oUS J3VY/SPwwM+ILCRRsVHQ14VyoiJhvHK2HjIonA9tG8+8TOiBdXzelniBxWfJ9kdP3tkC XHXX5EZR1Mzs9EF9qPmrx+gL8JZf41sHplhRvsxUEb0SATMjOGeXJS6dYW1tVMohCmEe f81Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=fCP0cNZ4D2nuzBkSSr3MTW3OAB9zlS/A3EmERAQOTPw=; b=ugfaWYYe71Fcf6Viq8GnOuxQcEyBXIQd/L57G1LBUfV10PMzSJk/+t8DNQ3LKnz5OW pV1uqz6ZhgBfptDmyLu4oJBqVYO06J6x6v3ZoUDF1lZnssZgkQ9vQbeKXrPsVNdsFXiJ Ws8toZydFFfeGCrjfIHAPfIpAJyBCxEgI92jVOobWTAWAfAXNQ3pGoImuUth57uI/IyT 9R3iXoOeImfLCd0EzFG45mBvF3kRSWTvVfNWRTBfrwy86wWixcGIDwfR+8vYuOhPIJxr 789vBo7I9u7JCyxym9iS7LC3qiPBNOuBo0+ecRCqK6hJOiAm0bVmxjMTeGUxNHcDQ+w3 GHgw== X-Gm-Message-State: AOAM531SxgeO37wzzrUf7kp4QdmCVIf18UkExkfcwZ/F+PGvq7TcqdzJ CiCY4zl+k6vwSSkKaPF+ioaWOuNKr3/KXLRG X-Google-Smtp-Source: ABdhPJwB3L4tLXw8mkrTnDYTokXYotLrDFHhiVJdP8Swf25X2QOqerGeHWuB08gT2yU4nK6oF1j/EQ== X-Received: by 2002:a17:902:6ac9:: with SMTP id i9mr2846337plt.128.1599121927044; Thu, 03 Sep 2020 01:32:07 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:06 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 03/12] tcg: Fixes dup_const link error Date: Thu, 3 Sep 2020 16:31:38 +0800 Message-Id: <20200903083147.707-4-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Rename function dup_const to dup_const_eval for avoid confliction with macro dup_const The link error on msys2 Linking target qemu-system-alpha.exe C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libqemu-alpha-softmmu.fa.p/tcg_optimize.c.obj: in function `tcg_optimize': E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/optimize.c:1106: undefined reference to `dup_const' C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libqemu-alpha-softmmu.fa.p/tcg_tcg-op-vec.c.obj: in function `tcg_gen_dupi_vec': E:\CI-Cor-Ready\xemu\qemu-build/../qemu.org/tcg/tcg-op-vec.c:283: undefined reference to `dup_const' collect2.exe: error: ld returned 1 exit status Signed-off-by: Yonggang Luo --- include/tcg/tcg.h | 6 +++--- tcg/tcg-op-gvec.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 53ce94c2c5..7f6fe8454b 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -1251,15 +1251,15 @@ static inline int tcg_can_emit_vec_op(TCGOpcode o, TCGType t, unsigned ve) void tcg_expand_vec_op(TCGOpcode, TCGType, unsigned, TCGArg, ...); /* Replicate a constant C accoring to the log2 of the element size. */ -uint64_t dup_const(unsigned vece, uint64_t c); +uint64_t dup_const_eval(unsigned vece, uint64_t c); #define dup_const(VECE, C) \ (__builtin_constant_p(VECE) \ ? ( (VECE) == MO_8 ? 0x0101010101010101ull * (uint8_t)(C) \ : (VECE) == MO_16 ? 0x0001000100010001ull * (uint16_t)(C) \ : (VECE) == MO_32 ? 0x0000000100000001ull * (uint32_t)(C) \ - : dup_const(VECE, C)) \ - : dup_const(VECE, C)) + : dup_const_eval(VECE, C)) \ + : dup_const_eval(VECE, C)) /* diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index 3707c0effb..cbb6cd04bc 100644 --- a/tcg/tcg-op-gvec.c +++ b/tcg/tcg-op-gvec.c @@ -359,7 +359,7 @@ static inline bool check_size_impl(uint32_t oprsz, uint32_t lnsz) static void expand_clr(uint32_t dofs, uint32_t maxsz); /* Duplicate C as per VECE. */ -uint64_t (dup_const)(unsigned vece, uint64_t c) +uint64_t dup_const_eval(unsigned vece, uint64_t c) { switch (vece) { case MO_8: From patchwork Thu Sep 3 08:31:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=KuSHpXP+; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvHV2D1Sz9sSP for ; Thu, 3 Sep 2020 18:34:30 +1000 (AEST) Received: from localhost ([::1]:35670 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkhQ-0002Mt-4J for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:34:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54042) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfE-0007qR-Pw for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:12 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:35878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfD-0001WL-3S for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:12 -0400 Received: by mail-pf1-x444.google.com with SMTP id m8so1734650pfh.3 for ; Thu, 03 Sep 2020 01:32:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AOceDgUhJcFyubHw/+EMBFvN3cPEnFJXi8B+bZPhtpU=; b=KuSHpXP+Hp2FKf1lkcuSX/rC4uM9ATNb1h3KibdxC6BWAMa1AERJrAP0JgtlqyiWHF n5FZ3GEXkUL9GxT11q3pH1ruEnoVVYipJ0uRPYO0hoUwThfyJv/dC5Sv0N3Qa0MhQrPg 2FP5gKcvUGjMcx7TY91taniik4xQmp8Q1IGyqH/eS57+HsZXYpMU7lAPiPFomK0qhpX2 ezm5fKV6wSAE/e3o92rnYuliDvQSUbaXbljAOPC8RAKE05m4yPG1g+6r5p7HPP4Cc30h cZbTDm59OjL2I9SGBrRxgkeI0zzZzyD3lhZ8Csa8Zsj7IV70lgLsoSyYZQlg5WNzABwY 5i/g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=AOceDgUhJcFyubHw/+EMBFvN3cPEnFJXi8B+bZPhtpU=; b=pl/Sau+DBoKtqy6mjV+qQuNQlGfGMSh2D0r9jMJ4P/NSRRYArFOEjrl9aTRumDnSAC JDJb/IGAkT/LQSDQUhJpwS4PrLu0xJ6KMv+/b1iNC58T9tXDMIga5CyxxLooQqG2kjRY KNxSkU5YJEmToRqUS+12XDxjfUzLAaMXR13TbsRklj5dsg3a0czqwCyvnHVeiKb1Crse h279wVgDy7WUogj6tkNkeHKhm36MwdTuBlvvn4WMOb7g5ZzxQiVtIMY7mX3jyrHFalvo zOkV/m7gu35lyL+eY1kfQpsgIdTxXQLUkzUylz9ldcjfagchrjHYq9kbBJCI8XP22YYg phVg== X-Gm-Message-State: AOAM5328wCKZBfWurK06rnYySVopjuwSJTfRGHGvNHZVh0ikgF2svpDL Zt4L6YL3wjax+Ggmz2ASrvFmQpcekGJBgfms X-Google-Smtp-Source: ABdhPJwJLnR0mcQQoaJgtxkDdnKxegY88kLlIBdatdhrbyWq437AbISdzn6hAGwMlWf1JPQJwmrTRg== X-Received: by 2002:a17:902:e787:: with SMTP id cp7mr2816717plb.125.1599121929347; Thu, 03 Sep 2020 01:32:09 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:08 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 04/12] tests: handling signal on win32 properly Date: Thu, 3 Sep 2020 16:31:39 +0800 Message-Id: <20200903083147.707-5-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" SIGABRT should use signal(SIGABRT, sigabrt_handler) to handle on win32 The error: E:/CI-Cor-Ready/xemu/qemu.org/tests/test-replication.c:559:33: error: invalid use of undefined type 'struct sigaction' 559 | sigact = (struct sigaction) { | ^ Signed-off-by: Yonggang Luo --- tests/test-replication.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test-replication.c b/tests/test-replication.c index e0b03dafc2..9ab3666a90 100644 --- a/tests/test-replication.c +++ b/tests/test-replication.c @@ -554,6 +554,9 @@ static void sigabrt_handler(int signo) static void setup_sigabrt_handler(void) { +#ifdef _WIN32 + signal(SIGABRT, sigabrt_handler); +#else struct sigaction sigact; sigact = (struct sigaction) { @@ -562,6 +565,7 @@ static void setup_sigabrt_handler(void) }; sigemptyset(&sigact.sa_mask); sigaction(SIGABRT, &sigact, NULL); +#endif } int main(int argc, char **argv) From patchwork Thu Sep 3 08:31:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356433 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=UecifaYj; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvK85nZ6z9sSP for ; Thu, 3 Sep 2020 18:35:56 +1000 (AEST) Received: from localhost ([::1]:41526 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkio-0004lW-Ky for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:35:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfJ-000815-8r for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:17 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:46994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfH-0001XA-Dm for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:16 -0400 Received: by mail-pf1-x441.google.com with SMTP id b124so1698727pfg.13 for ; Thu, 03 Sep 2020 01:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=voK9C8LiSWL+Sm9aw369V+YjsDRfz05KST8rSNgg5Yw=; b=UecifaYjE9GcSWUSF9N1tLjhA+cZsMLg2kcs0qDM1722DxUXQyJMfS4Y28AqFcK5Ve apIIxrH7idFQCZN3JBeP6jCmiTRt7ViWrIdCCh3vykKn39OEn7aM8zBiakcR1Aaity9T R9wtiTZgSTPB+UXDCV3A03PsaA0TUAifBBL35AfudFzXLhVuBVYMXDkdATfIuSp2LBy4 dOslYXE4s4q7uDPmJQ7Jt01CyutEb/QmYeqqdto5AE9zansbGUV4KR6kDWnJwP3PYFYL HJ6oSN+0PgOhu3W6Xh8gd0GvPajfRcKYs20ScbeVtQ+w28152vkYrE6oNs8H2t7vhWYv 06kw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=voK9C8LiSWL+Sm9aw369V+YjsDRfz05KST8rSNgg5Yw=; b=iX8UydwiCkuQrCpWxf1IWKIQGP8tcJ47RMOBZ3DMabyJqD1CosytQGg6Tv2yFzdtRz KM2I95IJ7FGuZ7JTTUWG832TsYBJKcbWk/oeIYpGQpdP9/FqWll6Mu6GA9OMfCIEqtFK 8BBosQ1R4dnUk15q5U6DAihculUu20ZJJTFMkj8Jc2lLVtZYtuoNmT3fMdP/RQORQGPp d4J2JVZAM1s7vYFXy+fyJz/wnfyu+haISJhIhJ0GGBldFe1OT5q01bbWkO9xsTb0KFAo NPWzlXJa+cPB1aSUcBHQgE+WXsMMyBFosIBqrhaxcHqCnamZhTIa/s7uDucxR07Msw8v RBDg== X-Gm-Message-State: AOAM533LwEw/5SiZQ3J6QBNray168RRipRtqiXhG0r+N6hFdgV3sZ/Gk u2CbRBj84IzM2RXeMeaRJ6/yqK6pCNvFJCJX X-Google-Smtp-Source: ABdhPJzuPzccfJ9n3HTblO9AeBYT1UfxblO/Calkraw50nPagKPG4SjkLO8S9cFEV3HqhTxQFfWstg== X-Received: by 2002:a62:8443:: with SMTP id k64mr2720150pfd.252.1599121931510; Thu, 03 Sep 2020 01:32:11 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:10 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 05/12] configure: Fix include and linkage issue on msys2 Date: Thu, 3 Sep 2020 16:31:40 +0800 Message-Id: <20200903083147.707-6-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::441; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" On msys2, the -I/e/path/to/qemu -L/e/path/to/qemu are not recognized by the compiler Cause $PWD are result posix style path such as /e/path/to/qemu that can not be recognized by mingw gcc, and `pwd -W` are result Windows style path such as E:/path/to/qemu that can be recognized by the mingw gcc. So we replace all $PWD with $build_path that can building qemu under msys2/mingw environment. Signed-off-by: Yonggang Luo --- configure | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 30f8c4db29..5f2bcc4b57 100755 --- a/configure +++ b/configure @@ -13,8 +13,13 @@ export CCACHE_RECACHE=yes # make source path absolute source_path=$(cd "$(dirname -- "$0")"; pwd) +build_path=$PWD +if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then +source_path=$(cd "$(dirname -- "$0")"; pwd -W) +build_path=`pwd -W` +fi -if test "$PWD" = "$source_path" +if test "$build_path" = "$source_path" then echo "Using './build' as the directory for build output" @@ -346,7 +351,12 @@ ld_has() { $ld --help 2>/dev/null | grep ".$1" >/dev/null 2>&1 } -if printf %s\\n "$source_path" "$PWD" | grep -q "[[:space:]:]"; +check_valid_build_path="[[:space:]:]" +if [ "$MSYSTEM" = "MINGW64" -o "$MSYSTEM" = "MINGW32" ]; then +check_valid_build_path="[[:space:]]" +fi + +if printf %s\\n "$source_path" "$build_path" | grep -q "$check_valid_build_path"; then error_exit "main directory cannot contain spaces nor colons" fi @@ -943,7 +953,7 @@ Linux) linux="yes" linux_user="yes" kvm="yes" - QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I$PWD/linux-headers $QEMU_INCLUDES" + QEMU_INCLUDES="-isystem ${source_path}/linux-headers -I${build_path}/linux-headers $QEMU_INCLUDES" libudev="yes" ;; esac @@ -4259,7 +4269,7 @@ EOF fdt=git mkdir -p dtc fdt_cflags="-I${source_path}/dtc/libfdt" - fdt_ldflags="-L$PWD/dtc/libfdt" + fdt_ldflags="-L${build_path}/dtc/libfdt" fdt_libs="$fdt_libs" elif test "$fdt" = "yes" ; then # Not a git build & no libfdt found, prompt for system install @@ -5244,7 +5254,7 @@ case "$capstone" in else LIBCAPSTONE=libcapstone.a fi - capstone_libs="-L$PWD/capstone -lcapstone" + capstone_libs="-L${build_path}/capstone -lcapstone" capstone_cflags="-I${source_path}/capstone/include" ;; @@ -6244,8 +6254,8 @@ case "$slirp" in git_submodules="${git_submodules} slirp" fi mkdir -p slirp - slirp_cflags="-I${source_path}/slirp/src -I$PWD/slirp/src" - slirp_libs="-L$PWD/slirp -lslirp" + slirp_cflags="-I${source_path}/slirp/src -I${build_path}/slirp/src" + slirp_libs="-L${build_path}/slirp -lslirp" if test "$mingw32" = "yes" ; then slirp_libs="$slirp_libs -lws2_32 -liphlpapi" fi @@ -8190,7 +8200,7 @@ fi mv $cross config-meson.cross rm -rf meson-private meson-info meson-logs -NINJA=${ninja:-$PWD/ninjatool} $meson setup \ +NINJA=${ninja:-${build_path}/ninjatool} $meson setup \ --prefix "${pre_prefix}$prefix" \ --libdir "${pre_prefix}$libdir" \ --libexecdir "${pre_prefix}$libexecdir" \ @@ -8212,7 +8222,7 @@ NINJA=${ninja:-$PWD/ninjatool} $meson setup \ -Dvnc=$vnc -Dvnc_sasl=$vnc_sasl -Dvnc_jpeg=$vnc_jpeg -Dvnc_png=$vnc_png \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f\ $cross_arg \ - "$PWD" "$source_path" + "$build_path" "$source_path" if test "$?" -ne 0 ; then error_exit "meson setup failed" From patchwork Thu Sep 3 08:31:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356435 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=JRvMP0Ix; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvLT319Rz9sSP for ; Thu, 3 Sep 2020 18:37:05 +1000 (AEST) Received: from localhost ([::1]:46046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkjv-0006lb-CH for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:37:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfK-00083C-99 for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:18 -0400 Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]:53437) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfH-0001XG-IF for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:17 -0400 Received: by mail-pj1-x1042.google.com with SMTP id k15so1164814pji.3 for ; Thu, 03 Sep 2020 01:32:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bscWSrwzBlA91ho91MKRFqbKOrFCfnhQG9RPGa7f72A=; b=JRvMP0IxTuWCaVUbP1JTPzaIAPD2+wHmYDdVw+z84kXL5jM7Ir/OMJ9zW7GanKJ8fr U0iaOzgtysl/h25g6LaNusdO26Ki31kBOPuaukdAL9Z+v1PfdrfGOu+UfYxkcYBZiiDM FuXI6QnnIZbrREwh3cxq5s0otuApSrIPVaoFm8KR8r+GOvBsjkqm+bOsGulwz6cjFo20 mr5V0L06Jlyp9yizeqj2LXi7rk2RK/C+Sggs2LsilDUmKt6k8oI+znwqxswRfCNq+64H UmfUyiFD2W0WKy253F6u5GPaVKIlqfYcXXKN/gKUmlgWck1Iws3JiAINhO1w/cdJaAbc x0eg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=bscWSrwzBlA91ho91MKRFqbKOrFCfnhQG9RPGa7f72A=; b=gde5KmqOJUloN8uspV1EG1A4iOxHR/42nbKy3g1e2lxPOcaN4gdJr4vMku/PtVIjct 5OFk4YwESZ62hJmPvR7nNboY0i7T4ojeCzUgZ9UjAnyhawE2bLwfmSJu+BTRtxF08bsL Fr1s28CtwGJoH9GOplLfNIZ4mbkTUrVW3VbYV9yLsmMqi3P/zIv/e6UVmCf2v4P2zyRi ChrUuS4Bqo6qAo10b5k0mUASiygqOVFVGEOr3scLBhMQxwoPfSND5wwy+pV3DlNlpvqo Gtahr9ZFQ3iNIdpG9pFX67YJbyyJY3ifPXgV2y6NP85Yk0ST0pkjsAui4Yr9ckqBfSFs qdJw== X-Gm-Message-State: AOAM5321HmR8NycKn2CqWOTYm2Gnj4vBGCtWpao/6dXRpro3cbmlAmqJ IKxhG/EDmtBTDLY+yPqnC2CuC/9lSz9qSbxX X-Google-Smtp-Source: ABdhPJwyElI0uUF+z5TC8kNYHF9A3vZscgcUS4CFsdvmAjZMpGmP07Ak9atNW0MvoiZ22ouqa82WRA== X-Received: by 2002:a17:90b:611:: with SMTP id gb17mr2198066pjb.71.1599121933602; Thu, 03 Sep 2020 01:32:13 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:12 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 06/12] block: Fixes nfs on msys2/mingw Date: Thu, 3 Sep 2020 16:31:41 +0800 Message-Id: <20200903083147.707-7-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1042; envelope-from=luoyonggang@gmail.com; helo=mail-pj1-x1042.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo --- block/nfs.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/block/nfs.c b/block/nfs.c index 61a249a9fc..34b2cd5708 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -24,7 +24,9 @@ #include "qemu/osdep.h" +#if !defined(_WIN32) #include +#endif #include "qemu/config-file.h" #include "qemu/error-report.h" #include "qapi/error.h" @@ -51,6 +53,12 @@ #define QEMU_NFS_MAX_PAGECACHE_SIZE (8388608 / NFS_BLKSIZE) #define QEMU_NFS_MAX_DEBUG_LEVEL 2 +#if defined (_WIN32) +#define nfs_stat __stat64 +#else +#define nfs_stat stat +#endif + typedef struct NFSClient { struct nfs_context *context; struct nfsfh *fh; @@ -58,7 +66,7 @@ typedef struct NFSClient { bool has_zero_init; AioContext *aio_context; QemuMutex mutex; - blkcnt_t st_blocks; + int64_t st_size; bool cache_used; NFSServer *server; char *path; @@ -70,7 +78,7 @@ typedef struct NFSRPC { int ret; int complete; QEMUIOVector *iov; - struct stat *st; + struct nfs_stat *st; Coroutine *co; NFSClient *client; } NFSRPC; @@ -419,7 +427,7 @@ static int64_t nfs_client_open(NFSClient *client, BlockdevOptionsNfs *opts, int flags, int open_flags, Error **errp) { int64_t ret = -EINVAL; - struct stat st; + struct nfs_stat st; char *file = NULL, *strp = NULL; qemu_mutex_init(&client->mutex); @@ -545,7 +553,7 @@ static int64_t nfs_client_open(NFSClient *client, BlockdevOptionsNfs *opts, } ret = DIV_ROUND_UP(st.st_size, BDRV_SECTOR_SIZE); - client->st_blocks = st.st_blocks; + client->st_size = st.st_size; client->has_zero_init = S_ISREG(st.st_mode); *strp = '/'; goto out; @@ -729,11 +737,11 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs) { NFSClient *client = bs->opaque; NFSRPC task = {0}; - struct stat st; + struct nfs_stat st; if (bdrv_is_read_only(bs) && !(bs->open_flags & BDRV_O_NOCACHE)) { - return client->st_blocks * 512; + return client->st_size; } task.bs = bs; @@ -746,7 +754,7 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs) nfs_set_events(client); BDRV_POLL_WHILE(bs, !task.complete); - return (task.ret < 0 ? task.ret : st.st_blocks * 512); + return (task.ret < 0 ? task.ret : st.st_size); } static int coroutine_fn @@ -778,7 +786,7 @@ static int nfs_reopen_prepare(BDRVReopenState *state, BlockReopenQueue *queue, Error **errp) { NFSClient *client = state->bs->opaque; - struct stat st; + struct nfs_stat st; int ret = 0; if (state->flags & BDRV_O_RDWR && bdrv_is_read_only(state->bs)) { @@ -800,7 +808,7 @@ static int nfs_reopen_prepare(BDRVReopenState *state, nfs_get_error(client->context)); return ret; } - client->st_blocks = st.st_blocks; + client->st_size = st.st_size; } return 0; From patchwork Thu Sep 3 08:31:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356434 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=qj8wxckD; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvKy4Z6zz9sSP for ; Thu, 3 Sep 2020 18:36:38 +1000 (AEST) Received: from localhost ([::1]:43960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkjU-0005sa-K6 for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:36:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfL-00085h-Ic for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:19 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:45080) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfJ-0001XU-Od for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:19 -0400 Received: by mail-pf1-x42b.google.com with SMTP id k15so1703050pfc.12 for ; Thu, 03 Sep 2020 01:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XFEZh3+xvAfqz2f0h/nVnmxCipA8eA9k8U4UHOk894U=; b=qj8wxckDNeqol6K7T2TpMCS62R0DQcAOjzFZT4MD9AMY7fmSwKyngvBfI0GLsoPQvp oXpfMDVeqxCuL5Mo0Gc/nzMPwdUHBY3+VMNBYW2QtJ+7ADJbWRKRvfr89sTUc5SXIWkT 2e0oIx2T9x1KgRb39urWYgthTrfz0eTv3JgMxHjXqvr+7JQM8GNaP6Ya4LrGc5fqnN5Q UZK7SDR7OihqXmU0wExqPRlzauoj5ue4mFS1lMFp/xPiW7/r3apixCsEXZlDJEP62GU6 ldsF/VtGcBM/lWXs0p3P4yeIc0YdGMBc2kEPWAFqJbzgGqwD6c42jVu3dta+K7IoMaGk Oepw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=XFEZh3+xvAfqz2f0h/nVnmxCipA8eA9k8U4UHOk894U=; b=esrTPwLVoQr1IIzTq0VMMUNjanc6AB9UstCywVOt/gj5mv3Or/9qTvWsuD2S4hzeZB tZBKyBSTG6Za3LzXNFtvtg0fv9Bo3EZd3hE7BlBrkhX78sqGRoBeGwV/mFvfSRdpVV1C 5bOmWGmwJjM7z3a9cucv9em2NkYeHmVAu84iaRH5mqXw1uKAvGVA+biyL2Yg0JusWpz8 R96KCLp59jaivBNd0th1pC50aLlsp2QB6DPs/ppRwMj+yJX0w8VhrqMki9KB9qcH24Zg Nx3qCmiY1XOs3JVFaCQH4HJ9Xd8LOSjC4OWhAxPEVbChOEx221H/pyBYrNzx/r7zGJit zgBw== X-Gm-Message-State: AOAM530n5Vf6Ak3J6iarFc6u8P7LxcDXdTJa7vZQlJ4u5webJUb7y2Sj QIFQE4awlOMiWHZnTophbUrfHFeuikJighJN X-Google-Smtp-Source: ABdhPJyw221FvmuBu454lAVNwIpygwtdO5d4sfQmLlxCA7OjhYKcxYTOkX7xaj2EzYEA1QTwIQhA4Q== X-Received: by 2002:a17:902:7c8b:: with SMTP id y11mr395682pll.10.1599121936009; Thu, 03 Sep 2020 01:32:16 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:14 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 07/12] osdep: These function are only available on Non-Win32 system. Date: Thu, 3 Sep 2020 16:31:42 +0800 Message-Id: <20200903083147.707-8-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void); Signed-off-by: Yonggang Luo --- include/qemu/osdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 412962d91a..e80fddd1e8 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -502,11 +502,11 @@ int qemu_close(int fd); int qemu_unlink(const char *name); #ifndef _WIN32 int qemu_dup(int fd); -#endif int qemu_lock_fd(int fd, int64_t start, int64_t len, bool exclusive); int qemu_unlock_fd(int fd, int64_t start, int64_t len); int qemu_lock_fd_test(int fd, int64_t start, int64_t len, bool exclusive); bool qemu_has_ofd_lock(void); +#endif #if defined(__HAIKU__) && defined(__i386__) #define FMT_pid "%ld" From patchwork Thu Sep 3 08:31:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356438 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=dQIZDeJQ; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvNW2ckSz9sTS for ; Thu, 3 Sep 2020 18:38:51 +1000 (AEST) Received: from localhost ([::1]:52286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkld-0000vj-9C for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:38:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfP-0008EM-DH for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:23 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:45734) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfM-0001Xt-OE for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:23 -0400 Received: by mail-pg1-x52a.google.com with SMTP id 67so1527071pgd.12 for ; Thu, 03 Sep 2020 01:32:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OM5+pO1x05sX0Z4q9m5s0uFvz3+CGbA97ITxzJid3EY=; b=dQIZDeJQJ1LD8h7KeVW13IWtEQsMmz/U1H80+YCsgBu+F+T4hdo72uMvX6cIQ7XZAi Df6TyeXvxuEqseicQKew13FKN/UNTSGko0GWw6hZ2OQr6umHR+S97b44YKZRyLW/SQvE bGHCzN8ZRAnfk0hCkInu7Vkm8NXLdTGAHpGkgAltq11d0/pJpUK1X0wTetjxEWe/dWiZ v/7mF1ZOOahXS3ORcf8s3EZyJFIDt6zR2sZH5j58W4rbbgxcy5j0Hp8cMPvM1412JOox tSVRkIXjavls9EgqZEI/ZzcYgcerIaTexLicJ6z+oGT0KmurRlQ80JYsjb3JPzTth/rI a5GQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=OM5+pO1x05sX0Z4q9m5s0uFvz3+CGbA97ITxzJid3EY=; b=s6JUOjQA3IXF0u/xcAd7YcSB+wYSm+baO4kX13pNkF/hlm1Xu4DeS9bzS364KAdqoH ZErYJNagzxf3hKBV//9suTbmsF/EVlDnB5PX2jpzD1SBQdDwVeov4r6c5JEFBl4BqPHc zTC3FVBOndUjF9ZNEHm8MMYHsm2ebU4EarIE1OSZ8NyO4cP9enR4IUj8FrWFx8scZNaO 3/88bkfEVjpa6mFo5aSNRpSD+V0FibMc0ya4Dfwv4jM27qIkC/YdyPU7fzz2UKeWv1Ij 9Y5sY8H1q0MW509roBl7PlcbISnjgjbMuLfpn9N9aiBspxgqrnMY2+dQkTzdYLRWIbSZ Ys0w== X-Gm-Message-State: AOAM532yiNZ6wfq3lqsx3qVk8KM4mV94JYodGmnjC4mOL1GhBvrMdzjs /8/OD1oJaNAyU9n0O/IRUbe6jvxpH8309caj X-Google-Smtp-Source: ABdhPJyiKZtdNKpylNX9KTZn+MXK1RFDs/otG+scQwhM1AJenynlG3OWJEyNpdJnf6R8uvKYrIJ4CA== X-Received: by 2002:a63:c64c:: with SMTP id x12mr2083996pgg.433.1599121938828; Thu, 03 Sep 2020 01:32:18 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:17 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 08/12] ci: fixes msys2 build by upgrading capstone to 4.0.2 Date: Thu, 3 Sep 2020 16:31:43 +0800 Message-Id: <20200903083147.707-9-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x52a.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo --- capstone | 2 +- configure | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/capstone b/capstone index 22ead3e0bf..1d23053284 160000 --- a/capstone +++ b/capstone @@ -1 +1 @@ -Subproject commit 22ead3e0bfdb87516656453336160e0a37b066bf +Subproject commit 1d230532840a37ac032c6ab80128238fc930c6c1 diff --git a/configure b/configure index 5f2bcc4b57..e42d210e5f 100755 --- a/configure +++ b/configure @@ -5248,14 +5248,14 @@ case "$capstone" in git_submodules="${git_submodules} capstone" fi mkdir -p capstone - QEMU_CFLAGS="$QEMU_CFLAGS -I${source_path}/capstone/include" + QEMU_CFLAGS="$QEMU_CFLAGS -I${source_path}/capstone/include -I${source_path}/capstone/include/capstone" if test "$mingw32" = "yes"; then LIBCAPSTONE=capstone.lib else LIBCAPSTONE=libcapstone.a fi capstone_libs="-L${build_path}/capstone -lcapstone" - capstone_cflags="-I${source_path}/capstone/include" + capstone_cflags="-I${source_path}/capstone/include -I${source_path}/capstone/include/capstone" ;; system) From patchwork Thu Sep 3 08:31:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356431 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=crfxegqz; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvHb1d3Nz9sTC for ; Thu, 3 Sep 2020 18:34:35 +1000 (AEST) Received: from localhost ([::1]:36196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkhV-0002aC-0a for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:34:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfQ-0008Gh-Bx for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:24 -0400 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]:35738) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfO-0001Y2-Kc for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:24 -0400 Received: by mail-pf1-x442.google.com with SMTP id o68so1737445pfg.2 for ; Thu, 03 Sep 2020 01:32:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=6lmnRR0tZitC7JnT2Axu3G4iTyGoQuwXgZI7oqF9oeM=; b=crfxegqzLtzvHjQPbKaRnD7Mp7dr+VcWUlqSpgwL7RZ2P0Vwn/TrD+tfBl8qxj4HBw yetOpMB+UKcEkvPDi7Iu+xKW1cnqYd+rKVxLUvngqhB/2IY5+kIcXvsa/8mM1KxgMl9t We7gem8zwTvL68OR90zYZStmrJ1VWPayNll5KMsF+G46KQS9oNUUr1U4HtekcV+TvMxG 5nkZwDN2tCqrZdwUWN8vd4bH1RuhDq3/bSESwKg46LncGUletuydcHQolEudATYJv5+7 5zpI16PpNMvMx+T0gGyvhG1PErkQJVxynhME/dRmstEEJ9TAqcfy78mKOwip9nSmDPsg h7bg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=6lmnRR0tZitC7JnT2Axu3G4iTyGoQuwXgZI7oqF9oeM=; b=miD6Cp3X6Wc/qG+spVHTNvLCgAPL0y5E/ITkGEFnyzl77BdEiarHxETsb3GaupbZdc 7hRRbnCGYaPqVxhLdt95Ab3ygzJeAZeKXzEF2A5ZcvYd982/AYULnO+owYXfQFvqag0r 0by2+ntaUoHhJGSeUl72HRIXPnCeUyXUE9uYcbjP8fBDCGaQZF8zrbgEfh7zSSmHJxVc CVzmdncEmKs2NHXcOWvGdrRjVxL4lb932pCgX04/qIqNUD/nNPYzY7Jn6B+6vKT+akYS wljeVxHD+8ysTQlkZfpwktmebbcybshRCOuo5Hz+r4OEudsitQoZe61WbaMQvZvlFx/s p+aw== X-Gm-Message-State: AOAM530XHkuFxNVqwJvpJa6A37cULHYxRF9sIYLKhMqOLUVpfmYykcBV 1QJPpYumPR3Bzy090+nk4hXrdMALJ1mpe3wh X-Google-Smtp-Source: ABdhPJyhXcLybArxKbSoHg3/1IhdFcZhVLprmbIm1fCabTYO6htP4qYDSTJy20fLnIT40FzaSiO4mA== X-Received: by 2002:a62:5fc4:: with SMTP id t187mr2819613pfb.34.1599121940947; Thu, 03 Sep 2020 01:32:20 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:20 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 09/12] stubs: qemu_notify_event have no need to stub Date: Thu, 3 Sep 2020 16:31:44 +0800 Message-Id: <20200903083147.707-10-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::442; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x442.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" LINK tests/test-qdev-global-props.exe LINK tests/test-timed-average.exe C:/CI-Tools/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: libqemuutil.a(util_main-loop.c.obj): in function `qemu_notify_event': C:\work\xemu\qemu-build/../qemu/util/main-loop.c:139: multiple definition of `qemu_notify_event'; libqemuutil.a(stubs_notify-event.c.obj):C:\work\xemu\qemu-build/../qemu/stubs/notify-event.c:6: first defined here collect2.exe: error: ld returned 1 exit status make: *** [C:/work/xemu/qemu/rules.mak:88:tests/test-timed-average.exe] 错误 1 Signed-off-by: Yonggang Luo --- stubs/notify-event.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/stubs/notify-event.c b/stubs/notify-event.c index 827bb52d1a..59935db11e 100644 --- a/stubs/notify-event.c +++ b/stubs/notify-event.c @@ -1,6 +1,2 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" - -void qemu_notify_event(void) -{ -} From patchwork Thu Sep 3 08:31:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356437 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=Qjua9vm4; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvMt3Zs2z9sTS for ; Thu, 3 Sep 2020 18:38:18 +1000 (AEST) Received: from localhost ([::1]:50328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkl6-00005j-ER for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:38:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54178) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfS-0008Lf-Iy for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:26 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:38137) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfQ-0001YM-NR for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:26 -0400 Received: by mail-pf1-x42b.google.com with SMTP id d22so1725634pfn.5 for ; Thu, 03 Sep 2020 01:32:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Bq1eYS85B3lVfUWOPYt+//P+vJhXogDV3XY3bX1W5SI=; b=Qjua9vm4Xb2s+TOoRz8gpA20TD505Ci12y11ViB0+MiyYsBaKii5dfLwmQtVdGjPkI EGNZQMgUivNRybmo8F0IMnESP714Ig8xxOfRmHDy5tDjjv+AJhfcg3uWH9Om1VCAIfFW v/UOMkB1e3E9Gv2b7Ll51H2grJ/frYg6pkpNwwUc3C9vrkUZIa3LwOHZURtjz6ByJles v+E6n6XkRpQhMLz4ya11EF3f+KMuaMA58Eqbh9/ydQSCJp3jGrmSL3SEPQH3JcwYeQq5 VsHCuFPxUaFy0mDrEiDgRKraMTsISd4oNYsf8VIN22+8phEDSclp6cuHVqWBIaagjXjd 26Pg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=Bq1eYS85B3lVfUWOPYt+//P+vJhXogDV3XY3bX1W5SI=; b=D7JccgknVYU3DV/K1XnjPLfEuhV1icgxDa8P4M2bFlJBzMaLeFUurPQb5RYGpRA+9N +qlFZocHFq+88a/lab6MfATCXD5xWKvl/3XxqoMZTQYlgG03N6fQktlsOgxkS+ApYZDJ DX8RWu2Y7PftZvB3t8cxN5ItdCCBYtjRaSuPoMZ04ZD/qVJRH0z3WV2i8ET9WCeslLqf XeDeovQeCG3K5Sn+OJ1B7WEXJAwnqYitmyYAB42EEXwzWi49N7W6gmEMJu2d8iMF1z1o QVdV+CipiiSkN7cH1HBwrTcUcoyYmZ3M9kBmMQA/V+1dLFPZ1A3+0J1TNEmjy1gJdmqa u2+A== X-Gm-Message-State: AOAM531fYx2rQobe7cPXNu60nXRiFl7WZWq1FObHhmxzRWNkdaUJrXDC ODdCM9/tZip59IKC6/XQW4b15Q/DQxJwa/+6 X-Google-Smtp-Source: ABdhPJyVQK+5CBAl6B2nr7dRouGpaxenn3rjtGw7mjxuUUKrMn0ABbAg/N7u0GU3bGST9HgeG3N7+Q== X-Received: by 2002:a62:7bc3:: with SMTP id w186mr2714255pfc.221.1599121943019; Thu, 03 Sep 2020 01:32:23 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:22 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 10/12] meson: Fixes qapi tests. Date: Thu, 3 Sep 2020 16:31:45 +0800 Message-Id: <20200903083147.707-11-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42b; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x42b.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The error are: +@end table + +@end deftypefn + make: *** [Makefile.mtest:63: check-qapi-schema] Error 1 Signed-off-by: Yonggang Luo --- tests/qapi-schema/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qapi-schema/meson.build b/tests/qapi-schema/meson.build index c87d141417..67ba0a5ebd 100644 --- a/tests/qapi-schema/meson.build +++ b/tests/qapi-schema/meson.build @@ -220,6 +220,7 @@ qapi_doc = custom_target('QAPI doc', # "full_path()" needed here to work around # https://github.com/mesonbuild/meson/issues/7585 -test('QAPI doc', diff, args: ['-u', files('doc-good.texi'), qapi_doc[0].full_path()], +test('QAPI doc', diff, args: ['--strip-trailing-cr', + '-u', files('doc-good.texi'), qapi_doc[0].full_path()], depends: qapi_doc, suite: ['qapi-schema', 'qapi-doc']) From patchwork Thu Sep 3 08:31:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356436 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=BADQaGkT; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvM13gswz9sSP for ; Thu, 3 Sep 2020 18:37:33 +1000 (AEST) Received: from localhost ([::1]:48506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkkN-0007ly-DB for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:37:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfU-0008RP-L0 for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:28 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:41772) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfT-0001Yc-0i for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:28 -0400 Received: by mail-pf1-x444.google.com with SMTP id t9so1714797pfq.8 for ; Thu, 03 Sep 2020 01:32:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kZMPJvEMdwYjQlePlaJK6nWLcDjpDXuUWt/8zY2tP2A=; b=BADQaGkTcxVwXilGxDbX4m+keTi1jHwnslluuVw5g2EYD9A5v7ombJlwFfhBed+7/W lKmNZjipVrvbZZLylahXp6/k0cd/FN0Ezwb+LndyiW/MpXx4iAjACcqOhME6O8YCMVUj 0qTkOEoph82hx6cmK9Sw5yJfBrmLlJqbuezdhajeckL/3+KkwTBUG/jrk2w2y83ECRQZ ELbWLoD8lYDZw0L/SzKUUd2tolNUByipRA4Hw/TmNoRX5FGmQ5YDaB03fUPzbDbd9RJJ 9G26lBZaiRKtd9Sdg9ZLzPOQOKvBJr9+R0zwoBPk+12fEk5pNy6PqgD4h4qRAUZF4PnY jgVw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=kZMPJvEMdwYjQlePlaJK6nWLcDjpDXuUWt/8zY2tP2A=; b=l4r5Pm+vBdFve0CT2ff16aO7UCCmiS5wiP5UoAgpOCLrPTVRSne598uGZ9/C+VlSqP diWLbYUbHohPOJ23a+bmAWF8A6NUBzA3aZyVHzD7KFA87/RNZzHsMApRiS3X2jIYAKUZ Aa9cY139qGeZwB1JfF6KpsjRblHcaGNy2fBE02iSBPOT6PIjkgSf5piqQYmm2i0hRQMt kuKN1X71fOqQ8ocu0/vP29F16S/+doDSju4jphYE6ufX3qEs8hFTY0KiGZZfHbZ9enIX NWW9ETXc+kuzE+8V4EgF299gJoNRc7fvGi34lRkha/gWdP3rhRSDHNMZf3CJO6S8H/9S XefA== X-Gm-Message-State: AOAM533cmy6m7m+9OKjrjC+0N+x6HqbTIAujrAkS93oVekPl34B9sBMs wlwfRyh2C8nOLQv6oDM5hbbobtPR2Sj3qu0D X-Google-Smtp-Source: ABdhPJyk2hBg3FwMAALD570n1B3wYBIZ4u1ppXvf3qep9nkjClfkBo6yb5Srmsf6stmxAP63WhA2eg== X-Received: by 2002:a63:6d4c:: with SMTP id i73mr2132904pgc.63.1599121945286; Thu, 03 Sep 2020 01:32:25 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:24 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 11/12] tests: Disable test-image-locking that not works under Win32 Date: Thu, 3 Sep 2020 16:31:46 +0800 Message-Id: <20200903083147.707-12-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::444; envelope-from=luoyonggang@gmail.com; helo=mail-pf1-x444.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Yonggang Luo --- tests/Makefile.include | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/Makefile.include b/tests/Makefile.include index 9ac8f5b86a..497f1f21ff 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -87,7 +87,9 @@ check-unit-$(CONFIG_BLOCK) += tests/test-blockjob$(EXESUF) check-unit-$(CONFIG_BLOCK) += tests/test-blockjob-txn$(EXESUF) check-unit-$(CONFIG_BLOCK) += tests/test-block-backend$(EXESUF) check-unit-$(CONFIG_BLOCK) += tests/test-block-iothread$(EXESUF) +ifeq ($(CONFIG_POSIX),y) check-unit-$(CONFIG_BLOCK) += tests/test-image-locking$(EXESUF) +endif check-unit-y += tests/test-x86-cpuid$(EXESUF) # all code tested by test-x86-cpuid is inside topology.h ifeq ($(CONFIG_SOFTMMU),y) From patchwork Thu Sep 3 08:31:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yonggang Luo X-Patchwork-Id: 1356439 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=m6b1t1Tt; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BhvPP2nZtz9sTC for ; Thu, 3 Sep 2020 18:39:37 +1000 (AEST) Received: from localhost ([::1]:56408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kDkmN-0002dC-9l for incoming@patchwork.ozlabs.org; Thu, 03 Sep 2020 04:39:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kDkfX-000079-W3 for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:32 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:39957) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kDkfV-0001Yq-R8 for qemu-devel@nongnu.org; Thu, 03 Sep 2020 04:32:31 -0400 Received: by mail-pg1-x542.google.com with SMTP id h12so1542727pgm.7 for ; Thu, 03 Sep 2020 01:32:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=saL59JT8vgtuerHEUxQexVZzR88NjHdTy6fNel9QYzI=; b=m6b1t1TtAVQBIztwJWWUBz8Ysg5lj+8MQ4G7KKUHFLKaEM+Rxfy74crF+FDOPd+0cg eZfEsK0BZmXUINkLaI06eZmjze04vlPbGVbZKt8vgScZVrObjO/QBjp0/Qe5WNKdY0Dx fo23dw7b6IBj/SkPAzlxzp6Rj+bWhQEn3lnVIJDbSLk6QjeVm34tq/MQ7hCTV515A6Y3 IFtANtWx2vIRyXjC2mEaOT87mCHoP0d7B+2dka15TqOWtlOXhWpNNyxOFOFqnUlqon8/ iZXg2AribxjwvYF2kxLrpnlHSXa2naui5uUBL0oLOCwwCgr5WjDTBC0jZcFTc+aY5XYr mgKg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=saL59JT8vgtuerHEUxQexVZzR88NjHdTy6fNel9QYzI=; b=fvZ02lU6eLtVNArFZbYh5HJ+8RgYYCVt6bHFJxF0FH4GBtM2UXtyMrONNfynaftgxt y7w264BZZDMpGF7u5T9pgQQsVV1+R/8Cfc6/pFs8H8lfxVyxjzybi+iqaHbefPfFunDr dgPYkudnFEkF7/F32HZqjny/kSHhHOYNxxy42GN6/T2lmYhEH2zAwhE9Mbox4UB8JCf7 yK6FRePoBDqxy3DGXTpibNctpo5AJv0CAAupW5Ku36YIbjC8V7gubnnGfWmwvbFeuuw3 bAYR3l0gvnnqXwudqK8j61fprXt9/6+h7NRhLLgGLUI+VmRye0fRPAI9bXrarF1zcdiu 1yFw== X-Gm-Message-State: AOAM530NXq1LGJOg+OdP2u6QV+vqHmM0npaST3B1lcQjDxWhchAmgH1/ 3A6xsEZDoEwkCyExPKzPka6dPFIddNjY14Hs X-Google-Smtp-Source: ABdhPJxMX7X+HG4avHrHPrd/o0Z+SZ0DYX/7GkLK3NUIvS7QZYe5yb8SF0cNkjuytMKn/tIZhvhpPQ== X-Received: by 2002:aa7:925a:: with SMTP id 26mr2918417pfp.6.1599121947960; Thu, 03 Sep 2020 01:32:27 -0700 (PDT) Received: from localhost.localdomain ([222.95.248.6]) by smtp.googlemail.com with ESMTPSA id e7sm1759201pgn.64.2020.09.03.01.32.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Sep 2020 01:32:27 -0700 (PDT) From: Yonggang Luo To: qemu-devel@nongnu.org Subject: [PATCH v4 12/12] ci: Enable msys2 ci in cirrus Date: Thu, 3 Sep 2020 16:31:47 +0800 Message-Id: <20200903083147.707-13-luoyonggang@gmail.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20200903083147.707-1-luoyonggang@gmail.com> References: <20200903083147.707-1-luoyonggang@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::542; envelope-from=luoyonggang@gmail.com; helo=mail-pg1-x542.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paolo Bonzini , Yonggang Luo Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Install msys2 in a proper way refer to https://github.com/cirruslabs/cirrus-ci-docs/issues/699 The https://wiki.qemu.org/Hosts/W32#Native_builds_with_MSYS2 need to be updated. There is no need of --cross-prefix, open mingw64.exe instead of msys2.exe then we don't need the --cross-prefix, besides using ENV MSYS: winsymlinks:nativestrict MSYSTEM: MINGW64 CHERE_INVOKING: 1 to opening mingw64 native shell. Signed-off-by: Yonggang Luo --- .cirrus.yml | 24 +++++++++++++++++++++ scripts/ci/windows/msys2_build.sh | 33 +++++++++++++++++++++++++++++ scripts/ci/windows/msys2_install.sh | 31 +++++++++++++++++++++++++++ 3 files changed, 88 insertions(+) create mode 100644 scripts/ci/windows/msys2_build.sh create mode 100644 scripts/ci/windows/msys2_install.sh diff --git a/.cirrus.yml b/.cirrus.yml index f287d23c5b..0bfb465193 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -40,3 +40,27 @@ macos_xcode_task: - ../configure --cc=clang || { cat config.log; exit 1; } - gmake -j$(sysctl -n hw.ncpu) - gmake check + +windows_msys2_task: + windows_container: + image: cirrusci/windowsservercore:cmake + os_version: 2019 + cpu: 8 + memory: 8G + env: + MSYS: winsymlinks:nativestrict + MSYSTEM: MINGW64 + CHERE_INVOKING: 1 + printenv_script: + - C:\tools\msys64\usr\bin\bash.exe -lc 'printenv' + install_script: + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && curl -O http://repo.msys2.org/msys/x86_64/msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz.sig" + - C:\tools\msys64\usr\bin\bash.exe -lc "cd /c/tools && pacman -U --noconfirm msys2-keyring-r21.b39fb11-1-any.pkg.tar.xz" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman -Sy --noconfirm" + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --needed --noconfirm -S bash pacman pacman-mirrors msys2-runtime" + - taskkill /F /IM gpg-agent.exe + - C:\tools\msys64\usr\bin\bash.exe -lc "pacman --noconfirm -Su" + - C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_install.sh" + script: + - C:\tools\msys64\usr\bin\bash.exe -lc "sh scripts/ci/windows/msys2_build.sh" diff --git a/scripts/ci/windows/msys2_build.sh b/scripts/ci/windows/msys2_build.sh new file mode 100644 index 0000000000..3ba89a4206 --- /dev/null +++ b/scripts/ci/windows/msys2_build.sh @@ -0,0 +1,33 @@ +mkdir build +cd build +../configure \ + --python=python3 \ + --enable-gtk --enable-sdl \ + --enable-capstone=git \ + --enable-stack-protector \ + --ninja=ninja \ + --enable-gnutls \ + --enable-nettle \ + --enable-vnc \ + --enable-vnc-sasl \ + --enable-vnc-jpeg \ + --enable-vnc-png \ + --enable-membarrier \ + --enable-slirp=git \ + --disable-kvm \ + --enable-hax \ + --enable-whpx \ + --disable-spice \ + --enable-lzo \ + --enable-snappy \ + --enable-bzip2 \ + --enable-vdi \ + --enable-qcow1 \ + --enable-tools \ + --enable-libusb \ + --enable-usb-redir \ + --enable-libnfs \ + --enable-libssh \ + --disable-pie +make -j$NUMBER_OF_PROCESSORS +# make check diff --git a/scripts/ci/windows/msys2_install.sh b/scripts/ci/windows/msys2_install.sh new file mode 100644 index 0000000000..ff35b73ef2 --- /dev/null +++ b/scripts/ci/windows/msys2_install.sh @@ -0,0 +1,31 @@ +pacman --noconfirm -S --needed \ +base-devel \ +git \ +mingw-w64-x86_64-python \ +mingw-w64-x86_64-python-setuptools \ +mingw-w64-x86_64-toolchain \ +mingw-w64-x86_64-SDL2 \ +mingw-w64-x86_64-SDL2_image \ +mingw-w64-x86_64-gtk3 \ +mingw-w64-x86_64-ninja \ +mingw-w64-x86_64-make \ +mingw-w64-x86_64-lzo2 \ +mingw-w64-x86_64-libjpeg-turbo \ +mingw-w64-x86_64-pixman \ +mingw-w64-x86_64-libgcrypt \ +mingw-w64-x86_64-capstone \ +mingw-w64-x86_64-libpng \ +mingw-w64-x86_64-libssh \ +mingw-w64-x86_64-libxml2 \ +mingw-w64-x86_64-snappy \ +mingw-w64-x86_64-libusb \ +mingw-w64-x86_64-usbredir \ +mingw-w64-x86_64-libtasn1 \ +mingw-w64-x86_64-libnfs \ +mingw-w64-x86_64-nettle \ +mingw-w64-x86_64-cyrus-sasl \ +mingw-w64-x86_64-curl \ +mingw-w64-x86_64-gnutls \ +mingw-w64-x86_64-zstd \ +mingw-w64-x86_64-glib2 +