From patchwork Wed Dec 18 03:19:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 181965 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp88230ile; Tue, 17 Dec 2019 19:22:12 -0800 (PST) X-Google-Smtp-Source: APXvYqwDRCVoqMWJ4NRVEjASqZ8TN9iPzukTqXybVY94FItPCXXXRBsG2s6XvrxsetecV9+D/Uqy X-Received: by 2002:a05:6830:147:: with SMTP id j7mr189706otp.44.1576639332782; Tue, 17 Dec 2019 19:22:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576639332; cv=none; d=google.com; s=arc-20160816; b=YLwOij1RSY6X2KHsjihxlFWGDqD7DKzMRjml5+NMZ8i/IKdMDQayMFQ7OGoO3ik2Vf VSjU0X6E0Lw+WSWirYLQ4DOVzJM+iCVmbuOXWXPh/fd+62ekWzC90o6fy54OGs2hwaPF Qjy2EhRNyG0HrFO81Cst673VYkCda1SEjfLla+TOjmYUS6ihKDxnLkNLWbTCleFmi8// gTvulzRlKy1WecIAHS4WhxnohNx55zCEZO2gR4JFgKTHDxS/3wyNXJUvH+k4oGEQucyU PFvyKUfdbKys9zNhW2pypNki7sXMuZ3IhfGUacrrtTfwPb0jxT7bDsrOHjpUK/K7fY/L eVeQ== 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=SWmO1kQqi8bfr8nyMbMf0tsp3eELnVxdGpB7UInxtBo=; b=ry2KwZN4v42Ap9GrhTdpEKztqti0hJftMPgVKfIcIceKnjHuJVCl5837tn6zoL0kSw /+hgK3iLx5ISMK5KNE7A40gUAZKnXGpqS0norE43QIX7/2dZiTxNdkyXe7cvVq41GdFL KFMfVmfjjoDdgloiGXsO+MTiKsHbm1hgCfdClGw55LpDqf7VXbw6AjACXrhe1o6haBSF RqLG8673u/Iqh8VadsKBGiQaZ5sN7fyzIWs0MuOhCdO1Q+yjTFwiDEubWyeRAXeKwaX0 ttNGEb9uslXs7QDIjbAfmmEfBtVH5Fj4NRstp9jqok5dWYJuj/l4LWTygF+c75oHPYMr FFyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=EGVqbIdR; 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 n11si563224otf.125.2019.12.17.19.22.12 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Dec 2019 19:22:12 -0800 (PST) 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=EGVqbIdR; 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]:48970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihPud-0007W4-Kc for patch@linaro.org; Tue, 17 Dec 2019 22:22:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44144) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihPs4-00046m-6N for qemu-devel@nongnu.org; Tue, 17 Dec 2019 22:19:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihPs3-0002ic-71 for qemu-devel@nongnu.org; Tue, 17 Dec 2019 22:19:32 -0500 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:45480) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihPs3-0002i3-1j for qemu-devel@nongnu.org; Tue, 17 Dec 2019 22:19:31 -0500 Received: by mail-pf1-x443.google.com with SMTP id 2so378268pfg.12 for ; Tue, 17 Dec 2019 19:19:30 -0800 (PST) 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=SWmO1kQqi8bfr8nyMbMf0tsp3eELnVxdGpB7UInxtBo=; b=EGVqbIdRGvMaQXdeWAJtbMzNpZwwWlC76YQ0QG9FY3huacb+X6IX14INLFeYaFFwOh JvDxBO4K1V1D8dZW15AzVdFJqdhyEpXB+Wb9GnllpzRhgquuxARiijJ62HM8XO6iHP4M EIlkNdVZBMBDtNr0tGoUQLtg++K45HjFayOfSmpdkabTvkglk1KM2bYXilGwYZM61AV3 PD1HK3RjOMF/v1GTp+oBIFFOYmd0U3wuvKVNpOahK4VjjVPbsncmjSGz0Hn0EUEvEDDx Sid6xMrg6u9o8rj88+606e1zICTGUYOrM2SeeQhZicMS7yylfcOFbCi1J5O7fs+NpX1M Z66w== 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=SWmO1kQqi8bfr8nyMbMf0tsp3eELnVxdGpB7UInxtBo=; b=avyeDd54soICOOErE+becu9JHICnaHw7S1QTO6s3LH+2pB+xByob4W0I+K4Du+RimN DRtr4KpVoBatvGth60pmeTGoKMCETodt/FdKoLGv/KcXIjVFTrR/56jHisdXqr7urPGU 2IY9QeLC4pJDGa2I8hFILTmwrmRFJBvguKjwPZc5qoLGusfVX2U5a0fVKnlZFWSVcwcW TgYyNRLQ/7XEP4WfuaejUxnxHoh9xrPnnYMI7Ida9abJ7qSzYfxOaAw/RCnd20tUzd+F IVwhX329ja4jNxx3Q2/SGGzcSTa/HwCXBpt+y27ijjYlcNXBPYSsFD8gf7zXHfd8CMSV nIOw== X-Gm-Message-State: APjAAAXpekkiBewtzJLon5ox6ab56BTYrq1W1mbJybUILUGBjyWxBEVh bZKWLgeVOtfhSntTZf9Rg4qYfneg5iE= X-Received: by 2002:a65:49ca:: with SMTP id t10mr324831pgs.37.1576639169720; Tue, 17 Dec 2019 19:19:29 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id k27sm404870pfp.66.2019.12.17.19.19.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Dec 2019 19:19:29 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 4/7] configure: Always detect -no-pie toolchain support Date: Tue, 17 Dec 2019 17:19:17 -1000 Message-Id: <20191218031920.6414-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191218031920.6414-1-richard.henderson@linaro.org> References: <20191218031920.6414-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::443 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: philmd@redhat.com, i@maskray.me, berrange@redhat.com 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. Signed-off-by: Richard Henderson --- configure | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) -- 2.20.1 Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé diff --git a/configure b/configure index 2fb4457d7c..972ce7396f 100755 --- a/configure +++ b/configure @@ -2012,26 +2012,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" LDFLAGS="-pie $LDFLAGS"