From nobody Tue Dec 16 08:31:37 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1597082759; cv=none; d=zohomail.com; s=zohoarc; b=hDDYxfG5d6zU9kVD8n95UuPVmcRtUpB00iefUvNLSbQzPF6RyoSvrswyYAdRT/JypxlNVgglJRyuoV2AgHcrNPxg5tvcxAKSjqLzL9YbLDtWLvygjaIVzL8yI3QWUCV/Uy2zt2liEdDjN6B55MY6Lt6ivekiGSL3dX/rod+wkOk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1597082759; h=Content-Type:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=L5kT7YC92E9ItCT0APvjB6kCqOqqaEGiVBS1dbBXCbE=; b=PLbINDbCjj3jsnmQcNziCf4tl4NGAzRq2iq+Klzw226PrC+1cUefz4gD0QtKTsQ2WcsY0rn8u5n8z32rE0fpu55+//VaTMFAAkduniLM0syAlNZfQUmbNdOxHRorOH/Es7/341PJQID1uwr9+NUd1Sgi2nSiSSjyGg7VtbMi6hw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1597082759196987.3948852083415; Mon, 10 Aug 2020 11:05:59 -0700 (PDT) Received: from localhost ([::1]:43366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k5CBJ-0005Sa-SF for importer@patchew.org; Mon, 10 Aug 2020 14:05:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47050) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k5BLu-0003J6-EK for qemu-devel@nongnu.org; Mon, 10 Aug 2020 13:12:50 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:33114 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1k5BLs-0003MW-BG for qemu-devel@nongnu.org; Mon, 10 Aug 2020 13:12:50 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-84-gIXiGT-uNq6d3j_ktEBUfA-1; Mon, 10 Aug 2020 13:12:45 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D85A6106B242 for ; Mon, 10 Aug 2020 17:12:44 +0000 (UTC) Received: from 640k.localdomain.com (unknown [10.36.110.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 25DF95F1E9 for ; Mon, 10 Aug 2020 17:12:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1597079567; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type:in-reply-to:in-reply-to: references:references; bh=L5kT7YC92E9ItCT0APvjB6kCqOqqaEGiVBS1dbBXCbE=; b=XfszISQKwftn+/NnrEi7LhyuDwZjre0hJk4/PvIFk6gpMScRA3piEqjryeaETV/w47b/k/ Q15cxZSFldj4RsPBNr2Jh4JT5oKXe0A1fm4fAhKpN7ZJxL2zNDuUqGLtY/P3z7jWQh3nSI dO0bHbnobx1v5F4qllvjuc/MSdvoQfw= X-MC-Unique: gIXiGT-uNq6d3j_ktEBUfA-1 From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PATCH 130/147] meson: plugins Date: Mon, 10 Aug 2020 19:08:48 +0200 Message-Id: <1597079345-42801-131-git-send-email-pbonzini@redhat.com> In-Reply-To: <1597079345-42801-1-git-send-email-pbonzini@redhat.com> References: <1597079345-42801-1-git-send-email-pbonzini@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=pbonzini@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.61; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/10 03:29:25 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" For now link arguments end up in Makefile.target, they will move to the right place soon. Signed-off-by: Paolo Bonzini --- Makefile | 8 +------- Makefile.target | 12 ++++++++++-- meson.build | 5 +++++ plugins/Makefile.objs | 21 --------------------- plugins/meson.build | 5 +++++ 5 files changed, 21 insertions(+), 30 deletions(-) delete mode 100644 plugins/Makefile.objs create mode 100644 plugins/meson.build diff --git a/Makefile b/Makefile index 5e8f281..e3ccea0 100644 --- a/Makefile +++ b/Makefile @@ -413,13 +413,10 @@ endif =20 ICON_SIZES=3D16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 =20 -install-includedir: - $(INSTALL_DIR) "$(DESTDIR)$(includedir)" - # Needed by "meson install" export DESTDIR install: all $(if $(BUILD_DOCS),install-doc) \ - install-datadir install-localstatedir install-includedir \ + install-datadir install-localstatedir \ recurse-install ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_PROG) "scripts/qemu-trace-stap" $(DESTDIR)$(bindir) @@ -446,9 +443,6 @@ endif ifdef CONFIG_GTK $(MAKE) -C po $@ endif -ifeq ($(CONFIG_PLUGIN),y) - $(INSTALL_DATA) $(SRC_PATH)/include/qemu/qemu-plugin.h "$(DESTDIR)$(inclu= dedir)/qemu-plugin.h" -endif $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps" set -e; for x in $(KEYMAPS); do \ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadi= r)/keymaps"; \ diff --git a/Makefile.target b/Makefile.target index c180b4c..2b7280b 100644 --- a/Makefile.target +++ b/Makefile.target @@ -110,8 +110,6 @@ obj-y +=3D trace/ ######################################################### LIBS :=3D $(libs_cpu) $(LIBS) =20 -obj-$(CONFIG_PLUGIN) +=3D plugins/ - ######################################################### # Linux user emulator target =20 @@ -153,6 +151,16 @@ LIBS :=3D $(LIBS) $(VDE_LIBS) $(SLIRP_LIBS) LIBS :=3D $(LIBS) $(LIBUSB_LIBS) $(SMARTCARD_LIBS) $(USB_REDIR_LIBS) LIBS :=3D $(LIBS) $(VIRGL_LIBS) $(CURSES_LIBS) =20 +ifeq ($(CONFIG_PLUGIN),y) +ifdef CONFIG_HAS_LD_DYNAMIC_LIST +LIBS +=3D -Wl,--dynamic-list=3D$(BUILD_DIR)/qemu-plugins-ld.symbols +else +ifdef CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST +LIBS +=3D -Wl,-exported_symbols_list,$(BUILD_DIR)/qemu-plugins-ld64.symbols +endif +endif +endif + generated-files-y +=3D hmp-commands.h hmp-commands-info.h =20 endif # CONFIG_SOFTMMU diff --git a/meson.build b/meson.build index 2190d98..420e60b 100644 --- a/meson.build +++ b/meson.build @@ -719,6 +719,7 @@ subdir('net') subdir('replay') subdir('hw') subdir('accel') +subdir('plugins') subdir('bsd-user') subdir('linux-user') =20 @@ -887,6 +888,10 @@ endforeach =20 # Other build targets =20 +if 'CONFIG_PLUGIN' in config_host + install_headers('include/qemu/qemu-plugin.h') +endif + if 'CONFIG_GUEST_AGENT' in config_host subdir('qga') endif diff --git a/plugins/Makefile.objs b/plugins/Makefile.objs deleted file mode 100644 index 6f14d91..0000000 --- a/plugins/Makefile.objs +++ /dev/null @@ -1,21 +0,0 @@ -# -# Plugin Support -# - -obj-y +=3D loader.o -obj-y +=3D core.o -obj-y +=3D api.o - -# Abuse -libs suffix to only link with --dynamic-list/-exported_symbols_li= st -# when the final binary includes the plugin object. -# -# Note that simply setting LDFLAGS is not enough: we build binaries that -# never link plugin.o, and the linker might fail (at least ld64 does) -# if the symbols in the list are not in the output binary. -ifdef CONFIG_HAS_LD_DYNAMIC_LIST -api.o-libs :=3D -Wl,--dynamic-list=3D$(BUILD_DIR)/qemu-plugins-ld.symbols -else -ifdef CONFIG_HAS_LD_EXPORTED_SYMBOLS_LIST -api.o-libs :=3D -Wl,-exported_symbols_list,$(BUILD_DIR)/qemu-plugins-ld64.= symbols -endif -endif diff --git a/plugins/meson.build b/plugins/meson.build new file mode 100644 index 0000000..9608e52 --- /dev/null +++ b/plugins/meson.build @@ -0,0 +1,5 @@ +specific_ss.add(when: 'CONFIG_PLUGIN', if_true: [files( + 'loader.c', + 'core.c', + 'api.c', +)]) --=20 1.8.3.1