From patchwork Thu Oct 20 11:51:48 2022 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: 616726 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp234937pvb; Thu, 20 Oct 2022 05:51:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Zxd6RysIXRL+nv5uaZ0HgsrHusW0LGVrddyS0+V2GV32+8gp8k35/fsBgZ46Y+SzUhIus X-Received: by 2002:a05:620a:40cb:b0:6ee:79ce:e985 with SMTP id g11-20020a05620a40cb00b006ee79cee985mr8969077qko.219.1666270282885; Thu, 20 Oct 2022 05:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666270282; cv=none; d=google.com; s=arc-20160816; b=kOh7i17+Bm+FrVSh1xWfoAUGmM3Its7fqk2Uq27J7ce6Eoc5ZHr5r2yPqIWRVM5ggv HIU/KuhHIzU/ZSa7X8IDRaO/EOdRdMbysS8burIcUZMB48f/uXml4VaYRL/f54VYWwmi dG+uT/Ec/A7eCsuRKADtGS+SHCV2+y4RynPL9bTrxRfwVa+T38sC/pD6z1JQ6wk8d9Sp 7tEDL7v/doWzprtH9OQ7Tf4+cVAYjsMyTVJ+5xIqRKH/o3EprkzM8mNRk24QJimmRsSZ io2o6siVrtG6+yyw1FEQ127tb5CVS8GzvH9zDwlGDUH+6XXgB/NByi+M9o43Z4eKLZcG hXkg== 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=y2r86cIkMVyRHBjasU8BLM80fUl/rbZ8N5I6eEXnTy0=; b=UmmxIIfj1vONqA98SBv/HzFYmvp3KTrgIH/bEUw+Z16PlFHO28wfm7oNRT9RwgoCVA +NmTnmQeuSMhv0TQuvE740ONiz2h5MlxzubDuXl99WGSJ/P5g9UaVYm9DUos0+XiIcj7 PO5cBVJsuaDkdjbCFAqZcLSKbu0zHAPQ0wVFuhlHQfDWssFzo/tbCW6fvU+mr47zgTw/ iIOGxF1pU/XJN1v+5Z78+p5xjC+qDAPwerSlzIMTtGNA/X05C050PFTYy7HLSzMHgv1c c5nCURz63YezCgMMsVEmVZe6OWJDgQaaubJtf4+8QhQSSfuV4IKgIAeBUiLl4nSxqBSn EsxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="ANRU/Keo"; 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 q26-20020ac8411a000000b0039cf9020039si3666806qtl.494.2022.10.20.05.51.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Oct 2022 05:51:22 -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="ANRU/Keo"; 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]:55310 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olV16-0008Cr-N5 for patch@linaro.org; Thu, 20 Oct 2022 08:51:21 -0400 Received: from [::1] (helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1olUt3-0000Qp-Ni for patch@linaro.org; Thu, 20 Oct 2022 08:43:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40492) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1olU61-0002dU-9G for qemu-devel@nongnu.org; Thu, 20 Oct 2022 07:52:30 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:34418) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1olU5w-0000nr-SI for qemu-devel@nongnu.org; Thu, 20 Oct 2022 07:52:18 -0400 Received: by mail-wr1-x42c.google.com with SMTP id b4so33935162wrs.1 for ; Thu, 20 Oct 2022 04:52:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=y2r86cIkMVyRHBjasU8BLM80fUl/rbZ8N5I6eEXnTy0=; b=ANRU/KeoHIaJWxrGXqWgW9XdXpCwu49JRqXdEZjgqrlK3KYAvFDY8CIV+3OtnyPQQX BBGNb2tzvXCPA9L74+wNH5qf+0sKLhpe7aUsvr6j1N+BJdsdsX5VQnkmMju6FrAMs9us YdxKyqWTMLJLk40pAzC/XawUvSQz1EF9ekOWEtvr0Cpn+DttGVvaXUO2JYT2Ne7RBAAB dwIp6bL7FW28MY2iKr7seIp7ndGbX0pZtcqEZXp8JD38b32+oJqXB68Ot8KvJxxoUvGt a2OshkqSUSR4mpJYierwmKh6z45VFhKcnxZzs7LDc1nDKYmkwndxDCCWxMAo/21MDpJi 4YwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=y2r86cIkMVyRHBjasU8BLM80fUl/rbZ8N5I6eEXnTy0=; b=VMLN9ITIuMf7RdSmxIh53c+u8yS4AO2hxS5xv7UvE/cim3WXtimVm7PfTNQAukDw7Y u7nDWGtaf+kUNdQyBxSlAFNHrp8JnDN7O16lovZlndShHDYezvdX2fPe/mE1kOviiaaH ylQXYi89egwV0QP+TUTgtqepE+CqwetPBt/B2qdHXDIc6IGQoj62ReDAAsZLKAA9fVkP 5JbzkZ5Rn3OHGsWAKxaCfZ98C2b1ozezRbYJ87H6IJE0EXf1oS59GAFIgoZ3spB37Ow4 Qf3chKYS0FK7dgQC/j/aA/ewDxd7TybMGRz4TZjgFomtv1QgHG48pPqCT6k6SE+PQA80 zIWQ== X-Gm-Message-State: ACrzQf1RRIqCBLS9T0mCB2knL7ANoSgLnXVX5Stv4K0up70QU/TFIARd 8bwqalXBO+m387fgsC1kj3gjCCK6A1+o/w== X-Received: by 2002:adf:db42:0:b0:22e:386e:f6af with SMTP id f2-20020adfdb42000000b0022e386ef6afmr8154492wrj.400.1666266735232; Thu, 20 Oct 2022 04:52:15 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id m6-20020a05600c3b0600b003c6c2ff7f25sm3045368wms.15.2022.10.20.04.52.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Oct 2022 04:52:13 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 832B41FFBD; Thu, 20 Oct 2022 12:52:10 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: fam@euphon.net, berrange@redhat.com, f4bug@amsat.org, aurelien@aurel32.net, pbonzini@redhat.com, stefanha@redhat.com, crosa@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH v3 05/26] configure: fix the --enable-static --disable-pie case Date: Thu, 20 Oct 2022 12:51:48 +0100 Message-Id: <20221020115209.1761864-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221020115209.1761864-1-alex.bennee@linaro.org> References: <20221020115209.1761864-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.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" The previous tweak was incomplete as it missed a leg. Fixes: abafb64b6d (configure: explicitly set cflags for --disable-pie) Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson --- configure | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index dd6f58dcde..8c2c4c1a04 100755 --- a/configure +++ b/configure @@ -1327,6 +1327,8 @@ static THREAD int tls_var; int main(void) { return tls_var; } EOF +# Meson currently only handles pie as a boolean for now so if we have +# explicitly disabled PIE we need to extend our cflags because it wont. if test "$static" = "yes"; then if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS" @@ -1335,13 +1337,12 @@ if test "$static" = "yes"; then error_exit "-static-pie not available due to missing toolchain support" else pie="no" + QEMU_CFLAGS="-fno-pie -no-pie $QEMU_CFLAGS" fi elif test "$pie" = "no"; then if compile_prog "-Werror -fno-pie" "-no-pie"; then CONFIGURE_CFLAGS="-fno-pie $CONFIGURE_CFLAGS" CONFIGURE_LDFLAGS="-no-pie $CONFIGURE_LDFLAGS" - # Meson currently only handles pie as a boolean for now so if we have - # explicitly disabled PIE we need to extend our cflags because it wont. QEMU_CFLAGS="-fno-pie -no-pie $QEMU_CFLAGS" fi elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then