From nobody Fri May 17 10:13:29 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1542214124595347.151225654442; Wed, 14 Nov 2018 08:48:44 -0800 (PST) Received: from localhost ([::1]:33153 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMyLL-0000pv-BS for importer@patchew.org; Wed, 14 Nov 2018 11:48:43 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50264) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMyJk-0008HR-QF for qemu-devel@nongnu.org; Wed, 14 Nov 2018 11:47:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMyJf-0007hk-N0 for qemu-devel@nongnu.org; Wed, 14 Nov 2018 11:47:04 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:41328) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gMyJf-0006NO-EJ for qemu-devel@nongnu.org; Wed, 14 Nov 2018 11:46:59 -0500 Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAEGjrPi005479 for ; Wed, 14 Nov 2018 11:46:09 -0500 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2nrpnnjr2d-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 14 Nov 2018 11:46:02 -0500 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 14 Nov 2018 16:44:55 -0000 Received: from b01cxnp23034.gho.pok.ibm.com (9.57.198.29) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 14 Nov 2018 16:44:51 -0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAEGioEZ21364890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 14 Nov 2018 16:44:50 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A8015AC062; Wed, 14 Nov 2018 16:44:50 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7D469AC065; Wed, 14 Nov 2018 16:44:50 +0000 (GMT) Received: from localhost (unknown [9.53.179.213]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Wed, 14 Nov 2018 16:44:50 +0000 (GMT) From: Michael Roth To: qemu-devel@nongnu.org Date: Wed, 14 Nov 2018 10:44:38 -0600 X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18111416-0040-0000-0000-0000049265AA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010048; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01117390; UDB=6.00577119; IPR=6.00897500; MB=3.00024161; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-14 16:44:53 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111416-0041-0000-0000-0000089B7099 Message-Id: <20181114164438.6412-1-mdroth@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-14_13:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811140151 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id wAEGjrPi005479 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.156.1 Subject: [Qemu-devel] [PATCH for-3.1 v2] build: qga: add macro to force use of native mingw32 assert() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" When building qemu-ga for w32 with VSS support, some parts of qemu-ga are not linked against glib, specifically the C++ bits used to create the VSS provider DLL. With 3ebee3b191e, we now define assert() as g_assert() for all mingw32 builds via osdep.h, which results in the following build breakage: x86_64-w64-mingw32-g++ -o qga/vss-win32/qga-vss.dll qga/vss-win32/request= er.o qga/vss-win32/provider.o qga/vss-win32/install.o /home/mdroth/w/qemu4.= git/qga/vss-win32/qga-vss.def -shared -Wl,--add-stdcall-alias,--enable-std= call-fixup -lole32 -loleaut32 -lshlwapi -luuid -static qga/vss-win32/requester.o: In function `requester_freeze': /home/mdroth/w/qemu4.git/qga/vss-win32/requester.cpp:284: undefined refer= ence to `g_assertion_message_expr' qga/vss-win32/requester.o: In function `requester_thaw': /home/mdroth/w/qemu4.git/qga/vss-win32/requester.cpp:508: undefined refer= ence to `g_assertion_message_expr' /home/mdroth/w/qemu4.git/qga/vss-win32/requester.cpp:509: undefined refer= ence to `g_assertion_message_expr' collect2: error: ld returned 1 exit status make: *** [/home/mdroth/w/qemu4.git/qga/vss-win32/Makefile.objs:10: qga/v= ss-win32/qga-vss.dll] Error 1 make: *** Waiting for unfinished jobs.... Fix this by introducing a USE_NATIVE_MINGW32_ASSERT macro that can be defined prior to inclusion of osdep.h for build targets that don't link against glib. Cc: Richard Henderson Cc: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Michael Roth --- v2: * define USE_NATIVE_MINGW32_ASSERT via build recipe and avoid moving #include's before osdep.h (Philippe) --- include/qemu/osdep.h | 2 +- qga/vss-win32/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 3bf48bcdec..59364bfeb0 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -129,7 +129,7 @@ extern int daemon(int, int); * code that is unreachable when features are disabled. * All supported versions of Glib's g_assert() satisfy this requirement. */ -#ifdef __MINGW32__ +#if defined(__MINGW32__) && !defined(USE_NATIVE_MINGW32_ASSERT) #undef assert #define assert(x) g_assert(x) #endif diff --git a/qga/vss-win32/Makefile.objs b/qga/vss-win32/Makefile.objs index 23d08da225..5773bfd868 100644 --- a/qga/vss-win32/Makefile.objs +++ b/qga/vss-win32/Makefile.objs @@ -3,7 +3,7 @@ qga-vss-dll-obj-y +=3D requester.o provider.o install.o =20 obj-qga-vss-dll-obj-y =3D $(addprefix $(obj)/, $(qga-vss-dll-obj-y)) -$(obj-qga-vss-dll-obj-y): QEMU_CXXFLAGS =3D $(filter-out -Wstrict-prototyp= es -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-styl= e-definition -Wredundant-decls -fstack-protector-all -fstack-protector-stro= ng, $(QEMU_CFLAGS)) -Wno-unknown-pragmas -Wno-delete-non-virtual-dtor +$(obj-qga-vss-dll-obj-y): QEMU_CXXFLAGS =3D $(filter-out -Wstrict-prototyp= es -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-styl= e-definition -Wredundant-decls -fstack-protector-all -fstack-protector-stro= ng, $(QEMU_CFLAGS)) -Wno-unknown-pragmas -Wno-delete-non-virtual-dtor -DUSE= _NATIVE_MINGW32_ASSERT =20 $(obj)/qga-vss.dll: LDFLAGS =3D -shared -Wl,--add-stdcall-alias,--enable-s= tdcall-fixup -lole32 -loleaut32 -lshlwapi -luuid -static $(obj)/qga-vss.dll: $(obj-qga-vss-dll-obj-y) $(SRC_PATH)/$(obj)/qga-vss.def --=20 2.17.1