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: 1267483 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=UIeWE+PU; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48xX955Bwqz9sR4 for ; Wed, 8 Apr 2020 01:57:11 +1000 (AEST) Received: from localhost ([::1]:49762 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jLqb6-0004Fn-3P for incoming@patchwork.ozlabs.org; Tue, 07 Apr 2020 11:57:08 -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-Google-Smtp-Source: APiQypJjyQC4nhuXBrRzo9HiHGAOIvGV6uAAsoIWEvL52UYelOOTmB40hJswWbFrqV6FP5tbgWukAQ== 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+incoming=patchwork.ozlabs.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> 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"