From patchwork Wed Jun 28 16:26:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Kochkov X-Patchwork-Id: 1801207 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=proton.me header.i=@proton.me header.a=rsa-sha256 header.s=protonmail header.b=fCDbGdrl; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qrn6c3DsPz20ZV for ; Thu, 29 Jun 2023 02:27:19 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEXzq-0002uh-4w; Wed, 28 Jun 2023 12:26:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEXzn-0002u8-6K for qemu-devel@nongnu.org; Wed, 28 Jun 2023 12:26:19 -0400 Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEXzk-0005Ke-HX for qemu-devel@nongnu.org; Wed, 28 Jun 2023 12:26:18 -0400 Date: Wed, 28 Jun 2023 16:26:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1687969573; x=1688228773; bh=qe5CWlh53+pTfFMU9cEeYsbWXbyj2Km1XOBR/UFeY/4=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=fCDbGdrlbmX2sfH6BNiOSuMcuYh/mnFIBV2O69dq1gmeoc1UYX2VNvY0i7gMZ2SRu FC+BAPYSp4OCsT0IlOGjolqUY5P31tjazvk7H0wRQCrWTaPC3natxUZPNtOUTqlHfm tBOQ7Lf0r/UEpxGlI5HR6IIM3a4Q6H4wzhUrKnfDqXbFaBGSRQ8gUKJXRrjlqULamX Y3mAwL6ktUt/nLPz6wlUNasiuZFq5HCkRKJyuVuf9aEr5lhaCWoZe2rjfBn2JYzr1L R6KSZ2PVyLNpYO5qtAoYUYCHMB3Po7PYxqHLuCr6rS5FI74y9mqvUDZsI01D4dvPEb xbau92Rj+lZrw== To: qemu-devel@nongnu.org From: Anton Kochkov Cc: Anton Kochkov , =?utf-8?q?Alex_Benn=C3=A9e?= , Alexandre Iooss , Mahmoud Mandour Subject: [PATCH v2 1/2] contrib/plugins: add meson build file Message-ID: <20230628162451.147419-2-anton.kochkov@proton.me> In-Reply-To: <20230628162451.147419-1-anton.kochkov@proton.me> References: <20230628162451.147419-1-anton.kochkov@proton.me> Feedback-ID: 53490844:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.131; envelope-from=anton.kochkov@proton.me; helo=mail-40131.protonmail.ch 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Add crossplatform Meson file to build TCG plugins since the Makefile makes wrong assumptions about it being used only on Linux. Tested on Linux and macOS. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1710 Signed-off-by: Anton Kochkov --- contrib/plugins/meson.build | 31 +++++++++++++++++++++++++++++++ contrib/plugins/meson_options.txt | 1 + 2 files changed, 32 insertions(+) create mode 100644 contrib/plugins/meson.build create mode 100644 contrib/plugins/meson_options.txt -- 2.41.0 diff --git a/contrib/plugins/meson.build b/contrib/plugins/meson.build new file mode 100644 index 0000000000..72c4167461 --- /dev/null +++ b/contrib/plugins/meson.build @@ -0,0 +1,31 @@ +project('qemu-plugins', 'c', meson_version: '>=0.50.0') + +qemu_src = get_option('qemu_path') +if qemu_src == '' + qemu_src = '../..' +endif + +qemu_include = qemu_src + '/include/qemu' +incdir = include_directories(qemu_include) + +plugins = [ + 'execlog', + 'hotblocks', + 'hotpages', + 'howvec', + 'lockstep', + 'hwprofile', + 'cache', + 'drcov', +] + +th = dependency('threads', required: true) +glib = dependency('glib-2.0', required: true) + +foreach p: plugins + library(p, p + '.c', + include_directories: incdir, + dependencies: [th, glib], + override_options: ['b_lundef=false'] + ) +endforeach diff --git a/contrib/plugins/meson_options.txt b/contrib/plugins/meson_options.txt new file mode 100644 index 0000000000..2d76cda496 --- /dev/null +++ b/contrib/plugins/meson_options.txt @@ -0,0 +1 @@ +option('qemu_path', type : 'string', value : '', description : 'Full path to the QEMU sources to build plugins for') From patchwork Wed Jun 28 16:26:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Kochkov X-Patchwork-Id: 1801209 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=proton.me header.i=@proton.me header.a=rsa-sha256 header.s=protonmail header.b=Dq3sWjOG; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Qrn6g6ktBz20bN for ; Thu, 29 Jun 2023 02:27:23 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEY0E-00031c-4Y; Wed, 28 Jun 2023 12:26:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEY07-0002xy-Dl for qemu-devel@nongnu.org; Wed, 28 Jun 2023 12:26:39 -0400 Received: from mail-40134.protonmail.ch ([185.70.40.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEY05-0005ah-Pm for qemu-devel@nongnu.org; Wed, 28 Jun 2023 12:26:39 -0400 Date: Wed, 28 Jun 2023 16:26:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=proton.me; s=protonmail; t=1687969595; x=1688228795; bh=YTHGwutzeM+eVoKJRrhQxHJXdTuUQEKkOF6ZSxkfavo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=Dq3sWjOGEPqAYVfGHWei4HAI9nGLcUQPTmaIWUAbda8xNmWibjxxfJLhGrqWkOuX+ J0Rc7FHouyuWOBqPsTrii4+tsxwAO3IgL4mrCSQ7ZjHWmRw322UzE2llujdNGweAN8 tqPb48oqAZi/ifKDyFzhoUSafhJwTI7c74OL3xm6aHdr3S/mTUsHDp+DEv34tTtimV BxDf4AhUzy3vTzPB197p7foMUFBczQ5LWvLc10iVcdonc2El1HcrvUCs+vAQKC2iGy t0IK79qpTaxgXEzSmeznfTRULuJZ4ixZiaHOINX7Lpiw+8bmNUmv1lvQeujsWfThZo +qrR2SkIbbo4Q== To: qemu-devel@nongnu.org From: Anton Kochkov Cc: Anton Kochkov Subject: [PATCH v2 2/2] contrib/plugins: remove Makefile Message-ID: <20230628162451.147419-3-anton.kochkov@proton.me> In-Reply-To: <20230628162451.147419-1-anton.kochkov@proton.me> References: <20230628162451.147419-1-anton.kochkov@proton.me> Feedback-ID: 53490844:user:proton MIME-Version: 1.0 Received-SPF: pass client-ip=185.70.40.134; envelope-from=anton.kochkov@proton.me; helo=mail-40134.protonmail.ch 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Anton Kochkov --- contrib/plugins/Makefile | 46 ---------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 contrib/plugins/Makefile -- 2.41.0 diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile deleted file mode 100644 index b2b9db9f51..0000000000 --- a/contrib/plugins/Makefile +++ /dev/null @@ -1,46 +0,0 @@ -# -*- Mode: makefile -*- -# -# This Makefile example is fairly independent from the main makefile -# so users can take and adapt it for their build. We only really -# include config-host.mak so we don't have to repeat probing for -# programs that the main configure has already done for us. -# - -BUILD_DIR := $(CURDIR)/../.. - -include $(BUILD_DIR)/config-host.mak - -VPATH += $(SRC_PATH)/contrib/plugins - -NAMES := -NAMES += execlog -NAMES += hotblocks -NAMES += hotpages -NAMES += howvec -NAMES += lockstep -NAMES += hwprofile -NAMES += cache -NAMES += drcov - -SONAMES := $(addsuffix .so,$(addprefix lib,$(NAMES))) - -# The main QEMU uses Glib extensively so it's perfectly fine to use it -# in plugins (which many example do). -CFLAGS := $(shell $(PKG_CONFIG) --cflags glib-2.0) -CFLAGS += -fPIC -Wall -CFLAGS += $(if $(CONFIG_DEBUG_TCG), -ggdb -O0) -CFLAGS += -I$(SRC_PATH)/include/qemu - -all: $(SONAMES) - -%.o: %.c - $(CC) $(CFLAGS) -c -o $@ $< - -lib%.so: %.o - $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS) - -clean: - rm -f *.o *.so *.d - rm -Rf .libs - -.PHONY: all clean