From nobody Mon Apr 29 03:45:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1576708677; cv=none; d=zohomail.com; s=zohoarc; b=FTzhu1Dea2Lbjwnpuo8CqvHjohyPc1n7hDeVP5kfEwu9v1cagoOUfzgwhdaFrHkHBpVBpbvC8emkWmqKjzGDeJGybXKTgnciKNzRWoE2akJnbRJzeB8qiNlBTQEKydtgM0JRdF36E2g40MEDzfzCv4G8SzdjG7qqM73ZTNDV8ws= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576708677; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3CCNiOkBdotcPLlflc1t8sogIYTztDmOMbypR3M+57k=; b=LgiBqLtuXavXewbQvsTLTNsi3WiNHERMWureKQoEVlUftkqnrKmVbQINWHGQ0Qa2ZyvpTxO5dhfbaKONY/azdJI9V+m93fEQIBX7yOY9jD4BzXMRi6T5B4HCQRxFx8tMCYcwVjY8cbGx2NSC7vnJpHQ+2UCKVuzep53s3UFJt9o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576708677508441.60453857478365; Wed, 18 Dec 2019 14:37:57 -0800 (PST) Received: from localhost ([::1]:33462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhx6-00052s-BQ for importer@patchew.org; Wed, 18 Dec 2019 17:37:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54290) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhu7-0001TG-3T for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihhu5-0003uP-9m for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:51 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:41704) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihhu3-0003tP-Kw for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:49 -0500 Received: by mail-pg1-x543.google.com with SMTP id x8so2020726pgk.8 for ; Wed, 18 Dec 2019 14:34:47 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id j1sm4627779pff.107.2019.12.18.14.34.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 14:34:45 -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=3CCNiOkBdotcPLlflc1t8sogIYTztDmOMbypR3M+57k=; b=hauNGhrJnf8EflRroccGva02uhxQK4nlyYK3/WZhLfdvOlUcO2wcF8qCNd3nDP/lJu eOVZk7maOwFKw8BRBLCfI/YQ8GmPVZI952/1Uvc8vGFMkVJb19tpo5nXHE5Q/kilYmsI X3U+hrOUlnCyxPLFoua5Bu54JJxF1z22+58WEruv9itdVSrlQ3otlf/t4mgzG13AyRHU 6Sa2TVf5LV3NhyLcjJt9pqt7lkseyPmXmZyxSlt6lnaQa8ZU9azwnF8ekEtJemK7xr6S vNXf0uR4Esl4T/fTfHWYi8caFdf5x47Emh0CDMr0O5PRPeff9VPAlsajGfeTIvIvx6kz mNbQ== 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=3CCNiOkBdotcPLlflc1t8sogIYTztDmOMbypR3M+57k=; b=X2jpK1H1JvmtalQeYESPvoYZ5C14CpOt0yE2hV1iUH7GwC65p8O8l7n04iwqZdjhqe dxrDDt1P5nFvWbAVbYYE6JPR++0woBN4KuScNwwU8UoNcpINpWM3jOuhjDbLxIPtxKmo vJ9lz0TGGowzcnj1KiFhvHkW+AQNRFE9tz6t5vRqjKQPPIMUr0sxKs9DheV2ZnvkyG1k E2Qhq4W39y/bMbifvEVxlSlbYU2k0USEb+tGMxxq6s6Cv1hDSVyyX2C28OiblTTMV1+o xCpu1anzb+NSa/Hi7dSPxuKXQavruZ0IHmtGmXVroBaePbCAV5tYXSSRzDV2+PvTEC6a p6+w== X-Gm-Message-State: APjAAAUfOExxcmsHD4cH9SrnRGJlNYUYOoRoEX19WaMgfAzu9Ls9gEvs cS7DH4pYthWIuk2aUk9eBSCrCQm8rgs= X-Google-Smtp-Source: APXvYqz+ERz3/Du+bwWPQ8QF+fuu6WwO3qzMQXne32jDiZfpM/MK2KJpaaVkPzJQlMoQZNoOB383sg== X-Received: by 2002:a65:4d0b:: with SMTP id i11mr5891442pgt.340.1576708486236; Wed, 18 Dec 2019 14:34:46 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 1/7] configure: Drop adjustment of textseg Date: Wed, 18 Dec 2019 12:34:35 -1000 Message-Id: <20191218223441.23852-2-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191218223441.23852-1-richard.henderson@linaro.org> References: <20191218223441.23852-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 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, Thomas Huth , i@maskray.me, berrange@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This adjustment was random and unnecessary. The user mode startup code in probe_guest_base() will choose a value for guest_base that allows the host qemu binary to not conflict with the guest binary. With modern distributions, this isn't even used, as the default is PIE, which does the same job in a more portable way. Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- v2: Remove mention of config-host.ld from make distclean --- Makefile | 2 +- configure | 47 ----------------------------------------------- 2 files changed, 1 insertion(+), 48 deletions(-) diff --git a/Makefile b/Makefile index 1361def144..adf83f75a1 100644 --- a/Makefile +++ b/Makefile @@ -735,7 +735,7 @@ rm -f $(MANUAL_BUILDDIR)/$1/objects.inv $(MANUAL_BUILDD= IR)/$1/searchindex.js $(M endef =20 distclean: clean - rm -f config-host.mak config-host.h* config-host.ld $(DOCS) qemu-options.= texi qemu-img-cmds.texi qemu-monitor.texi qemu-monitor-info.texi + rm -f config-host.mak config-host.h* $(DOCS) qemu-options.texi qemu-img-c= mds.texi qemu-monitor.texi qemu-monitor-info.texi rm -f tests/tcg/config-*.mak rm -f config-all-devices.mak config-all-disas.mak config.status rm -f $(SUBDIR_DEVICES_MAK) diff --git a/configure b/configure index e0c66ee9b6..30e3875c6b 100755 --- a/configure +++ b/configure @@ -6298,49 +6298,6 @@ if test "$cpu" =3D "s390x" ; then fi fi =20 -# Probe for the need for relocating the user-only binary. -if ( [ "$linux_user" =3D yes ] || [ "$bsd_user" =3D yes ] ) && [ "$pie" = =3D no ]; then - textseg_addr=3D - case "$cpu" in - arm | i386 | ppc* | s390* | sparc* | x86_64 | x32) - # ??? Rationale for choosing this address - textseg_addr=3D0x60000000 - ;; - mips) - # A 256M aligned address, high in the address space, with enough - # room for the code_gen_buffer above it before the stack. - textseg_addr=3D0x60000000 - ;; - esac - if [ -n "$textseg_addr" ]; then - cat > $TMPC </dev/null 2>&1; then - error_exit \ - "We need to link the QEMU user mode binaries at a" \ - "specific text address. Unfortunately your linker" \ - "doesn't support either the -Ttext-segment option or" \ - "printing the default linker script with --verbose." \ - "If you don't want the user mode binaries, pass the" \ - "--disable-user option to configure." - fi - - $ld --verbose | sed \ - -e '1,/=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D/d' \ - -e '/=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D/,$d' \ - -e "s/[.] =3D [0-9a-fx]* [+] SIZEOF_HEADERS/. =3D $textseg_addr + = SIZEOF_HEADERS/" \ - -e "s/__executable_start =3D [0-9a-fx]*/__executable_start =3D $te= xtseg_addr/" > config-host.ld - textseg_ldflags=3D"-Wl,-T../config-host.ld" - fi - fi -fi - # Check that the C++ compiler exists and works with the C compiler. # All the QEMU_CXXFLAGS are based on QEMU_CFLAGS. Keep this at the end to = don't miss any other that could be added. if has $cxx; then @@ -7903,10 +7860,6 @@ if test "$gprof" =3D "yes" ; then fi fi =20 -if test "$target_linux_user" =3D "yes" || test "$target_bsd_user" =3D "yes= " ; then - ldflags=3D"$ldflags $textseg_ldflags" -fi - # Newer kernels on s390 check for an S390_PGSTE program header and # enable the pgste page table extensions in that case. This makes # the vm.allocate_pgste sysctl unnecessary. We enable this program --=20 2.20.1 From nobody Mon Apr 29 03:45:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1576708578; cv=none; d=zohomail.com; s=zohoarc; b=g3PuedwikLdYZZyt+YkwJg7vvE3kIuRCD3FKTIKkL6FQK1Q08oy+1imVfH5RYJPtA4+e0mYUtwO65co654+zy8dEfkb7tSBkPtYJNKEhpvfy5xZk499hzz3+U8S5OV/POyhD4zluVjeKVfczqCUW/pey4tJo5UOgtjslDF04UcQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576708578; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=M89NR5346hcsRB2SUkQwEfQ5idMR/OARU10zt8sGydk=; b=T3t/XbDRWW33tCnD/gYnyfrRlNZXg0HqD3KjnxRHH7yInO76T37BDQZAcuedCj8ry1ax7Tr2PMJUPhy5wdxkZhQuMdUF5CCrJb8I0GWZs/aQ4S6WNsMfFi4C/Tus/pidQ7hsYEVO1Cl+bqRiP7Z2y7I6fHha8b3OWpiB5UqJQ5E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576708578804720.3175336339881; Wed, 18 Dec 2019 14:36:18 -0800 (PST) Received: from localhost ([::1]:33430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhvV-0002pd-E9 for importer@patchew.org; Wed, 18 Dec 2019 17:36:17 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54291) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhu7-0001TH-3c for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihhu5-0003ub-G1 for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:51 -0500 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:37919) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihhu5-0003ty-A8 for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:49 -0500 Received: by mail-pg1-x543.google.com with SMTP id a33so2030337pgm.5 for ; Wed, 18 Dec 2019 14:34:49 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id j1sm4627779pff.107.2019.12.18.14.34.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 14:34:47 -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=M89NR5346hcsRB2SUkQwEfQ5idMR/OARU10zt8sGydk=; b=x3aoTvBdaO578ZgCkCRuB0yRK+lJgM0k+ebUU7JwVoU4ixYOvNbAWMgor1/uLQAY0y KCTJ0bFqjEiUyvgGigEGFc2YQcBFNCBJoLKR4Z9sk23zCtrUS2FWwx06YGflycnJiMHp ZcdtxB/iXP+mHiA9mJR9tF0FpLjLgAbPvpYXX4yOTAK+C7no+yBIBCenwYbVr5ZK2Kwc qcqsSVIVG8FQX19MJSJvyTUwuQAuo8rQznCoyHVUTmuwMNcO+oQRcEyFyUuqJRWxvcRO Dh7NgorLwbJYrZyTEwYuMcrDbCKUfTW4wPtZqg+QzpGoxVTesitF4yk3vYDpwNRdSGH0 DkTw== 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=M89NR5346hcsRB2SUkQwEfQ5idMR/OARU10zt8sGydk=; b=kbRl3pJrHIKkCfKxLpeNVymRTEFWuONTdwcuVs+kqPz2FP5xqK4BBrHrVAb9kKj2Pz mx9bzx5tdJlDUP2WSyVknZOmeY71ctkPR1shFOnU7FycNN6Ou/EzzNimwpJi4dUxET9P BdpCQgiepy3QZAFQVYP4smrbGJj8bt0jLKPVeiaUGqIZZfXhf2acpqHf46RA10OTo9AW OOH26oaDUZZYYMVt32LKoGeKRh0G6PVyzJ2k7C9/t0o9t+1dgHA3XzDKi73XEnTHOnsL To4QE9uJuzV5SELSCxY4tG/ItQFB04wFwMuZMvzIAS6us3IhWZBhtj5Edyaswj4oG2LH hZhQ== X-Gm-Message-State: APjAAAV15zbH6O/afwIk+PM9Zcwvkbx7A7/jHpLvGLxk/081vlI51QN1 ba40ICJb/IFt+09rFy/abnvFdQ0+CSY= X-Google-Smtp-Source: APXvYqwhQxe5p8Ly8ZhgZcfBzf8D85LYBxGa/P2YXidEiJOFI5wArS//a2b0oO9tr32QXkCc3RapgA== X-Received: by 2002:a63:d047:: with SMTP id s7mr5495335pgi.81.1576708487922; Wed, 18 Dec 2019 14:34:47 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 2/7] tcg: Remove softmmu code_gen_buffer fixed address Date: Wed, 18 Dec 2019 12:34:36 -1000 Message-Id: <20191218223441.23852-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191218223441.23852-1-richard.henderson@linaro.org> References: <20191218223441.23852-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 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, Thomas Huth , i@maskray.me, berrange@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The commentary talks about "in concert with the addresses assigned in the relevant linker script", except there is no linker script for softmmu, nor has there been for some time. (Do not confuse the user-only linker script editing that was removed in the previous patch, because user-only does not use this code_gen_buffer allocation method.) Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- accel/tcg/translate-all.c | 37 +++++-------------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 9f48da9472..88468a1c08 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1032,47 +1032,20 @@ static inline void *alloc_code_gen_buffer(void) { int prot =3D PROT_WRITE | PROT_READ | PROT_EXEC; int flags =3D MAP_PRIVATE | MAP_ANONYMOUS; - uintptr_t start =3D 0; size_t size =3D tcg_ctx->code_gen_buffer_size; void *buf; =20 - /* Constrain the position of the buffer based on the host cpu. - Note that these addresses are chosen in concert with the - addresses assigned in the relevant linker script file. */ -# if defined(__PIE__) || defined(__PIC__) - /* Don't bother setting a preferred location if we're building - a position-independent executable. We're more likely to get - an address near the main executable if we let the kernel - choose the address. */ -# elif defined(__x86_64__) && defined(MAP_32BIT) - /* Force the memory down into low memory with the executable. - Leave the choice of exact location with the kernel. */ - flags |=3D MAP_32BIT; - /* Cannot expect to map more than 800MB in low memory. */ - if (size > 800u * 1024 * 1024) { - tcg_ctx->code_gen_buffer_size =3D size =3D 800u * 1024 * 1024; - } -# elif defined(__sparc__) - start =3D 0x40000000ul; -# elif defined(__s390x__) - start =3D 0x90000000ul; -# elif defined(__mips__) -# if _MIPS_SIM =3D=3D _ABI64 - start =3D 0x128000000ul; -# else - start =3D 0x08000000ul; -# endif -# endif - - buf =3D mmap((void *)start, size, prot, flags, -1, 0); + buf =3D mmap(NULL, size, prot, flags, -1, 0); if (buf =3D=3D MAP_FAILED) { return NULL; } =20 #ifdef __mips__ if (cross_256mb(buf, size)) { - /* Try again, with the original still mapped, to avoid re-acquiring - that 256mb crossing. This time don't specify an address. */ + /* + * Try again, with the original still mapped, to avoid re-acquiring + * the same 256mb crossing. + */ size_t size2; void *buf2 =3D mmap(NULL, size, prot, flags, -1, 0); switch ((int)(buf2 !=3D MAP_FAILED)) { --=20 2.20.1 From nobody Mon Apr 29 03:45:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1576708672; cv=none; d=zohomail.com; s=zohoarc; b=UjDI7MQoNlOfHart1jllPkwv30w0wh08ozGzEEo+nuiTp1J3xtP+mK8E5B6KhphhNEHWkfP24lrWfshpm92BG6ZsYD0Ra6o2ecC7fQACJbRGpGd7vPfQ3KfJMFzsA795Vm2SGSOk0F0DOeTCT3AhgsKrb6w0vHBDnkIKEjTCT7k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576708672; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0o3CRcHml81TDDyh0N84h3eTIdNUcDVT7umUw0AUs+8=; b=Moch84MvlrwxLY9U2JfRj5gBc7Q0LBURQqTrK85CLf4ZMxb7xZE/YBG2mYlqvJfWOAdem984/EON/YlyNpClGhJa/ZlPvw49p4yKYRwaTL+2Z14oKPOC9888iOvAugXW89cFb6JXxvW0fUUHKXxbwOaOrUHS7kTOb/4qJrzuKig= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576708672469284.65636255190407; Wed, 18 Dec 2019 14:37:52 -0800 (PST) Received: from localhost ([::1]:33458 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhx1-0004td-BY for importer@patchew.org; Wed, 18 Dec 2019 17:37:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54325) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhu8-0001TR-TG for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihhu7-0003w1-7C for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:52 -0500 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:35925) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihhu7-0003vM-1l for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:51 -0500 Received: by mail-pj1-x1044.google.com with SMTP id n59so1547428pjb.1 for ; Wed, 18 Dec 2019 14:34:50 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id j1sm4627779pff.107.2019.12.18.14.34.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 14:34:48 -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=0o3CRcHml81TDDyh0N84h3eTIdNUcDVT7umUw0AUs+8=; b=HR2MfF44BxE7XuFsa+AGcR4X/1uC7IYEpME0y22N1LeDn3WNWepPKKTh2fXYxUtDvO c4gvIIBcxIWCXLYQbSITVbVEeQfCG3IRfWEz1oZnjSv5AsRDdatqvbnaKppLLNIKy5vx G3YrMM5akcZyuclfP2sjypwIWZILQQBvm2GlSGVFJuCny2fp3qMixumgb6gdpzidVnGy 0hLa8cP6MwZ/lVIp/iBu5PNFjF/GT3WzvErYUfj7zSlmN9YErrKw9iGpdIA1DKPRtivG AwIShAkgcZ0a8TGeW8m0fLShsShYwAkrvdzPAVEurBCYiIq9G7nzSnBeFfdum3r4AO/G KcXA== 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=0o3CRcHml81TDDyh0N84h3eTIdNUcDVT7umUw0AUs+8=; b=ech60G1Ee4M6z6y6kp6ZU4XDzhlwrI5TH5rdlElQoJfkFXCkEh005wI4cqLYFh78cC zE7lHpv1Is6SVcjUJqmh11OtX+KhAFEOYOdsBAkCOH1YY/2TXx7RYViAe1NpI5j5s7Cs dNJJfQBixtlj9wY4no91VDPk9g1Y7HUA+iTRJhf0ivA/DAysqzsf8zAyhLY3zLRow4Vy iQO5U87hktOgk9CGdK6Lq75YCZPo0s7xPggYQRPzQM8zXjA2ju66NGjiHt3NUOgMMYF9 j/viCx3vR8O2EhODNcxJxX7hIj2tbs4Z5M6wiUxRoMOGO7P0ug8EZSo9MafGtqSvP71n Q8hw== X-Gm-Message-State: APjAAAWlmvXz1vIjWpF75jD/lZ/RgonTZILv+rwYwIjHRLj71asGABjK RZtxsrCTuTCpKr4jExWdNJHQX8SI3RA= X-Google-Smtp-Source: APXvYqw3kL3ECRLQ7wL/n4/DN+3SLMCi8JbA5ZQYCDUmNdtP5WVqRvFypX1JEzEB73kPVoi1NbI3ug== X-Received: by 2002:a17:90a:5217:: with SMTP id v23mr5607953pjh.121.1576708489521; Wed, 18 Dec 2019 14:34:49 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 3/7] configure: Do not force pie=no for non-x86 Date: Wed, 18 Dec 2019 12:34:37 -1000 Message-Id: <20191218223441.23852-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191218223441.23852-1-richard.henderson@linaro.org> References: <20191218223441.23852-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1044 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" PIE is supported on many other hosts besides x86. The default for non-x86 is now the same as x86: pie is used if supported, and may be forced via --enable/--disable-pie. The original commit (40d6444e91c) said: "Non-x86 are not changed, as they require TCG changes" but I think that's wrong -- there's nothing about PIE that affects TCG one way or another. Tested on aarch64 (bionic) and ppc64le (centos 7) hosts. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Alex Benn=C3=A9e --- configure | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/configure b/configure index 30e3875c6b..99faf64a74 100755 --- a/configure +++ b/configure @@ -2018,16 +2018,6 @@ if ! compile_prog "-Werror" "" ; then "Thread-Local Storage (TLS). Please upgrade to a version that does." fi =20 -if test "$pie" =3D ""; then - case "$cpu-$targetos" in - i386-Linux|x86_64-Linux|x32-Linux|i386-OpenBSD|x86_64-OpenBSD) - ;; - *) - pie=3D"no" - ;; - esac -fi - if test "$pie" !=3D "no" ; then cat > $TMPC << EOF =20 --=20 2.20.1 From nobody Mon Apr 29 03:45:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1576708762; cv=none; d=zohomail.com; s=zohoarc; b=WRkWV2iD5Q/gJzVgQtKGyD4sg8eBDIXguBOp94zYRHgVIp1MupJoAoC0+l8XPZQpMRpapLE6fwKA+pKj73PPG1fGBwgSd6RQaG5NHexsQ0mDDhR3JWucMw1ssbLsf2zcsnHpiDPXa03mgVbW6iFY59TJ8m2zOD1s4vQoY/LAAQk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576708762; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nApRZuyphk20QYsTZlcyHkybuciklnqNiVIxVWJIGrs=; b=cexMOgvLeBf0fJWefPQyVJh2A5EcZDCFKBo5P/VZ+zy1OqiO3ugc+tIAfZ7DOiALE1NyHrOdnxvIplIWsOL98ywOE+RV830bPGBYp+bJlnvjpLFUtg8S1F0e9kfZM2lLHzdNskLzo2u8Y7M05lGAsYgekrC/KrRBRWog6k95DTU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576708762477917.655273927777; Wed, 18 Dec 2019 14:39:22 -0800 (PST) Received: from localhost ([::1]:33482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhyS-0006pW-TO for importer@patchew.org; Wed, 18 Dec 2019 17:39:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54375) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhuA-0001Up-F9 for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihhu9-0003wn-0c for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:54 -0500 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:53196) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihhu8-0003wD-RA for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:52 -0500 Received: by mail-pj1-x1044.google.com with SMTP id w23so1538950pjd.2 for ; Wed, 18 Dec 2019 14:34:52 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id j1sm4627779pff.107.2019.12.18.14.34.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 14:34:50 -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=nApRZuyphk20QYsTZlcyHkybuciklnqNiVIxVWJIGrs=; b=peic9dvHg0FZLS19Thrdo42vWWlyzsc1NRmi9oIJyqhEkzB4O52jcu4+qpBeqPcko8 G3P779Vn9oYD+1087jriTUnZR9YO5uiMAZcyRANWNrLg0FS9Fxmc01bP+AOcvohKUKt8 teFU2jNS3TbmACMZwqFTZzCW6cG7gWrVHY76DSRcfBVG3WbbACwE22G0bajiowLbtzzL EMXzYPJFGdrjd4Jp0prybUjyWIicR4xbrKDUS3QKCvdSQZ0WrcZki3/vhjV2rK1M/48b pnB+WzJFb5gAWgWmlXCJhwZaBWPTwRHU/NFXemGdBcDGOJTZmdNJdo92HxuZqyffHcUM Ya9A== 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=nApRZuyphk20QYsTZlcyHkybuciklnqNiVIxVWJIGrs=; b=C1q4H5G+qSFLPmgVCvArGH+kIyVFA3IJ3S1H2Ocs31q3HnCKhKWXHc9yzI6tLVAw3E pmUwS0fO0aZ6t/JDgJKP3/Cb2qPXLDlvFWcJlsEdr25lHI5jZ2CSSXEoXFIWKANXejd0 B/+ZBq3/p7ksaicEO50c1YVE2PxB7SFux/c4Ddx6GobZ0dZ4tcALRQStQAlbT1MK62Ba 44YBexhO5mAAgwZcESbOsP3Ki29sVuE2oFyAhLfTnVHd+IAK651U2PPVHBvuTxfAGqdn Ya2vS1ZALJj5eCPmQL6qdcMkkdSU3hgITPhI3L10iYU5vSc1o++G2fJ00Qxpr3EbTe8q F/rg== X-Gm-Message-State: APjAAAUYaxeDHst3Uyc+C4i7S0SNQsZZ8PX3LfXLFzT4CvKhXL+RNUd9 QOpkv5FAzh1nbZb+TgDdKtIvsjBwyuA= X-Google-Smtp-Source: APXvYqxGiCZtuPCmngDvuKYoM9o8BlXeJMigZyhOWu3gnE9GUTrTjg8aPLoaltQ5VfLLcpoDhFCMzA== X-Received: by 2002:a17:90a:f494:: with SMTP id bx20mr5727450pjb.60.1576708491152; Wed, 18 Dec 2019 14:34:51 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 4/7] configure: Always detect -no-pie toolchain support Date: Wed, 18 Dec 2019 12:34:38 -1000 Message-Id: <20191218223441.23852-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191218223441.23852-1-richard.henderson@linaro.org> References: <20191218223441.23852-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1044 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, Thomas Huth , i@maskray.me, berrange@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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=C3=A9 Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson --- configure | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 99faf64a74..7a646ec007 100755 --- a/configure +++ b/configure @@ -2018,26 +2018,24 @@ if ! compile_prog "-Werror" "" ; then "Thread-Local Storage (TLS). Please upgrade to a version that does." fi =20 -if test "$pie" !=3D "no" ; then - cat > $TMPC << EOF +cat > $TMPC << EOF =20 #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=3D"-fno-pie" - LDFLAGS_NOPIE=3D"-nopie" - fi =20 +# Check we support --no-pie first; we will need this for building ROMs. +if compile_prog "-Werror -fno-pie" "-no-pie"; then + CFLAGS_NOPIE=3D"-fno-pie" + LDFLAGS_NOPIE=3D"-no-pie" +fi + +if test "$pie" !=3D "no" ; then if compile_prog "-fPIE -DPIE" "-pie"; then QEMU_CFLAGS=3D"-fPIE -DPIE $QEMU_CFLAGS" LDFLAGS=3D"-pie $LDFLAGS" --=20 2.20.1 From nobody Mon Apr 29 03:45:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1576708581; cv=none; d=zohomail.com; s=zohoarc; b=VKaM7opKm7U/DWOMuzOlao549WjGA5N3YZPJZygfPmupCQlNh8PxK/bRwID8Vn6xMUzPavZpitc2aJsQi/jzi+jz3RfMXkJUSjnHCAGV8Ch33dmsnJn7quZb2jVRofN+hfyIq7UEFuNgOzXOIUzHeB/DKR2yFLdjR4dgRKC1z6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576708581; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jITgTjhnj7lyoJXWYxFS3Q7b9u1xGvXARpfPJEwIkz8=; b=TeyYghcR1luQkIyD8M+G3yZDQ5y2B15L4QDWhAwE0ezOok9gRtm5N223z0xJxLqibUjL+eXmuqbydZ1eg9aJ40I+xaBU8GYW9v21rOwdr/4WVSpfU4vcbsPInNj5gyS7NKclNzgxt+3/rm4U/3DWGTBIIeAYYHeu4rAWOwAFOFE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 157670858124866.78254744355354; Wed, 18 Dec 2019 14:36:21 -0800 (PST) Received: from localhost ([::1]:33434 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhvY-0002ti-1Z for importer@patchew.org; Wed, 18 Dec 2019 17:36:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54401) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhuB-0001WQ-Cf for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihhuA-0003xP-CL for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:55 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:45853) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihhu9-0003wt-Ps for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:53 -0500 Received: by mail-pg1-x541.google.com with SMTP id b9so2005332pgk.12 for ; Wed, 18 Dec 2019 14:34:53 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id j1sm4627779pff.107.2019.12.18.14.34.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 14:34:52 -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=jITgTjhnj7lyoJXWYxFS3Q7b9u1xGvXARpfPJEwIkz8=; b=O6bFouSCNjB/kJSo0SlUL9fYP6wBEm0D81Yltp3OMNSyBtBbFfuANiM0v7OMCpa51A L14pvnOtRr3AhqtRh+GcGey/jxN+uhM/d3IYmc8Dp6+EBJ//q47LxdA4/XJcz93bDbdk SyWOZTKPrKNac2je1LDlmkq8Pkvu1vYNHKvRjYJYH/pbuit+H094ChHn3UlY+NfGR1FK 9ojGVZE1DsB5WIGvfCXbODlRMU0tQhfEXdv9SB41OjmRy19+O+H9rvN8uEKvjMfGQSIs jJEVMRb1muo5BPrRZKcy7ZFir5cU2f1EpLaysSpKQZJVdxALyQOQCNcpkN3UU59EAmPc NmXA== 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=jITgTjhnj7lyoJXWYxFS3Q7b9u1xGvXARpfPJEwIkz8=; b=GK6oDWCdOAe3m8XmiChv0NE2AqafAZ8sFw1TzjnlQwjN/ftKc1HG1Ey6DuMazcSibh zP9pNE0Iri5DeAH4LDrqLkYeKXW9LEh1CNZEu/FMJDfCA2kYL70zu6VCugfrOpYEaTfM JxM3SEWU5pE9rs+93+/KrfslSK7kjF9LfB1Q4OU7tasXUocI/eaRZFBPrB2Pi/4EKXdh sS1E6pJFNyf/eP6CnA2Vaq7AYdbDEhrqKHejDUJ3XTFy07mcKg6zPpTXm5JGfth1XrGc KChOoYlj3wA65svEY2GC+Fy+uUc+kY+EWpuFYvVl5X5C1nVftH0LX+tCTpHb/+b5ARhU 960g== X-Gm-Message-State: APjAAAUF2XZTDNv37hHlfOLtCRIZT/8AMQl+pDjMz+LfJViOVFs22NPE 3raJONzLRl2A8cDHyc7IcuV+wfKrJ5M= X-Google-Smtp-Source: APXvYqwprNZOM+I8ihlTNKEsxqqMmP6UzfhQTYEQthO5nnjWoBKNBchpC+Q8t9J3GyzsOTcNu6T8LA== X-Received: by 2002:aa7:9192:: with SMTP id x18mr5783182pfa.125.1576708492563; Wed, 18 Dec 2019 14:34:52 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 5/7] configure: Unnest detection of -z,relro and -z,now Date: Wed, 18 Dec 2019 12:34:39 -1000 Message-Id: <20191218223441.23852-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191218223441.23852-1-richard.henderson@linaro.org> References: <20191218223441.23852-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" There is nothing about these options that is related to PIE. Use them unconditionally. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Fangrui Song Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- v2: Do not split into two tests. --- configure | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 7a646ec007..2503288654 100755 --- a/configure +++ b/configure @@ -2040,9 +2040,6 @@ if test "$pie" !=3D "no" ; then QEMU_CFLAGS=3D"-fPIE -DPIE $QEMU_CFLAGS" LDFLAGS=3D"-pie $LDFLAGS" pie=3D"yes" - if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then - LDFLAGS=3D"-Wl,-z,relro -Wl,-z,now $LDFLAGS" - fi else if test "$pie" =3D "yes"; then error_exit "PIE not available due to missing toolchain support" @@ -2053,6 +2050,12 @@ if test "$pie" !=3D "no" ; then fi fi =20 +# Detect support for PT_GNU_RELRO + DT_BIND_NOW. +# The combination is known as "full relro", because .got is read-only too. +if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then + LDFLAGS=3D"-Wl,-z,relro -Wl,-z,now $LDFLAGS" +fi + ########################################## # __sync_fetch_and_and requires at least -march=3Di486. Many toolchains # use i686 as default anyway, but for those that don't, an explicit --=20 2.20.1 From nobody Mon Apr 29 03:45:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1576708771; cv=none; d=zohomail.com; s=zohoarc; b=ZMFr13wZET4aPA87K8GCtmajvWyBqzgCGoURgD++dsaLk5a6zBHMXAyAeRu5J8B7XBh3npftEFHnpLo4YzvHvOyq9bDfL3wLcHYU08qufgT3I6hXiUq8VS3VLz08OAG/vE8fO1upMUNJjdqLKUr18BfRvsXBV6KgMryjv0NO6ao= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576708771; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=U++KNLczq+T0iSXhRIdVMellsLpueqaa5pKBG4Au/Xo=; b=OmHSGenb8Cs+yv0oacgRtrSvVwewatwD5rwMJimicYrg/yoph4s8AxVBfbPMf4oqOM8EuNNEhjqy539Qh36yaKX+/NTHa4MyaJQRF8iFfhaCP7BpY86DMmT8CIZF91G3jJpNMIp3ntR2SNNJL9Z3oNKo3iuJvasySBCBK6snB1o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576708771245719.7901064928664; Wed, 18 Dec 2019 14:39:31 -0800 (PST) Received: from localhost ([::1]:33486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhyc-0006x0-3q for importer@patchew.org; Wed, 18 Dec 2019 17:39:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54433) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhuC-0001YP-KI for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihhuB-0003yA-Ir for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:56 -0500 Received: from mail-pj1-x1043.google.com ([2607:f8b0:4864:20::1043]:37215) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihhuB-0003xm-Cy for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:55 -0500 Received: by mail-pj1-x1043.google.com with SMTP id m13so1545084pjb.2 for ; Wed, 18 Dec 2019 14:34:55 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id j1sm4627779pff.107.2019.12.18.14.34.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 14:34:53 -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=U++KNLczq+T0iSXhRIdVMellsLpueqaa5pKBG4Au/Xo=; b=veaVSP0yzNYOIt1Y7emls/H5UuzaSVzRv8gD+Z7MtnHFigqRMtdc6CVY+d018N9v4G cz7G71bO1yg5cOoKr3zPp7WcZLmD5Grq0ZRQQbk055g7PHDRzqMLJcKzFIRpdQGELbA+ IEgOdBRbgbZy//jvG95aFfg5c+1EgPuserCtV3MNSvIbk7gUuuQHPf8XMYJxz0Y59485 2l+nIUh16JZ9ityDbIQtaPkFWGCVb0fDg4UuiBG5wegYOBwL8BK01UQth/xBY65Aw1jb NRsL/2YvEMAbUrbFuOHS323eO4Z2vwW4mEog5JHzASS2d+owmPBaVNvg5NMtKJQEPLaN 1MQA== 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=U++KNLczq+T0iSXhRIdVMellsLpueqaa5pKBG4Au/Xo=; b=GMPQGNDoVBMuIeD67ucSSXtt8MVLFJ53OlhnbyGU5U5fVu4OzCwwrwfN5ED4aVDjyQ vzBPoBUjYV7GV52qrJ6IQ4V/kHVuwKrtjk1aoILhghzLpsT7dSeh92liubKOpSu/qyCM SjjcN+7NegehSaBCzWSqx1GkgjIbAm7LSUehizsNZ4ZNiKvkpYxAu7erDwefw7u+niEX W4bLb3lthIZRZ6AMEtvcyTSKciVE01C5TvNfMEI+aDQn5gkHsRSxLr2CpSqJy+LIrICF o2zVhWag4uJbPhv6fvipebcgC0+20fyVLloEG2OQ7V6o5nVwaqGY/ytfVGlQJS25XzSc iZgg== X-Gm-Message-State: APjAAAW1ruB5pnL16SXYzNT0bdxwfM5hrOfmc0LPeQSCYaInIGVhuz7e o9S2VRJQlXgeQ4dZs/VjI4s8zy63N+M= X-Google-Smtp-Source: APXvYqw6AWhDJwVlc/VnN2OG3zpAwPIDELznbx5A+Ce3E92oqIdZ8JGjkrmpTs/mmVF/TMf5G2aPOQ== X-Received: by 2002:a17:90a:6:: with SMTP id 6mr5808158pja.71.1576708494153; Wed, 18 Dec 2019 14:34:54 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 6/7] configure: Override the os default with --disable-pie Date: Wed, 18 Dec 2019 12:34:40 -1000 Message-Id: <20191218223441.23852-7-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191218223441.23852-1-richard.henderson@linaro.org> References: <20191218223441.23852-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::1043 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, Thomas Huth , i@maskray.me, berrange@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Some distributions, e.g. Ubuntu 19.10, enable PIE by default. If for some reason one wishes to build a non-pie binary, we must provide additional options to override. At the same time, reorg the code to an elif chain. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- configure | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 2503288654..f6ff079fab 100755 --- a/configure +++ b/configure @@ -2035,19 +2035,18 @@ if compile_prog "-Werror -fno-pie" "-no-pie"; then LDFLAGS_NOPIE=3D"-no-pie" fi =20 -if test "$pie" !=3D "no" ; then - if compile_prog "-fPIE -DPIE" "-pie"; then - QEMU_CFLAGS=3D"-fPIE -DPIE $QEMU_CFLAGS" - LDFLAGS=3D"-pie $LDFLAGS" - pie=3D"yes" - else - if test "$pie" =3D "yes"; then - error_exit "PIE not available due to missing toolchain support" - else - echo "Disabling PIE due to missing toolchain support" - pie=3D"no" - fi - fi +if test "$pie" =3D "no"; then + QEMU_CFLAGS=3D"$CFLAGS_NOPIE $QEMU_CFLAGS" + LDFLAGS=3D"$LDFLAGS_NOPIE $LDFLAGS" +elif compile_prog "-fPIE -DPIE" "-pie"; then + QEMU_CFLAGS=3D"-fPIE -DPIE $QEMU_CFLAGS" + LDFLAGS=3D"-pie $LDFLAGS" + pie=3D"yes" +elif test "$pie" =3D "yes"; then + error_exit "PIE not available due to missing toolchain support" +else + echo "Disabling PIE due to missing toolchain support" + pie=3D"no" fi =20 # Detect support for PT_GNU_RELRO + DT_BIND_NOW. --=20 2.20.1 From nobody Mon Apr 29 03:45:54 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1576708834; cv=none; d=zohomail.com; s=zohoarc; b=Ltzq3a/s4EKf+zHej4CQO9oueQsanyu83ko1mmmEZsMZqKVee5K2jwdo6wNyslw3Gj9c3Viw8so4AuK+X/3E+IsRlUtvwH1K8aWjAZJltt22shZLk5XE4gCGQ9fhaAmNMDiECD0ifb2Kjx9KDaVbfHsIbtq4rItcLVOMK+0cUNs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576708834; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Nnco/E+zVxOFsFP+larGarLDAJ4rkyQI0DmqW8gT1oM=; b=COmsmb4Iw2BTvHGo7HGAGDOG1Ve5x15rqofFqsu5UrevsIU61oeLAIgu1f7HVVNdv2Klta7KTIyDypwwsN/jIkY0XWbEEUSjSkrCzZg2FSVe/OGllsKEj8iqpxPKeMU1e5/jaO4E6Zb35Bb0wvmIMHfCawmX94NrGSAjA4fZgh4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1576708834126238.45683462264947; Wed, 18 Dec 2019 14:40:34 -0800 (PST) Received: from localhost ([::1]:33504 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhzc-0008J1-US for importer@patchew.org; Wed, 18 Dec 2019 17:40:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54494) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ihhuE-0001bk-I0 for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ihhuD-0003zN-4j for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:58 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:33595) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ihhuC-0003ym-Vo for qemu-devel@nongnu.org; Wed, 18 Dec 2019 17:34:57 -0500 Received: by mail-pg1-x541.google.com with SMTP id 6so2041056pgk.0 for ; Wed, 18 Dec 2019 14:34:56 -0800 (PST) Received: from localhost.localdomain ([2605:e000:c74f:dc00:6838:d2b2:17e2:8445]) by smtp.gmail.com with ESMTPSA id j1sm4627779pff.107.2019.12.18.14.34.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2019 14:34:55 -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=Nnco/E+zVxOFsFP+larGarLDAJ4rkyQI0DmqW8gT1oM=; b=fRtQOXtLhs0VgWrs+S4Iee2qIsHgt5aAmTMs8RsT+f5CKpf/HpmMgjpDej9XGvcTJB 3kAMDVjWi6hlqxDp6NKyd2DiI8edfiYi9xYpSnhEQLIwvNepuIixkzhgIQfp2cd8VsaS mkslfX6kP56fpCxnyzNW/udiAwAmhla0Mgt+cAQ5fNgdTMastz7hfBP3NHqoxMN045Zk +P6xYuvDyWoImrSWwGRSBjxXzYuMze993meqy7JGJJ1ecyDm5rsPccv/ZTn7Z6EJYAJ2 SMO/JzLGm+cLSfpvBci3kLao0DOug6R1BB9vzpY7PtrQR9fXbb2E/CE8cAYRVLtf558w THAw== 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=Nnco/E+zVxOFsFP+larGarLDAJ4rkyQI0DmqW8gT1oM=; b=Z5Mr6j14MMD+iXxPMYaJyp86xcIUgS1PzXGA1vqfdy7aC5Zf9U63xHfPgpWGoePYPQ LX/BBwGnNxqUfFEz2rtuC3+hEcHy+9/U4eiah29+48RHkXsmYYWD6lxg1CiGxlPA+6Uo cmWuO9pMp+xt9VmlfDQJcTSy+gIGxZtxN23Q3xDYE5EgpvDGBivLtOeijxo9zvoxHx9b KXYJB/keo5RU6sodPTX2LUb/mC6JwmK2I/PNwldrlKPT9EQ5GQzdhESAchxYtAQDElql QHgboRb8hoGX+Nn9w5LanzT6o/SSXwUu5AEPaRGbEemXA1dUypc4NpBeNUhG9ry+6Ug6 CHlQ== X-Gm-Message-State: APjAAAXxuNGvF8/jPV9nFRDR8/McgXrR2wq4Ht9Klq8hWTeu0pdTev+1 yWvcBPr+LVnDXLS+Sn+f+IZ83qP4Rhc= X-Google-Smtp-Source: APXvYqwu57euMEZ0CBAVXUohUCUm0MYS99yL+zXBlbq2CpsdyNBLEcXFHgGMhUuURVEBx58jIgSANQ== X-Received: by 2002:a63:214f:: with SMTP id s15mr5894774pgm.238.1576708495723; Wed, 18 Dec 2019 14:34:55 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 7/7] configure: Support -static-pie if requested Date: Wed, 18 Dec 2019 12:34:41 -1000 Message-Id: <20191218223441.23852-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191218223441.23852-1-richard.henderson@linaro.org> References: <20191218223441.23852-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::541 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Recent toolchains support static and pie at the same time. As with normal dynamic builds, allow --static to default to PIE if supported by the toolchain. Allow --enable/--disable-pie to override the default. Signed-off-by: Richard Henderson Reviewed-by: Alex Benn=C3=A9e --- v2: Fix --disable-pie --static --- configure | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/configure b/configure index f6ff079fab..55586c5498 100755 --- a/configure +++ b/configure @@ -1024,7 +1024,6 @@ for opt do ;; --static) static=3D"yes" - LDFLAGS=3D"-static $LDFLAGS" QEMU_PKG_CONFIG_FLAGS=3D"--static $QEMU_PKG_CONFIG_FLAGS" ;; --mandir=3D*) mandir=3D"$optarg" @@ -2000,11 +1999,6 @@ if test "$static" =3D "yes" ; then if test "$modules" =3D "yes" ; then error_exit "static and modules are mutually incompatible" fi - if test "$pie" =3D "yes" ; then - error_exit "static and pie are mutually incompatible" - else - pie=3D"no" - fi fi =20 # Unconditional check for compiler __thread support @@ -2035,7 +2029,18 @@ if compile_prog "-Werror -fno-pie" "-no-pie"; then LDFLAGS_NOPIE=3D"-no-pie" fi =20 -if test "$pie" =3D "no"; then +if test "$static" =3D "yes"; then + if test "$pie" !=3D "no" && compile_prog "-fPIE -DPIE" "-static-pie"; th= en + QEMU_CFLAGS=3D"-fPIE -DPIE $QEMU_CFLAGS" + LDFLAGS=3D"-static-pie $LDFLAGS" + pie=3D"yes" + elif test "$pie" =3D "yes"; then + error_exit "-static-pie not available due to missing toolchain support" + else + LDFLAGS=3D"-static $LDFLAGS" + pie=3D"no" + fi +elif test "$pie" =3D "no"; then QEMU_CFLAGS=3D"$CFLAGS_NOPIE $QEMU_CFLAGS" LDFLAGS=3D"$LDFLAGS_NOPIE $LDFLAGS" elif compile_prog "-fPIE -DPIE" "-pie"; then --=20 2.20.1