From patchwork Sat Jul 4 03:16:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Emilio G. Cota" <1885827@bugs.launchpad.net> X-Patchwork-Id: 1322711 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=none (p=none dis=none) header.from=bugs.launchpad.net 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 49zHKh6MxYz9s1x for ; Sat, 4 Jul 2020 13:25:59 +1000 (AEST) Received: from localhost ([::1]:37634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jrYoN-0007Xa-7x for incoming@patchwork.ozlabs.org; Fri, 03 Jul 2020 23:25:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45318) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jrYo5-0007Wt-6Z for qemu-devel@nongnu.org; Fri, 03 Jul 2020 23:25:37 -0400 Received: from indium.canonical.com ([91.189.90.7]:51854) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jrYo2-0006wn-Rz for qemu-devel@nongnu.org; Fri, 03 Jul 2020 23:25:36 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.86_2 #2 (Debian)) id 1jrYo0-00060J-S6 for ; Sat, 04 Jul 2020 03:25:32 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id CA22D2E806D for ; Sat, 4 Jul 2020 03:25:32 +0000 (UTC) MIME-Version: 1.0 Date: Sat, 04 Jul 2020 03:16:29 -0000 From: "Emilio G. Cota" <1885827@bugs.launchpad.net> To: qemu-devel@nongnu.org X-Launchpad-Notification-Type: bug X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Tags: plugins windows X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: ajbennee casmac cota X-Launchpad-Bug-Reporter: Xiaolei (casmac) X-Launchpad-Bug-Modifier: Emilio G. Cota (cota) References: <159357217483.1717.4076077243388027502.malonedeb@chaenomeles.canonical.com> Message-Id: <159383259009.1717.14099413077282497580.malone@chaenomeles.canonical.com> Subject: [Bug 1885827] Re: building plugin failed on Windows with mingw X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml X-Launchpad-Message-For: qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="1cbd0aa39df153c901321817f9b57cf3f232b507"; Instance="production-secrets-lazr.conf" X-Launchpad-Hash: c6bbccaed8849b2455bd6e0ed522b9e6bac89a23 Received-SPF: none client-ip=91.189.90.7; envelope-from=bounces@canonical.com; helo=indium.canonical.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/03 23:25:33 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -58 X-Spam_score: -5.9 X-Spam_bar: ----- X-Spam_report: (-5.9 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bug 1885827 <1885827@bugs.launchpad.net> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" I never built the plugin code on anything other than Linux :( All I did for Windows is to try to follow https://gcc.gnu.org/wiki/Visibility Can you please try the following patch (with no other changes)? The patch applies on top of v4.2.0. diff --git a/tests/plugin/Makefile b/tests/plugin/Makefile index 75467b6db8..5b3611ad63 100644 --- a/tests/plugin/Makefile +++ b/tests/plugin/Makefile @@ -16,7 +16,7 @@ NAMES += hotpages SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) -QEMU_CFLAGS += -fPIC +QEMU_CFLAGS += -fPIC -DBUILDING_DLL QEMU_CFLAGS += -I$(SRC_PATH)/include/qemu all: $(SONAMES)