From patchwork Tue Apr 7 15:51:17 2020 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: 185250 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp5016501ilr; Tue, 7 Apr 2020 08:56:49 -0700 (PDT) X-Google-Smtp-Source: APiQypIZS42Mp242qvrT47pBNcOUNUJ14cDBAJkDUDOhbDcAvY/J8pzfzs0RD3B34PEqJX9ZUV6X X-Received: by 2002:a05:6214:906:: with SMTP id dj6mr2855172qvb.36.1586275009573; Tue, 07 Apr 2020 08:56:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586275009; cv=none; d=google.com; s=arc-20160816; b=XPXOufeM+m/xeQHWoqa79JGdP2nzghaQyW2fz8ZFcr62JfZ3BOHhPr1dNbdMe5gPg+ 83HRsVUVHp28uWapz021dbZ/f1BeNtnZm5LRtX6gnXFBMBqz6Cl7GPRH+1z0w3SyoHop Hr/0rYaUrsM27SkpOQVPOWrHB61uLm5m1kejOEvi6OLEeZbOcGnOa0xbs1OaWnPkWlbA lwERXbFu8+U/ddmiSNskMDJEUBgSfqmYwFlOMMpmwAqY4+CG70v1eFH9xjL92liYj1K0 9vKqjH8ttkhUTwgbZKUerxRgQPcSalywsWzrivlA9K3IcT1N93Qad3wk0T0m0N5zrXaB aD1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=DZhF2Eah6PBu0UmOWylByF6k8/eL6tyE6oC8t+Hk8gw=; b=BBmhNBeunCz2mnwmPdOfq8rY70t+bZJVYeMmN4RUq0Ne2PE5jKcPuE4L4W6dtLuB1Z MHJg06WgSadeo5e2nghA7HFuhLLXqlZIRs6QZShYRJAIBOqJNvXlBR9IfeOfJwcuflT7 gvzKt3nTHW4FCYuVm07p1kuNa15DQM+LpBkNs2wh7fiKAgxydNc7REusOMJ8X7ZssijD ua25Ts8OVL5wEhLcT86Fdl5WzVzdtke2Gq60CZtG/+rJw4ppWTeU/WMUovYCMQzjJFWM nqVaIe/InmRmG9u4cAAK9SOoC8nUzv+xtpSQEJok37T3IYlmVtGRXx+mAmOCTE5Iw655 AQxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UIeWE+PU; 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=fail (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 g6si2151642qvy.39.2020.04.07.08.56.49 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Apr 2020 08:56:49 -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=fail header.i=@linaro.org header.s=google header.b=UIeWE+PU; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:49762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLqan-0004Fn-1k for patch@linaro.org; Tue, 07 Apr 2020 11:56:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43747) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLqVl-0003ku-Je for qemu-devel@nongnu.org; Tue, 07 Apr 2020 11:51:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jLqVk-0004S0-HR for qemu-devel@nongnu.org; Tue, 07 Apr 2020 11:51:37 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:35887) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jLqVk-0004RS-BT for qemu-devel@nongnu.org; Tue, 07 Apr 2020 11:51:36 -0400 Received: by mail-wr1-x434.google.com with SMTP id k1so4504660wrm.3 for ; Tue, 07 Apr 2020 08:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DZhF2Eah6PBu0UmOWylByF6k8/eL6tyE6oC8t+Hk8gw=; b=UIeWE+PUqdeeMcb4I8uiCEgsyj25vatF1rEm1kwXx9rHPR8KxR3JVBUmy6EBiMz1lv jQjUzahruWdAtRlS0MxxFEWXl+wy0NL8QUstg69IOdg+I6UmCwdqK+tUyC5+sNkNWmc2 H3cVLXuvJlmHA4b7/jVwsAf8FdTlFO6biW1kYjuzWzvIicuRFlNA1r43To462wMOYrQx O5ZSCwI+tPlcYrcMzGAKptjcS6Zw6uWCjmW2HwmOlg6Ic8JC8p4yedzxWz9GIEq/soXE 4SPVlaJ0COcvCJj7NjHGi9egVeEq2sMJ8ptDjCCfnVcP8gswkJPukxbzMNksVLKSstpH 85Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DZhF2Eah6PBu0UmOWylByF6k8/eL6tyE6oC8t+Hk8gw=; b=WzF05OBTv9M46xcu1nLqVi9ybWTLNgsHkQHp/LhXyMuKSX1IM+GFx6PaUETeL98xwp jbkbXu7FPvLileu9RwJRiCWPb7CTHxa5xTxuvutoSD75SyyeiwmUs8l1UEYMrScyOO+Z YQK2npe8BEfmeqL+D4InjB+l4F8uNzeXrtQyqtgNvGV4fQTgQs5xwvdxtcdfDprVjWGo XRoMAB7mlFnosPStEuEMEdEV+B6+T/yXfXWE32Xbr06h410SR+vAf7pY1H9o0UTwtpxt 3Wt1Yjhyb8btWs6a0fwt5zTEdlhoFLAzjJhfwM0RqlZgWAp1j3iHrdMySZ7enQeY0TRJ VPog== X-Gm-Message-State: AGi0PubslbtdTi9tzy9805i7KKGKguyNvnbxgcqgcLQfsMEd0G9/DSnf ZkKXRpjTC0ODF4ZD53Z4mQQe9A== X-Received: by 2002:a5d:6204:: with SMTP id y4mr3625126wru.410.1586274695169; Tue, 07 Apr 2020 08:51:35 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s7sm6888848wrt.2.2020.04.07.08.51.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Apr 2020 08:51:33 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 52D221FF9B; Tue, 7 Apr 2020 16:51:19 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 12/13] configure: Add -Werror to PIE probe Date: Tue, 7 Apr 2020 16:51:17 +0100 Message-Id: <20200407155118.20139-13-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200407155118.20139-1-alex.bennee@linaro.org> References: <20200407155118.20139-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::434 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Richard Henderson , qemu-devel@nongnu.org, =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Richard Henderson Without -Werror, the probe may succeed, but then compilation fails later when -Werror is added for other reasons. Shows up on windows, where the compiler complains about -fPIC. Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20200401214756.6559-1-richard.henderson@linaro.org> Message-Id: <20200403191150.863-13-alex.bennee@linaro.org> -- 2.20.1 diff --git a/configure b/configure index 22870f38672..233c671aaa9 100755 --- a/configure +++ b/configure @@ -2119,7 +2119,7 @@ if compile_prog "-Werror -fno-pie" "-no-pie"; then fi if test "$static" = "yes"; then - if test "$pie" != "no" && compile_prog "-fPIE -DPIE" "-static-pie"; then + if test "$pie" != "no" && compile_prog "-Werror -fPIE -DPIE" "-static-pie"; then QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" QEMU_LDFLAGS="-static-pie $QEMU_LDFLAGS" pie="yes" @@ -2132,7 +2132,7 @@ if test "$static" = "yes"; then elif test "$pie" = "no"; then QEMU_CFLAGS="$CFLAGS_NOPIE $QEMU_CFLAGS" QEMU_LDFLAGS="$LDFLAGS_NOPIE $QEMU_LDFLAGS" -elif compile_prog "-fPIE -DPIE" "-pie"; then +elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" QEMU_LDFLAGS="-pie $QEMU_LDFLAGS" pie="yes"