From patchwork Tue Mar 31 03:54:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 185082 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp3244865ilr; Mon, 30 Mar 2020 21:00:19 -0700 (PDT) X-Google-Smtp-Source: ADFU+vunlFLfmys0nYKUBKZWAebT7AjfCuINL6n4TTChEUDBmSuP3Ahohh/KvIEe6eWlN8aGXyMg X-Received: by 2002:aed:3c10:: with SMTP id t16mr3203961qte.45.1585627219614; Mon, 30 Mar 2020 21:00:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585627219; cv=none; d=google.com; s=arc-20160816; b=Qp1JTDP1cYehnO8Q+X/7NjdeUw0MLIcoXAxSol3KqmuFaPsEYe/1Vd150Usr43ulsC pZlIOZPhsV8aU6xmKQo0euAAPOsg8k6B1rvsRy7ax4VyHfma00mioEIQYlg8fJNJ2VpC 0milRAFDflGc9wSeGRgT/mxOoOP0Bc4nrhp/Ihv+VVxFyJPXFX8DHvaGD7VYaOH7h2mT yfNy6AHaGbsk0K3NIyUYncMY1VHdl6l6uZ1pECgJafSR5ZiAjcf24/NVndXFlWyjkbmj j5v4NBdzGyuXzy53avcitVCXuFW/xSzDFykk/SqYHJA3VhJlmFGEBhhxx7+Vzv+uzJJA Nygw== 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=nFUQTfUSKaEvMkBYs+/kSP9YEBdIr8bGAjyzPCvPYkQ=; b=b2Phm25ZrX1rQCshxhNVV52BvUl4aEGfYMxOAFIZ+u0ejCPi1i0PmHssyYr+g3ZL52 1nBlpJYutL/hUKFkKQBTIDzhdiTn7O7AcnBajF9c00iXu9ADbjoePMSHc0Lu2Hp9ekmw FwKNrGf8ShK9QlGcg0eIiLBRIgHQckTGrH/0mrQUcgdWUW0XJVUnNlp94eKWiD1YjRwC zhgAJPi7anAiRkrRAjbRfd+G958Sbm6ZYGTd6yvdICv5dXhbpoOQVIKl75aONYPOglrA 24izgs+lNC+uSxySNu4JMY5C/lu1/eqB/sZdFquizOeHQ1SltSp7IZ5aAozY+AUR4VV0 busA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Ek8AHqbC; 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 x6si8865808qvn.7.2020.03.30.21.00.19 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Mar 2020 21:00:19 -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=Ek8AHqbC; 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]:60100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ84Z-00069R-1j for patch@linaro.org; Tue, 31 Mar 2020 00:00:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60847) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7zX-0004dh-SA for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7zW-0008Eu-PQ for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:07 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:43908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7zW-0008Ea-K3 for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:06 -0400 Received: by mail-pl1-x642.google.com with SMTP id v23so7599875ply.10 for ; Mon, 30 Mar 2020 20:55:06 -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=nFUQTfUSKaEvMkBYs+/kSP9YEBdIr8bGAjyzPCvPYkQ=; b=Ek8AHqbCycWVJDm79edQGPIqhsWrWcw4RfwumJ/TYaZfgZohPLYtoTYKfuqpQjiEfV iZqLRmQJLJnk49e0ekks+hTN5kLFD6PiQDw3E2BzQ0AQ4oG+XjdZXJztfI07Uppb/scj zzSZnDcYDM4tE91f2gEhB5gpVxt123mrVjxpVVDas2hLc9+znaz54yQcindUZidwq06d nGvj4paMQX99mzBUfdfaIWUIkct5QHyLzg3hZrpKa4VXVOMMkBfJ0VfJw3o8CBF7dDbl 2ghI41ZqNE/yVfPxBmJe07q4SbrRd3qkZ/51Lmu2Lri0Hsu1uZ5AHg5HzDsGEjOFxSB3 dMbg== 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=nFUQTfUSKaEvMkBYs+/kSP9YEBdIr8bGAjyzPCvPYkQ=; b=AOfdtDoRESHHE6O3S50xSjKNKqfrqxhuNF0qk4sgriiAhbWaafSJ1wxVo/tAUU2E6x nRkgzhg8lszmbdgP+hYtZft+OpoTYzIWzWB+1NapXXokhu0nznOLpb2Y2C0ahpD7HnBL 8qdFrPcSOQk7XudB+ru4uaCwH7LQnNpsRaLYjF7dfAIUs+KuirKHmSvB7wy2x1W+518j U4x5FefW5q14ec0vYBQOfHX+iw6WXXup1Vsd07YCTFJIdpaAqLS9Qmvf6sZcmd/Udhcs hu0IcH1mu7HY38xwMrIKI5MCWsYFP8hMLL9xG6ZhAnryd686BC6kD4dReJynCcAJCQ46 u7Fw== X-Gm-Message-State: AGi0Pubwe5JKrwzWbjHYzOtVqrB/zdGgk9SOqa4+Ov47/kS0wuYcW/2J osAASfpbUBP5x/63kN+FR4JqAH7G28M= X-Received: by 2002:a17:90a:a484:: with SMTP id z4mr1556857pjp.77.1585626905312; Mon, 30 Mar 2020 20:55:05 -0700 (PDT) Received: from localhost.localdomain (174-21-149-226.tukw.qwest.net. [174.21.149.226]) by smtp.gmail.com with ESMTPSA id h11sm11386174pfq.56.2020.03.30.20.55.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 04/10] configure: Always detect -no-pie toolchain support Date: Mon, 30 Mar 2020 20:54:50 -0700 Message-Id: <20200331035456.6494-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200331035456.6494-1-richard.henderson@linaro.org> References: <20200331035456.6494-1-richard.henderson@linaro.org> 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::642 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: peter.maydell@linaro.org, Thomas Huth , =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The CFLAGS_NOPIE and LDFLAGS_NOPIE variables are used in pc-bios/optionrom/Makefile, which has nothing to do with the PIE setting of the main qemu executables. This overrides any operating system default to build all executables as PIE, which is important for ROMs. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson --- configure | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) -- 2.20.1 diff --git a/configure b/configure index d4c2c7a563..1cdc439a57 100755 --- a/configure +++ b/configure @@ -2107,26 +2107,24 @@ if ! compile_prog "-Werror" "" ; then "Thread-Local Storage (TLS). Please upgrade to a version that does." fi -if test "$pie" != "no" ; then - cat > $TMPC << EOF +cat > $TMPC << EOF #ifdef __linux__ # define THREAD __thread #else # define THREAD #endif - static THREAD int tls_var; - int main(void) { return tls_var; } - EOF - # check we support --no-pie first... - if compile_prog "-Werror -fno-pie" "-no-pie"; then - CFLAGS_NOPIE="-fno-pie" - LDFLAGS_NOPIE="-nopie" - fi +# Check we support --no-pie first; we will need this for building ROMs. +if compile_prog "-Werror -fno-pie" "-no-pie"; then + CFLAGS_NOPIE="-fno-pie" + LDFLAGS_NOPIE="-no-pie" +fi + +if test "$pie" != "no" ; then if compile_prog "-fPIE -DPIE" "-pie"; then QEMU_CFLAGS="-fPIE -DPIE $QEMU_CFLAGS" QEMU_LDFLAGS="-pie $QEMU_LDFLAGS"