From patchwork Wed Apr 1 21:47:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 185144 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp1029325ilr; Wed, 1 Apr 2020 14:48:41 -0700 (PDT) X-Google-Smtp-Source: APiQypJp+/pJRJqT1upMVO5l4wl6K3/22l0zGXxNmZTyXhqjMlGixEE2je9j0U4zzT4LyROfVuHZ X-Received: by 2002:a05:620a:1207:: with SMTP id u7mr295165qkj.191.1585777721157; Wed, 01 Apr 2020 14:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585777721; cv=none; d=google.com; s=arc-20160816; b=oCz/IHRiGvyQxBFdokG44wGR2Uv4U864wuiU0U0IVdft26hvRi3fQVQjrnps2lBo/x gJJzE7VkdLsdpEMuBb3Mhi/t+5SgPsQ6mCvGHg2LTGFV+SaTYu9MKEfogIs+Gw6ypTWb gwKB5HWcp2XJPByfoMndsGJjoC+XlMaTd80G7HhalE/81qjSkdC+9hWDfdbX829D8bEp dHMrabpsIxeaYShBB3enuvkX4CgRtF4PiDFFUtWi4nBCmtJV+ecYTMZaY7pSC2G8V/p5 VvuANSvN1Oo7tyqSXig0o9BH5dE7+LdA6WHcWHtPSfWB5b4JHh5NuyJliYrnyeHVj7Aw r+bQ== 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:message-id:date:subject:to:from:dkim-signature; bh=xrDuAKgwVA8BL+xlHUkPyAY7LleeHRNeQBc0rfMPChQ=; b=tzSFvky5AbfrE/sNyAfPA5saYRA7l4YbXOM8KnL4dbt6J3B89zyjCwscM5Cv0cxe4i MqLdzFD329RsMH5grs+fI0jHxHIIH5cO9JhzLctbxnMhJ972FQxeEY5whRBxSsKBRPmw Ows2N2Tl2G/fsSrtg1pf1XejU4bSVtSva9y5S76j47Wbj1fnfERUxIlJHbH+pHCp3DkZ TZ7YyfDoKOTooppSLNZqFDSaJC3IDVSLJkt2+/uyNo1eTCUf5XswNY9r5ywVCNYYiIre ZIsVA50u3H/KIYbH9nY2Acpa1dp05RYys0uO6wdNgpmnytfnB2vkfGV+YnoM8/7Aj90j jpIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="eZ4/Bcqx"; 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 i28si2145774qtv.335.2020.04.01.14.48.41 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 01 Apr 2020 14:48:41 -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="eZ4/Bcqx"; 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]:37816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJlE0-0007IQ-Eb for patch@linaro.org; Wed, 01 Apr 2020 17:48:40 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42621) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJlDO-0007D3-KU for qemu-devel@nongnu.org; Wed, 01 Apr 2020 17:48:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJlDN-0003mH-3F for qemu-devel@nongnu.org; Wed, 01 Apr 2020 17:48:02 -0400 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]:46052) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJlDM-0003bA-PJ for qemu-devel@nongnu.org; Wed, 01 Apr 2020 17:48:01 -0400 Received: by mail-pg1-x544.google.com with SMTP id o26so774114pgc.12 for ; Wed, 01 Apr 2020 14:47:59 -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:mime-version :content-transfer-encoding; bh=xrDuAKgwVA8BL+xlHUkPyAY7LleeHRNeQBc0rfMPChQ=; b=eZ4/Bcqxc7kW4ZcbfK82qMKbRDPSfOrmCVJxIc/hzCJMApNt3+KiKKGS58eSPvbSkB DRViGYIEaONvkJkH80ajw3StNXYkjgXx+Y/mr6pdsz7djCVJ2Y4k2DWH8Sk1QYrtFUoE ELP3uG8zktdHVxizDeaOvtnlwhyzw5ivb8uTfynVidUUwu8Z3AcXYYvggH39FGQ2MQp+ m6e+BGok+7aoWzKB/TDW9U26slz/CzxLiKrcZ+bvUsrFek7sD3UyP0OVjjvLEkT/l1x+ zXtOeFI+41M/hzMd6P+gTq23qNtisFKRkhg/4kmXjdQ25gkY8lb2V/lB3ZZXsbVYtVzX IGsg== 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:mime-version :content-transfer-encoding; bh=xrDuAKgwVA8BL+xlHUkPyAY7LleeHRNeQBc0rfMPChQ=; b=Fzwj3Qw0sVJekOxxf/KWERgKTURFVGnVs6AckbyizGKV/WJDGfL5vSZQF84AwxLD6F FOR5pnERyuWMeFnhkd07SSIv2H0+91dAZ0CYB9d2iELZR1hnqPE+9AboKSE4b76qWY/f MM1xWPC4LAOUP8yhVVIt09NgyePlMtuUOyA75M1NKLOwZT+OD4l03zXU4XrxneLeu7fe DcbxMVvFhZ740gP+ymz6Ndv58YUtKqmjnuFSi9e5dhRvempR53+E/PjTFc+2SAlm3P9x 5b786XWMZlaHjeKqnzh9pCCQ9kz2I4U9BdpbqLsVm/A365WroS+wuwnzYt17lcdxcihi rDmw== X-Gm-Message-State: AGi0PuZaWo0rpC/mFoCV3bnPM4++X2/QjH0TvqXKibJeeqhaP6eJ9xF5 vvugsHYyS4vwkjwKHaTN0Yk3N2EF9ig= X-Received: by 2002:a63:8b4b:: with SMTP id j72mr217516pge.261.1585777677965; Wed, 01 Apr 2020 14:47:57 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id b189sm2268133pfa.209.2020.04.01.14.47.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2020 14:47:57 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-5.0] configure: Add -Werror to PIE probe Date: Wed, 1 Apr 2020 14:47:56 -0700 Message-Id: <20200401214756.6559-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::544 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: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.20.1 diff --git a/configure b/configure index 22870f3867..233c671aaa 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"