From patchwork Thu Oct 27 18:36:11 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: 619197 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp489708pvb; Thu, 27 Oct 2022 11:40:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4PTsKdWURG5i3I4l8ylqq2zJgdSKguGydx559H0JX4lv2scgxlONgnaVmZhgleDR+9ER77 X-Received: by 2002:a05:620a:2403:b0:6ee:c92c:c292 with SMTP id d3-20020a05620a240300b006eec92cc292mr35817537qkn.395.1666896044337; Thu, 27 Oct 2022 11:40:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666896044; cv=none; d=google.com; s=arc-20160816; b=TWSWgCEMw3vsyfnPT6KpNZaV7kQgCygRmgenPVeh0mzWEFOQx07b/9Q+1ScI2DKgqn i4VN+tACV5WkJNHG/Nozm5IP/YKmH2CpUNb5rx8uaRYCwAesWlDpPNUeUZHrhdEfEPQA vBYpHEKRgOKCHpS2sOTxolEHYiFO1cQSqtC4Cm5QeQvxmQA1sGuy4cWLorHY5gb+qySF BF1YWK3c69nItFyesh0YBxPkMLSXhWR5tpux5dF2QSi2YQz4i+94OW4on6cDNcr7CE59 6K37Fxh4k4ySuw3S44cYyplri378MLguunX9Fwy2G1b0Er/O92VD7cJt0YHBPm0LZ/Ch jjJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender: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=GnES94/DJeVFvfAsPrcBucSZj64IFR2JBDhsiBY7Dis=; b=hGGAdqeTfvt5JynYVS/96c2epZyHLmZcc14OOv+yqLjQmx/FDnLh3CIeVFdWEruOAe icJsLyr97vs3nRG2TZMI7a7KT0KHFV942eNMbsLJu/lHcOAQMNB+hSnXF7TodzQRccYe ZutEgUa9h2CV6MEhWqcp3SuHYjvV1ZZF5ZWu+WjUps+c24tJ2daV8XiX1JuvNqjWfr/1 3QCvt2Ziql3xicbntG8PxrK6mb/UeTLJj+Slfjt1FTv7efklX6rP54LSb9vi1aoJEYAi XSyrRNuwnsp0X0kFyFM11rE91sxqg1S5mtFcltQPpGDO8RNv5H8zs3wyV8qpYv4DTzz1 35rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mpacPcsz; 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 e15-20020a0562141d0f00b004bb7d1b570fsi1296062qvd.442.2022.10.27.11.40.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Oct 2022 11:40:44 -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=mpacPcsz; 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 1oo7mP-0002ON-IQ; Thu, 27 Oct 2022 14:39:01 -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 1oo7kG-0001L0-Pr for qemu-devel@nongnu.org; Thu, 27 Oct 2022 14:36:49 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oo7kD-0003Ka-Re for qemu-devel@nongnu.org; Thu, 27 Oct 2022 14:36:47 -0400 Received: by mail-wm1-x336.google.com with SMTP id c3-20020a1c3503000000b003bd21e3dd7aso4816942wma.1 for ; Thu, 27 Oct 2022 11:36:43 -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=GnES94/DJeVFvfAsPrcBucSZj64IFR2JBDhsiBY7Dis=; b=mpacPcsz0mRaCu8ruJSD8UZANSJM+Zg5a6wPQ3FB5RFyrYIJd4/sIt8k0goOUS26gz LX6ErzLd/bt4+dpcduW+mVsyP2WwTvPMM36FnRQhcImIMfwDaFjLQw9BD4HsbRF6pwqj bhzJ0au3av13Et0DccgEL5fSxjnDKF/RzxO5GThOmZmobkt2VlO4CfdqdjvkOjgxZxak fk8fwtvo1oMPIr1QNP41Q87f2nXUaTMW9fL4L5Me/0Wpu3DvMjOqGgDeE0rEoeCkWysO RK00n+qFY69LyIxO20/hvIfDEM1L1qmDhpC+ntcLrJtfLf+zbwfhuMdfEfHL0vfEHiuX ZdGw== 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=GnES94/DJeVFvfAsPrcBucSZj64IFR2JBDhsiBY7Dis=; b=Ac5PzoMRNAzmxHOCu0E7syY8tdpG3q2YJnaVE2r1KudHntKo705//GlrwUfis2sirm OZoyH/dZFerc+yjcwgCaC3IOlgQE0cWVu1orX3yhjQhhelysVhjHJFh5ekh/7nhtXlbP xTfIyDMtuggO5KHDBBB5wyoUDXUg7J81y17VInas8b8XX/dPjZKECjc+DnKwfZTHf1fQ 3jU9QS8rwHTiwJQE/uI669EDIBhMrc75WYGylDC3SKhrRkZr4hWKQRyp9VHjMADkyQ4q qubHB+hLwGAaSD/Tb6qDBq3L6DEPAUVP2GkZITjI4ZxsBDkXyUtsPnScSuYbAnGPqanR q0Fg== X-Gm-Message-State: ACrzQf0SuS9ZhO4bQJfWyovXP6eayb5Q2NahTTPQ7RXq4hfS50d0FG3b 7Z3lJCD/9f0Lzrxkxs9O9u9IclHQ6qYuMg== X-Received: by 2002:a05:600c:4ec6:b0:3c6:c469:d295 with SMTP id g6-20020a05600c4ec600b003c6c469d295mr7008418wmq.117.1666895801782; Thu, 27 Oct 2022 11:36:41 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id n4-20020a056000170400b002302dc43d77sm1915743wrc.115.2022.10.27.11.36.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Oct 2022 11:36:40 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id CE9F91FFBD; Thu, 27 Oct 2022 19:36:37 +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?= , Richard Henderson , Thomas Huth Subject: [PATCH v4 05/30] configure: fix the --enable-static --disable-pie case Date: Thu, 27 Oct 2022 19:36:11 +0100 Message-Id: <20221027183637.2772968-6-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221027183637.2772968-1-alex.bennee@linaro.org> References: <20221027183637.2772968-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x336.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: , Sender: "Qemu-devel" Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org The previous tweak was incomplete as it missed a leg. Fixes: abafb64b6d (configure: explicitly set cflags for --disable-pie) Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- 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