From nobody Sun Nov 24 12:29:35 2024 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=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1723580681; cv=none; d=zohomail.com; s=zohoarc; b=BeoxnjOUoANUnhbrm4aYq/bFVdiVtWloaO28VCzGrprbrCNHHTmyNZcjoQrgcUfXlSzLnefKMqfleauXuUtPU/D6w/6nIcCOLDawCQX9mADtyMhXia+XIT5EfIiDz+LlSoLM1SdIuyYz/grqkxvl115jGcR1uNsX7AhfzQPJcoY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723580681; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8K1C3X/MhQMRep+HimQDatYHRQUqPTx7ZX7Xy6/ZA3U=; b=SPXQ7UT+22R72y+rafLU+1adkNIRmeNm7c/azlHrzd6vRTPMcZmhcSd6AFxatowIPg2n25KyV1/YRvhRoJqQir796SR6/w2owCBc+QObIXddirkUA7uYrqwGxTQeY++gm+qN2S+OX/g1FaeQJ/n61TcAeTJnYeKYY/zXqrbiRNY= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723580681806922.7671311555853; Tue, 13 Aug 2024 13:24:41 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdy3l-0005RF-7B; Tue, 13 Aug 2024 16:24:02 -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 1sdy3j-0005NT-RQ for qemu-devel@nongnu.org; Tue, 13 Aug 2024 16:23:59 -0400 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sdy3R-0006Cz-0O for qemu-devel@nongnu.org; Tue, 13 Aug 2024 16:23:59 -0400 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3683f56b9bdso3888734f8f.1 for ; Tue, 13 Aug 2024 13:23:39 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36e4e51ebc2sm11228817f8f.83.2024.08.13.13.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 13:23:34 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 25FD35F9E6; Tue, 13 Aug 2024 21:23:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723580618; x=1724185418; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8K1C3X/MhQMRep+HimQDatYHRQUqPTx7ZX7Xy6/ZA3U=; b=f4R3VzB41z0tyDSiA/kinJjA4wV2z5S8JhLV6lAENTw6X97Gj88Y3sv4ZTaO7Ol1DL 1Rr8heyItrZmMjT0ZYbz3nWBxDBlnRcYabFzQNQaWgCQz/GZ8NDygLuvv+rfaD1gWCLh Zrq0ApOwxtuJHRJq3uD8zBpQqOYfiFyx6HaWIEgEQcJUe/qBndhnzJRWPIFBH5h1HBJi RyxyTwUuhoghg8qk0XwUJFTC9jeBjmS44FgiPd9ldfCPzMisZYOg72hC79FILnvUTFQG L415foepNLdqWp3poBF1Y7QUxeg9v+bvScPeTdFlFpKTxKSotag+AV+GuKMGcl7lkCNf Ql2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723580618; x=1724185418; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8K1C3X/MhQMRep+HimQDatYHRQUqPTx7ZX7Xy6/ZA3U=; b=P9T636QINO/BiQ4TjnlMn242GSe4TjcGWqzB/uJQKGVvsgIWsVvMBx5rbnCSRos1yq VAmsCRJqHaH0CHKSC1xvvwnYu4z06B0g4LDwliEQ/G2WWX2L58uwCXzKBd78ulLowoee Tycb9jcw3Q8je/RsxCsldv7QPi//CINNCHB0EVnhYqgTbFQcj1UD4x+Au+HYKmu+CFj6 s+/UezN07pDMvJwLRA8qNn6ZaIOCB0sM95WnrpW+JLxzl+eCH65YTXz1rKZyrYsBy7QR /oxObzaS6Rvgo6HYgLKkGwBM605F1qTOlP9B9nkxVsGIkxRSwFwbNlCvoFxru8UHKKxZ +8pA== X-Gm-Message-State: AOJu0YwK2bzSW9bEl5r87KylY63XvkOZVlFLDWQLyBoMtZo4fAT6wgQw BxlRKAaGuBOdRJzK2InndlzIN3Zvh2omvbJnlsqeUlm6cQIh6yppZa83mxvPez0= X-Google-Smtp-Source: AGHT+IEU+aaBShj6NyVlR1MYI7wsafuWxTum9koxEZZyFw+THPkXCTfrrGOD44yAHcYOsLlxxnwvpw== X-Received: by 2002:a05:6000:1fa1:b0:368:31c7:19dd with SMTP id ffacd0b85a97d-37177769777mr575507f8f.5.1723580617875; Tue, 13 Aug 2024 13:23:37 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Alistair Francis , Michael Roth , Palmer Dabbelt , Mahmoud Mandour , Pavel Dovgalyuk , Yoshinori Sato , Weiwei Li , Eduardo Habkost , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Markus Armbruster , David Hildenbrand , Beraldo Leal , Liu Zhiwei , Eric Auger , Song Gao , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-arm@nongnu.org, Peter Xu , Jiri Pirko , Eric Blake , Fabiano Rosas , qemu-s390x@nongnu.org, Peter Maydell , "Michael S. Tsirkin" , Daniel Henrique Barboza , John Snow , Alexandre Iooss , Konstantin Kostiuk , Pierrick Bouvier , Cleber Rosa , Ilya Leoshkevich , qemu-riscv@nongnu.org, Thomas Huth , Paolo Bonzini , Richard Henderson , Jason Wang , Bin Meng , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta Subject: [PATCH v2 08/21] buildsys: Fix building without plugins on Darwin Date: Tue, 13 Aug 2024 21:23:16 +0100 Message-Id: <20240813202329.1237572-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240813202329.1237572-1-alex.bennee@linaro.org> References: <20240813202329.1237572-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2a00:1450:4864:20::42f; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42f.google.com 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1723580683384116600 From: Philippe Mathieu-Daud=C3=A9 Since commit 0082475e26 the plugin symbol list is unconditionally added to the linker flags, leading to a build failure: Undefined symbols for architecture arm64: "_qemu_plugin_entry_code", referenced from: ... ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invoc= ation) ninja: build stopped: subcommand failed. Fix by restricting the whole meson file to the --enable-plugins configure argument. Fixes: 0082475e26 ("meson: merge plugin_ldflags into emulator_link_args") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Richard Henderson Message-Id: <20240813112457.92560-1-philmd@linaro.org> Signed-off-by: Alex Benn=C3=A9e --- plugins/meson.build | 50 +++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/plugins/meson.build b/plugins/meson.build index 18a0303bff..1cc039d29b 100644 --- a/plugins/meson.build +++ b/plugins/meson.build @@ -1,3 +1,7 @@ +if not get_option('plugins') + subdir_done() +endif + # Modules need more symbols than just those in plugins/qemu-plugins.symbols if not enable_modules if host_os =3D=3D 'darwin' @@ -12,29 +16,27 @@ if not enable_modules endif endif =20 -if get_option('plugins') - if host_os =3D=3D 'windows' - dlltool =3D find_program('dlltool', required: true) +if host_os =3D=3D 'windows' + dlltool =3D find_program('dlltool', required: true) =20 - # Generate a .lib file for plugins to link against. - # First, create a .def file listing all the symbols a plugin should ex= pect to have - # available in qemu - win32_plugin_def =3D configure_file( - input: files('qemu-plugins.symbols'), - output: 'qemu_plugin_api.def', - capture: true, - command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@']) - # then use dlltool to assemble a delaylib. - win32_qemu_plugin_api_lib =3D configure_file( - input: win32_plugin_def, - output: 'libqemu_plugin_api.a', - command: [dlltool, '--input-def', '@INPUT@', - '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe'] - ) - endif - specific_ss.add(files( - 'loader.c', - 'core.c', - 'api.c', - )) + # Generate a .lib file for plugins to link against. + # First, create a .def file listing all the symbols a plugin should expe= ct to have + # available in qemu + win32_plugin_def =3D configure_file( + input: files('qemu-plugins.symbols'), + output: 'qemu_plugin_api.def', + capture: true, + command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@']) + # then use dlltool to assemble a delaylib. + win32_qemu_plugin_api_lib =3D configure_file( + input: win32_plugin_def, + output: 'libqemu_plugin_api.a', + command: [dlltool, '--input-def', '@INPUT@', + '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe'] + ) endif +specific_ss.add(files( + 'loader.c', + 'core.c', + 'api.c', +)) --=20 2.39.2