From patchwork Thu Aug 15 14:48:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 819426 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp1197383wrm; Thu, 15 Aug 2024 07:51:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWy1oizjUyKS8pAZu1X3dYCgXkRa+WPOYEMW94ABGmyo0XdQ6d+dlbVc7KfiqDCPfvLQJ42obXigFKp7z48ChpH X-Google-Smtp-Source: AGHT+IHoTS8x2e7xlsdxU0j7/9Z5MNws1qJgwDfYhxKU/KRiQJnZalxKWRQOZOz4a5n0Q16RfQDE X-Received: by 2002:a05:6808:159c:b0:3d9:385d:8747 with SMTP id 5614622812f47-3dd2997c41fmr7638942b6e.32.1723733481284; Thu, 15 Aug 2024 07:51:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723733481; cv=none; d=google.com; s=arc-20160816; b=ox9QmPgQz2+HsKQvnpBeAdNe476Yv6JU2P/beyZcpp12qGS5d+TKYD2vCQWX3XiVjc IfAdH7/V5X0hB520zN70kRgBQOitPZ8huKK0XSVcSizPHlSECq1FTPygS3yYiF6BWNK8 WlIl60O8DzYuh60SXTsmD9ror+VDgg6AjCKU/yB3evrvX+Lj3L61YEqWc5DUSJBhW05e NNm/8i0Pl9M+cORpCE6PXhnEyve3fup68+rIg5fWdxQovhGK7hmZSyBI1z+4jrkUXT9P FAk3APjRlRzASKUMR7MupGqyjWDWE+1IaWvvn8fFyvhjvXqeBks6N/uhkue8cgwv95Qt 8c/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FYuCdV1ZyypnBkOQom8SjG60bCuzuxobSZg1OwBHFdk=; fh=xR9vZYb7WOWmPV9P5VOSU9am3MBmVp7ZE+SgxbKHtYI=; b=Xi2k6tECIJqba4Qu0zDTGfE1kYHKYWUdcSCs6G+HpN1NpMaSF3flkiERU+0PFmEdQF p3A/CkkWlrCrHQtHO/q1C4Mk4ZJPvyZySLYNpsgd7vSknOdWnK8KMtCgnsub3t5nNVQD +wR8b/iOHJ1l3etcn3P8d3+PPgkitRWcXzGAVeDjcNTOaxCw8WB7weYQzjGBVJv+SI1J 1SlgYY9w96E1k5uUZq9b52tI3NBV4NyU9fLpLKNS6cXY2C/H9oKwQ9HeGWreeZVunhs/ 2ZCXj45HqVpZRRBYcc+t6/A7e+hSiOzvExTwfmVWFndgAImP/5sYP76zEViKjamMNpDy Jm0A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O2d5eFYa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-45369fe6be3si18594061cf.118.2024.08.15.07.51.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Aug 2024 07:51:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O2d5eFYa; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sebnH-0004Bx-KG; Thu, 15 Aug 2024 10:49:39 -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 1sebn4-0003VX-0k for qemu-devel@nongnu.org; Thu, 15 Aug 2024 10:49:27 -0400 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sebmx-0000Co-P2 for qemu-devel@nongnu.org; Thu, 15 Aug 2024 10:49:25 -0400 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-5b3fff87e6bso1341963a12.0 for ; Thu, 15 Aug 2024 07:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723733358; x=1724338158; 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=FYuCdV1ZyypnBkOQom8SjG60bCuzuxobSZg1OwBHFdk=; b=O2d5eFYarK8rjagqIDeHbgc3JGFlXkBXWDO1GqeL10a5wjvNeomQPZG7WhjLJ/oSs2 5jbF+U7e+rai1ryxhrUYoWIokJgjxe/jVsG3gEqdj1VAJnwIYspkul4VriJ/6VgHKCTp +mMQiO6eUCbUftzVXd0skSGoPI8Cb3M06d3aqvz5OFJXEoPBqItEerggZ/s/xjdgvFKh w3wPrK37E9vmM8C0rGujyAOeipVIw0NH+7/ZlrUy3ydyNOReqftgeyP+0RzArbzmN2tR yIyylRwX1pluOeqEmng0CxuWAoacJ8vSEXtA9t3BTpQv9WK69lfFxwh9ey++vXBtapLN cZbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723733358; x=1724338158; 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=FYuCdV1ZyypnBkOQom8SjG60bCuzuxobSZg1OwBHFdk=; b=hLcQ1KU9K6t2B9VsCg2WO4StQGzVhq30HbVA9aX066H1qETkDVJsgCObWdHDBGZrOo RoqAXcaIu9sXuZdFcldcbycUH6rvNgEzYyHkAskqwYESWl8EpYJrv7KDkR22TexSPCNv 7TfER46XMUzBhMlz9o465x8O7K4mbdBqeDXPwvjrpMXQWqyiqdfffqk6SVU/z6bG91mg h6wmpEv7y62M72SwFzjAgY5I9kiiZ0u+Vt/jyKcDThdsf5pbXMtnOT1RP5ZCmpLsbtMO V9tobm2HpiqRl9XXMl0ktNlA/flAaqVI47qzLzgD1fnFaeEtaSAPg6uN5RoLpP3In/zl jzJQ== X-Gm-Message-State: AOJu0YxeWAmSpv2Ayl06mIsTOqrwn4lqE3wQ8p5D0n0uBqqTwX9VdXaA cYhED8kHNzOG1RhCkBPgXB7JDETLkX5pyQkWzLGmLrzbM3y1QC8zz8zUN70cVOo= X-Received: by 2002:a05:6402:27c8:b0:5af:874d:1b7b with SMTP id 4fb4d7f45d1cf-5bea1c6ccfamr4177154a12.1.1723733357941; Thu, 15 Aug 2024 07:49:17 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5bebbdfb923sm964102a12.54.2024.08.15.07.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Aug 2024 07:49:14 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 71A825F9DD; Thu, 15 Aug 2024 15:49:12 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 08/21] buildsys: Fix building without plugins on Darwin Date: Thu, 15 Aug 2024 15:48:58 +0100 Message-Id: <20240815144911.1931487-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240815144911.1931487-1-alex.bennee@linaro.org> References: <20240815144911.1931487-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52f; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52f.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=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=no 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Philippe Mathieu-Daudé 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 invocation) 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") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2476 Signed-off-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson Message-Id: <20240813112457.92560-1-philmd@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240813202329.1237572-9-alex.bennee@linaro.org> 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 == 'darwin' @@ -12,29 +16,27 @@ if not enable_modules endif endif -if get_option('plugins') - if host_os == 'windows' - dlltool = find_program('dlltool', required: true) +if host_os == 'windows' + dlltool = find_program('dlltool', required: true) - # Generate a .lib file for plugins to link against. - # First, create a .def file listing all the symbols a plugin should expect to have - # available in qemu - win32_plugin_def = 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 = 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 expect to have + # available in qemu + win32_plugin_def = 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 = 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', +))