From patchwork Mon Oct 31 13:09:46 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: 620225 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp2816059pvb; Mon, 31 Oct 2022 06:16:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ayqRJ0WJdci1UWqy6mPI6ISpQh9Lq6ji4v2r41kTNLgdfRuVkP4BR/Vdty2qOI4+LZav+ X-Received: by 2002:a67:b008:0:b0:3ac:dd43:518f with SMTP id z8-20020a67b008000000b003acdd43518fmr759541vse.23.1667222204019; Mon, 31 Oct 2022 06:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667222204; cv=none; d=google.com; s=arc-20160816; b=t64ibBrhnwCmSbZekEDXmw/nCQyKSQUK7Rq4Rpcmz3QQ7K8vIivVQ/V09XDHDIcaki kaJng56MQjMjcCeCGSOaJBZsGLzrUhYwh7DHAwEj6Y4noQqxn5skVl5V8+/n6QqbTnnA 2t557rGtBNgCBPR0x+l3q1hIYg4sn4tYTSqC192oyHICxuf2wHicx8S6upl10Sv9dgiQ LamF75okypOVJNVDbjEMD2emGIzRgKQGcrrXI0jQLbhQhBTUxSHpuI6Awghujf68n3Kb ZBM02aixDE0y5Af2BH3x4tKXNdkn/rESgl46TudWtLPb30dmwv5kIKReVEQkwO1CzWML pgeg== 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=dBvi3VZceGTEMcPqjFN49HgzxZm4w6xNmyJ+VxQfgwg=; b=o3keMDY4RqOLlcUR2YdlqnYu791o5xKUDre2g4x6NsoPocBP+7LRpjI6zK0F95mSko pvPb9xSHH5Kdy6nIicJQ8r7NQGb07RUrHhlkdT4ojHbDV/4i6xKvAQrDxmAN13+fz05i wl5yHNTUrtl6BIUPs6KXP9lKRvxTIZ92JI4MRPlwzmHDiDQm5yKaArGAWmEiBiRcUMWM 1IbsZ7uv8NPl5zA1PYQD8HqkM4z9DPeyMws0TEwGb5gldEd/hSaIYcsiwwx8BBLI6sub UbdPDHJi6pZFC9MgxGoSEyKBA7h0Gl9KqQfonx7fya9mMdqdyag6eV8un6myRYa3oyg0 uczg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=whj1AdWj; spf=pass (google.com: domain of qemu-devel-bounces+peter.griffin=linaro.org+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+peter.griffin=linaro.org+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 bj3-20020a0561220e4300b003b7e5c5d77bsi1158498vkb.41.2022.10.31.06.16.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Oct 2022 06:16:44 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+peter.griffin=linaro.org+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=whj1AdWj; spf=pass (google.com: domain of qemu-devel-bounces+peter.griffin=linaro.org+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+peter.griffin=linaro.org+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 1opUYv-0008VO-Nf; Mon, 31 Oct 2022 09:10:45 -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 1opUYX-0007tj-Ue for qemu-devel@nongnu.org; Mon, 31 Oct 2022 09:10:26 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1opUYV-0001EC-13 for qemu-devel@nongnu.org; Mon, 31 Oct 2022 09:10:20 -0400 Received: by mail-wr1-x429.google.com with SMTP id l14so15932744wrw.2 for ; Mon, 31 Oct 2022 06:10:17 -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=dBvi3VZceGTEMcPqjFN49HgzxZm4w6xNmyJ+VxQfgwg=; b=whj1AdWjcv0micpHvXuoKDB+G5bjLxVe3JUVgwURYSCx7Bko7HEaEA6+yUDGdQ8fcI SYhxsOr36KNu1bPAd+mgeRE1pAbT2DSsB+ruF6woQ2Acegyf4s2FkDgTKalsBzfMsbRy X2QvHz086Y49Bi1w7Ts40Q5569HRn+MWr2YBxYXPM/vO+JX9rJtJgPM0DB1PDE5EhqqC MzD/krl5WXI4gNY2MqJb8dcYIkViTcbUqGXZ5UuoHxmKmAwzzDu3qHZj1rFQMTgMBsmV NW9jKyuD81RRPRlctxZiyF/hvaNjmnNhot4kLqO3XjoFlxcCw/Z2Ahc39WdwviarELfw Zx6A== 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=dBvi3VZceGTEMcPqjFN49HgzxZm4w6xNmyJ+VxQfgwg=; b=5//eFp4zQkPwue0l2T7h8uEj+TIqWug657hTqi6/T7G6d/om3yiV71QUU6se3TDiMA fo3yf73qjeJlWCTU7/mv9+eRxxbmA5GwOJdcMYgDWDiSmyB5CqyG56MDV25kQCxX3HIx 34guNermNl9+m5XbvXifGBCpWTXNUMOHruUasQgyQo5ZvhXGcLApnbpt3DLS4Onxyocw 6K+7rREdgMIqJQfT0rEGsqAImnAwqgGQ1UUB5+sVEhqZ/cbSoq2LHx/GaZcHda37lL+M caaXYISm5HrtDcuA/xaN6GKCZugfyEaydbbZ0nCpaUKw/AigmStYQN3pitFIcsd21R90 Lp2Q== X-Gm-Message-State: ACrzQf1qt6th72Z0GlpxRX6KMVcc/XTPit4njtIVCxQG6Qxm0fxMRh+e ASVqq9ixiXa3thiQxNB81JkXzA== X-Received: by 2002:a5d:522f:0:b0:235:c877:5cdc with SMTP id i15-20020a5d522f000000b00235c8775cdcmr8172088wra.352.1667221816193; Mon, 31 Oct 2022 06:10:16 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id h10-20020a05600c314a00b003a1980d55c4sm7435731wmo.47.2022.10.31.06.10.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Oct 2022 06:10:15 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id A4CA31FFBF; Mon, 31 Oct 2022 13:10:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: stefanha@redhat.com, =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , Paolo Bonzini , Thomas Huth Subject: [PULL 07/31] configure: fix the --enable-static --disable-pie case Date: Mon, 31 Oct 2022 13:09:46 +0000 Message-Id: <20221031131010.682984-8-alex.bennee@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221031131010.682984-1-alex.bennee@linaro.org> References: <20221031131010.682984-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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+peter.griffin=linaro.org+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 Message-Id: <20221027183637.2772968-6-alex.bennee@linaro.org> 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