From patchwork Sun Dec 4 00:03:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 630857 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1747627pvb; Sat, 3 Dec 2022 16:04:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf6XoUsDHscNACAdkotd0Wm4QI76q6Li1b8tO6BKd1SPnkFwe8KdqvpDOHps2btZknR+Py0t X-Received: by 2002:ac8:4d05:0:b0:394:24cb:b18d with SMTP id w5-20020ac84d05000000b0039424cbb18dmr72737420qtv.468.1670112291455; Sat, 03 Dec 2022 16:04:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670112291; cv=none; d=google.com; s=arc-20160816; b=fnw3HkOiEzu/YH9Q1duJMFM1gvuMgre6v5jaiYyzGy3hcz4pdM7BT/KCdWF4g3TTGa WLsy8TUaTm1nKgGVQpo2JLh8dMURIaYXVzPZrCX/5jxZKirfA/nQv3XWONlg3JZAhEJ5 R7PTAtByw2YcV0VlO/SH80Lg09OD0AR84CfO0brs3dz3eLPMzEy/P9T2XZhwjXChMcXn S4u6PpigPN2mv44g2AZpE4cMDKPngJ7jPBif5Mr+Ogj97dD03HzyyYeuxRAEpyuIIy33 SNBhAi2iIKU5q2i/3/FpbDqRSt7muYe60JzUm8YMBDWk5SAXvHlqQP5b3ej/XvdGQDUd 01uQ== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=vNjsgcAi1s+qqB/0T1CtW2U318zYlBY2r650cvBjAws=; b=EixiNkr28lR+200Cj7f3WlQ5gtr1B52+JlRQlKQYyJv8mnuXFYpNdde3/TM9Sbyyxp PJu5/mV2MKJGyn/AtgGGMb14ZQmA80tiqLeKfh+tWqEVF4NBZuMfv64fyWMaRX1y9HX4 hf/BvtscE7uYCD80pET5GBjFhUkWjV/BoGjEwAgOgtdm0tJkyOikNhRudD3LDM12cqMs ao6NYmcm+Zz5KbI5zWOfJD4Zp/RDgTsmk6AxVA6TdfGpGslGdpTMBA1IwzhfAvWsO+9H 7zMM+xMIbgnLavPRE52UacydItUaDpzViXMCARYabtpX/2YNIyNV5zhgMkIJj07jtyu/ Zo/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YJyBY4hh; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id cc9-20020a05622a410900b00397ab5a9b1csi5955389qtb.220.2022.12.03.16.04.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 03 Dec 2022 16:04:51 -0800 (PST) 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=YJyBY4hh; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p1cTz-00043V-98; Sat, 03 Dec 2022 19:03:47 -0500 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 1p1cTy-00043G-5Q for qemu-devel@nongnu.org; Sat, 03 Dec 2022 19:03:46 -0500 Received: from mail-oi1-x230.google.com ([2607:f8b0:4864:20::230]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p1cTw-0008R1-Iq for qemu-devel@nongnu.org; Sat, 03 Dec 2022 19:03:45 -0500 Received: by mail-oi1-x230.google.com with SMTP id n186so9119211oih.7 for ; Sat, 03 Dec 2022 16:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=vNjsgcAi1s+qqB/0T1CtW2U318zYlBY2r650cvBjAws=; b=YJyBY4hhthneoUA/sEbvqMBiPNbszGCYnqohPVR3+JHF4gDkm+4+OipAKqCQKTkHp2 jc8ZOEKpPhCzoesO2xHCxhNtH8StfWWc2gnQljwRb213wA7Iu5A0iNsYef8WOtQ4Yu8l O7vcY2tY8uaKFwcQ4y1Jfs3PvJTkFfIWKKBtmHMytVZstLzMGuVbLZz5GIW78RnltG+b wZjkgLhjzSce4DlyCE0TOszhbbt/GxaxcMvZp6tqLG2vZrUDn0/NjuPH0eUFtgaM0kMR dA8vqoKECGBzN0t+enu8GMt8px/70xt2l3sud7Nvr+rhfQ2jmw1C3X32vmBR6hcEUY3A a+XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vNjsgcAi1s+qqB/0T1CtW2U318zYlBY2r650cvBjAws=; b=quD1iTNaAPfqxSBU1DNJuRvY8G2V/N4U+K/AvEa22Vn+9xXkNRmXXds1RdbBe6DbGV IiRcHVYwMsjGLo7WJl+0Lom3KcbT+btcL12jXhZztdW8ttFzDFfXBjN5zap7SZFPP1l1 MJUxSe/ISPOT4ighANQls/SiQNeh74mq+VgzoDSan6bmB3JVGRHmaKEbnc2ID5exFIDt o9unf0o9/htcXTdxuJ2GDQbKipyeaPyIiXzp46aRT253pmE1BUeN0KpkWWt3m8jkLE7V ITHxyhSyvyr/Aegmh6gXgQfDRG7CQI4H3Jvgq0mmRJiXNUJ5xt55alPfknf58V0kz96N 5XRQ== X-Gm-Message-State: ANoB5pnD3JLkgTXLqFuyHF8YZEjc3uYAasRCbTahVvMy+sKplzvulD7i EaoLF4xNgCQHuFsPRBTF76dFnHz+4RoLarxy8cY= X-Received: by 2002:a05:6808:193:b0:35b:c0ea:b59b with SMTP id w19-20020a056808019300b0035bc0eab59bmr11984545oic.32.1670112222713; Sat, 03 Dec 2022 16:03:42 -0800 (PST) Received: from stoup.. ([2806:102e:18:70b5:750e:f543:b9a7:14ad]) by smtp.gmail.com with ESMTPSA id bh8-20020a056830380800b006621427ecc7sm5277401otb.60.2022.12.03.16.03.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 03 Dec 2022 16:03:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com Subject: [PATCH] configure: Add --enable-lto Date: Sat, 3 Dec 2022 18:03:40 -0600 Message-Id: <20221204000340.282718-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::230; envelope-from=richard.henderson@linaro.org; helo=mail-oi1-x230.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 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Separately control b_lto without --enable-cfi. Also add --disable-lto for completeness. Signed-off-by: Richard Henderson --- configure | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 26c7bc5154..d9c9babfc3 100755 --- a/configure +++ b/configure @@ -301,6 +301,7 @@ fdt="auto" # 2. Automatically enable/disable other options tcg="auto" cfi="false" +lto="true" # parse CC options second for opt do @@ -837,12 +838,14 @@ for opt do ;; --disable-safe-stack) safe_stack="no" ;; - --enable-cfi) - cfi="true"; - meson_option_add -Db_lto=true + --enable-cfi) cfi="true" lto="true" ;; --disable-cfi) cfi="false" ;; + --enable-lto) lto="true" + ;; + --disable-lto) lto="false" + ;; --disable-fdt) fdt="disabled" ;; --enable-fdt) fdt="enabled" @@ -2591,6 +2594,7 @@ if test "$skip_meson" = no; then test "$default_feature" = no && meson_option_add -Dauto_features=disabled test "$pie" = no && meson_option_add -Db_pie=false test "$werror" = yes && meson_option_add -Dwerror=true + test "$lto" = true && meson_option_add "-Db_lto=true" # QEMU options test "$cfi" != false && meson_option_add "-Dcfi=$cfi"