From nobody Mon Apr 29 22:50:48 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=1585626967; cv=none; d=zohomail.com; s=zohoarc; b=gaaBIyCPo6cWvob4uWukl5XJVmNqv9RTGu1PdqVW1K1y+lRBdPvfZOm2Yc2be4fdTTewy/MeOQIY7neTptz0GDiS48sfcdKX7AJD4/sUCR6IoEhiL5oC/9CLt95u6pftgVpXMhwyTig3QTf+kcpTrFv2NonxevpyZph7oxmd9Cw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585626967; 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=dr2iLz/DtlBYqPaC0YalK4V7LwrO76HcMZE10x4F5dI=; b=OSN0F4qnzx+V6XyOiNLVrsO2HLfBKSPsWI28tje+llBGZxx990Bn82pkGQnnvXwwhaC+TMwMBEkOxdyQQulk7f1g5PUdIVdkGe6WENFNzyqsUcB/BHXn8vEjxiHRSrfkllcb478D0mBqlruq7fwT0EFvBaMVnvz09lM6Y3iruKY= 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 15856269673881011.7733773538919; Mon, 30 Mar 2020 20:56:07 -0700 (PDT) Received: from localhost ([::1]:59984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ80T-0006A9-Nq for importer@patchew.org; Mon, 30 Mar 2020 23:56:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60780) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7zT-0004YM-4h for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7zR-000896-Td for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:03 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:46434) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7zR-000860-Nt for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:01 -0400 Received: by mail-pg1-x543.google.com with SMTP id k191so9713139pgc.13 for ; Mon, 30 Mar 2020 20:55:01 -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.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:54: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:in-reply-to:references :mime-version:content-transfer-encoding; bh=dr2iLz/DtlBYqPaC0YalK4V7LwrO76HcMZE10x4F5dI=; b=kthMz/fqkPX/41l3miN7kY3K18r3EHAERK2EYudCL5vwlWzYoltJd+FJOMe8FRJvje W2SHG7/5QZBfzBJ6HpkWQjIhHMSSDHm/iuqjRJrFHqbSBLgQdmfOICuRgWTOxHPe6C2S YDrMEMCMTARm6IxP1VvgNG5GnsRtP0VTpK982cWYseMpk2ff6jvwU1X69rM5V+f08eML K/q6ggg6B1+bhCtlRbU98fWJLWhzJu2sSLhwgFiv/Mjyatpt6f+Offp/PhLOZGmigiGE a2ASROq541E7158RuJHEvTcnGwgXQNeD7MOSPyLKjmqmGhHWjUZ44/VBGdlBU6ZJCRL9 SdAQ== 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=dr2iLz/DtlBYqPaC0YalK4V7LwrO76HcMZE10x4F5dI=; b=ACA8DykhcsPTXTtdUpWwupGt82aH6uYpiy7bAqznkoT6kjIuuXKAypn4sVGrqivx3R Tj29PBDpsizcwEnDwtXxsU68QxXW5nUY5AGgG8AiVWqZxPEUaD8BKAgL9YdjRN00mnUy mZHiFAT1JxxN/dKKIfsiXqUgWNDycdvBuOeBolVnPDZy6qRqIAl2X88XIVHDGQ2pZ/Do pwktxyrsyjI4T+vYfgtjtVY+chMbut3s6pCmrJ2zm20IAd4p9C6gvlozeOc/ZKU4lrzJ U6N890LO1QUvbJ4L+zLYio+4i9M/5eb6cSxVTds2tBkxjw0DYY3xSj5AEaCM/Ie+dAU6 70bA== X-Gm-Message-State: AGi0PuZjGhvpaoQImUOOhdpKqK7ngGPwsyMLww7iBwD434PZtDeebcsD jcUg0ZBdUUyy8pvikmnrwh2zgTHIZHs= X-Google-Smtp-Source: APiQypJATCrpQFHjV7PNl/s+SMV1xtzoD/Lr2rliSO5BEG8qNxghNbFNuZ13SN5VoM21QDm3rN2VCg== X-Received: by 2002:a65:6412:: with SMTP id a18mr10062990pgv.322.1585626900182; Mon, 30 Mar 2020 20:55:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 01/10] configure: Drop adjustment of textseg Date: Mon, 30 Mar 2020 20:54:46 -0700 Message-Id: <20200331035456.6494-2-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 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::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: peter.maydell@linaro.org, Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson --- v2: Remove mention of config-host.ld from make distclean --- configure | 47 ----------------------------------------------- Makefile | 2 +- 2 files changed, 1 insertion(+), 48 deletions(-) diff --git a/configure b/configure index e225a1e3ff..e3ccb8daf0 100755 --- a/configure +++ b/configure @@ -6498,49 +6498,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 @@ -8175,10 +8132,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 diff --git a/Makefile b/Makefile index fc2808fb4b..84ef881600 100644 --- a/Makefile +++ b/Makefile @@ -795,7 +795,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) + rm -f config-host.mak config-host.h* $(DOCS) rm -f tests/tcg/config-*.mak rm -f config-all-devices.mak config-all-disas.mak config.status rm -f $(SUBDIR_DEVICES_MAK) --=20 2.20.1 From nobody Mon Apr 29 22:50:48 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=1585627089; cv=none; d=zohomail.com; s=zohoarc; b=fWiOt216C9qQrH5Lua22BzZDCyz+kU3P5vtcCm2lYBi68pb2Ru5sXIjJT8GQadAmikGDjlPr4zMWTa2sAiE6c6HjmEHJXckGKZW/4W/6qS2JjWq+qM4/WoNzphT6jRSEe3LljwTa4JxLBc9Z837Z84zRzqmN1MdUwLyArpbttJc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585627089; 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=AVWo3TkNC8dRck4gxr30FMdUL1YEqwhhQceYuT351jQ=; b=QcWFw02UlEJ8Gb9A3LtWjGlFsvQi//k4O5YomUnvT80qBTyNslaxwoKf7qN04ndGqOI5Z8DYdP8790jg4jXAXWWa9T1/+r+hk7CzeAO0K8KrVk1mtRKQz53sxkgPdE1d6kwMxKuh93XU0iFWr/ILdIgb6lAYf74283HgG0fXhco= 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 1585627089324330.4477673825612; Mon, 30 Mar 2020 20:58:09 -0700 (PDT) Received: from localhost ([::1]:60042 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ82S-0001uI-4y for importer@patchew.org; Mon, 30 Mar 2020 23:58:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60824) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7zV-0004Yz-BN for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7zU-0008Dd-7Z for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:05 -0400 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:45380) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7zU-0008Bu-2E for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:04 -0400 Received: by mail-pg1-x541.google.com with SMTP id o26so9721610pgc.12 for ; Mon, 30 Mar 2020 20:55:04 -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.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:02 -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=AVWo3TkNC8dRck4gxr30FMdUL1YEqwhhQceYuT351jQ=; b=bFf0kUgR2GoEiqNITsPTFpdjOaZesDn+wYad7Gh0iG49tzG5u2a2oEJQNnNhcTGX5B RyTqpddoBt4K2NCnDDl8Bnpvau+enrW5R2sP6RPrXFIH1kxVicUqy9nfeMZehHJHqMiW QB8RT4OJeJK5Nk8DLzvHNlOeomqP/Qg/TkxyZIQH+bMEu0Z1RH19ZQCgkKHN6BnSzs0k o0wcYBeW8qDwKlSL52l7aK+5p/46Zx+aHi3OgRyN2azTSdSmgT3LoJewLhg3b+E+K3gH 1KhKt2CRUG8ghS9/P/GshRIb0tuR3lvd/Ju+f3feq1oCznGP7bDTAOXyeBSFOsquczAx /3kQ== 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=AVWo3TkNC8dRck4gxr30FMdUL1YEqwhhQceYuT351jQ=; b=ZrQU5/0m2NqhzHs9tEmCzB3CswxDyrlxocu0gwGQliW0KMZbo3+FwAjzTfawMzg0Az sVIU2JVKjlLDFItEEtRP3vqP7b8qvirXsurtd9a5oYEI6UcGCXof2phoU+CwWK0ECIWe KsSX9Q8Jsr76hu9HLugWqmKULRC+gzF489dcxE8LDN14/dmstkC6uB3GEadmAIMlk61f vaV6SstssYXRDMuOuTeadZFInCgE/Cykesp5UJsqe+WCnN+heMyPkP9tDXTGfDqn6Cx1 6vSsHxLr3nVliRu+2YkSq32Hr8NK6ZA+ECOvOaGJpZIx6E+yBXIaikjnj7VD4SfO3FxE 44Rg== X-Gm-Message-State: ANhLgQ3ZtJdlZx8gc7Z1JWWpj4cwRhaGtLv6y7sPsPCLgalvXe0lIkn9 feSvUAjP1soSdcF8yxzE+DUIR3wNgy8= X-Google-Smtp-Source: ADFU+vunisiQ6ksAXwjczdamELpiWmiqQ+wlbalDvNLDpYI70g4P6Jg/1pCNAfkpoh1rpDq7tDy5Sw== X-Received: by 2002:a62:7dd0:: with SMTP id y199mr15872936pfc.267.1585626902674; Mon, 30 Mar 2020 20:55:02 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 02/10] tcg: Remove softmmu code_gen_buffer fixed address Date: Mon, 30 Mar 2020 20:54:48 -0700 Message-Id: <20200331035456.6494-4-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 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::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: peter.maydell@linaro.org, Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) 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: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson --- 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 78914154bf..9924e66d1f 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -1043,47 +1043,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 22:50:48 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=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1585626971; cv=none; d=zohomail.com; s=zohoarc; b=MaV+ZdlfWB+kqyLwwT8e2/kO9C4fwiBzfeCfG3bYNG/qKJti/GNym+oLvX2VGfsn/ENoW5R4/AeDRUmEirxjl88qyFsd5JHQgKmlJfgnC8c6CeXWkQeXQrIK20V2lRte3wEB5EELteiCMda9ETBy0ejmiaf8hWqrN8oEx4GJPsM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585626971; 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=cw+WZzzhEd4mjQWPUsr/UQXcmfdkOCsgB8L/Xuk7inw=; b=U2as+Jeb+cxr5GTOh9pwhV2YjwNHGz2NkqkRpWpBVuHI8ZVUPzS7e9W5vCiF0ji31hKRW1zCLKNi9kFfTb0pobicZZ1tRfVfTnkm38qbHG8nhkgLd2elW8oTRDJo6XKxLp4wHoAyCg5LrkVt9n3U+HJ/87xJwTm0ZNrQ5xXKF8A= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1585626971945264.7857118319703; Mon, 30 Mar 2020 20:56:11 -0700 (PDT) Received: from localhost ([::1]:59988 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ80Y-0006Lx-Fb for importer@patchew.org; Mon, 30 Mar 2020 23:56:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60834) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7zW-0004af-9K for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7zV-0008EA-AG for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:06 -0400 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:37313) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7zV-0008Dr-4v for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:05 -0400 Received: by mail-pl1-x642.google.com with SMTP id x1so7614334plm.4 for ; 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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:03 -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=cw+WZzzhEd4mjQWPUsr/UQXcmfdkOCsgB8L/Xuk7inw=; b=qxZpcVJaFb1jtv+OAw3oDhzmEtPCwR4/gKbgDx7xi1xRIeD6z9WjvPmUr6uXGzMYz9 e+g2o0qFsV7PviiombDQ7ArypNeYJQMjnupFh9eGoK40O7NP0a6njiNFGbZTcyBlMYR3 yocl2XrXtB6Fl52lAkAAg8/2OmM+KYSzmxjB4OSaMxB4risW2w7/894uapn62ISzyd81 sFsS3cukM9GwQrpdd36Zin1r7R/TXqmPT+9chMdvY7dNy0N9HbN8DQo8x+/Re/Mc8Xe9 GgOpxviQFQju7LRmkEboWoRK0zMhLMm7XlebJGPAU4YHVckiAfEhapa3DtTP91+pCQBY m84Q== 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=cw+WZzzhEd4mjQWPUsr/UQXcmfdkOCsgB8L/Xuk7inw=; b=e+HJ2cuCMo7u2TRly2oqc2G6wKiJ/xAiLPlV2GltOsO8907TPvWF67Xxgf7ENsIIX+ H9YXt9IOcd7hrdrD4L1HM/ZMuf2yTXdy1PZzxRlvaagGfQytLNIwfyMn6NPp+oSnzUUg F7iCLqsRDkfh+40+6fmKXwerZ4jjXcfsiwzshBiZX8+k88qxCDyWZfaHsvGP44mevXSM 0hWvMYei9KzTFF1X0LjWBu7GYDbHSFJd3VNUsw2riUQI5ViUmGTQxBIjtpaX2k02yle2 iZ5rUCXAxPycdpGq7OVgyVObyfsNC1mM37gWwAD5yhzGXaJ1QzJTqZD093KwJeLW3SbN l6ig== X-Gm-Message-State: ANhLgQ2HkfRoUB5ViFef0K4l7kNewuvGXztgQ4t0bDZkMQAuZuWLfmqG /XkoDDVbyBB1nE9yNbj4GKAIb2nTfsA= X-Google-Smtp-Source: ADFU+vsInyVfA4EpyfMh+1f8/1lVKHbYyC0qb0QHQb0ciDj6BCQhMWjV5ZETmtcHyi44z3GxOA8cmQ== X-Received: by 2002:a17:902:a517:: with SMTP id s23mr16150017plq.125.1585626903844; Mon, 30 Mar 2020 20:55:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 03/10] configure: Do not force pie=no for non-x86 Date: Mon, 30 Mar 2020 20:54:49 -0700 Message-Id: <20200331035456.6494-5-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 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::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, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) 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. Tested-by: Alex Benn=C3=A9e Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- configure | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/configure b/configure index e3ccb8daf0..d4c2c7a563 100755 --- a/configure +++ b/configure @@ -2107,16 +2107,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 22:50:48 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=1585627189; cv=none; d=zohomail.com; s=zohoarc; b=M4B1FuVQmRdKfk9AjGfxKcoQ2gUa2p7Zk0Lr/fQuPqLLf/h81ZlVnG4YnhPSQDAEy7ONjn6npadkqJpZ903f2l3sLS8KBhJPzbNWLWRqhpA+wMqIvynwYNzEASpMXlCFjdU1Z/ZkQ+Nvy6ILmjjVmi+EScdqwOPL7nwc4d6GIFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585627189; 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=nFUQTfUSKaEvMkBYs+/kSP9YEBdIr8bGAjyzPCvPYkQ=; b=MYIJDi5/G5iYnsR8Pe/0ANaojWe4za9EMJPBQq2A7GprcSF/e9ul3nBgavC7gVOjH7rboF2WL0RS7AZPhGLYOccZU6Xzx/ho95761biha484I6dgIfSKFTYPnTZOb0AovtEPh9BC0JklHPs/VqAwG/mvzndVzcrVVQnBEPnjYnw= 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 1585627189437492.3447423348729; Mon, 30 Mar 2020 20:59:49 -0700 (PDT) Received: from localhost ([::1]:60078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ844-0004lU-7q for importer@patchew.org; Mon, 30 Mar 2020 23:59:48 -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) 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) 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-Google-Smtp-Source: APiQypJVh29T/nGzjdjCzKTzwzuvG+MWq0YGLNrjs/g85wzWcUjfpX/Y34jWH5j2TPzRVCg2VllSAA== X-Received: by 2002:a17:90a:a484:: with SMTP id z4mr1556857pjp.77.1585626905312; Mon, 30 Mar 2020 20:55:05 -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 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::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?Philippe=20Mathieu-Daud=C3=A9?= 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 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 =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" QEMU_LDFLAGS=3D"-pie $QEMU_LDFLAGS" --=20 2.20.1 From nobody Mon Apr 29 22:50:48 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=1585627084; cv=none; d=zohomail.com; s=zohoarc; b=TvIYwwenZYKE9q2fdbmuzWBo2JEF2HYBXbATts/9x5GA2C8POcfwLirTzE0Xz3Eg78DrjHmOqGRuI/tTqczJ3HWcbDlo6ujMlMWNxZdusujCQul379nStARnGipufJ/8nN8GjwWS+7TFnAs1+fy+tcXOOhNKddVnP0esCjC5c/I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585627084; 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=4fxKsy6khBcHTq1p6rkwxiGqHx6M8cWBd65wf3ZxqfQ=; b=DAmPxWPfCr8/uBUlgN6kA2EmT26kXH+4UwnapTMI1dcFhoHNFsZjCOoM9leff4J25SK9meb9K/fFAnlEn9LQU9a/rz9CZi2uPZUIYBeZhFqx1YUzCijjzk2UC+FGxpIAgsj4i4tGAVneZkK/k/9rHKsEI/TusPJf6walaiAymnQ= 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 1585627084096466.15193761311707; Mon, 30 Mar 2020 20:58:04 -0700 (PDT) Received: from localhost ([::1]:60036 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ82M-0001h9-QH for importer@patchew.org; Mon, 30 Mar 2020 23:58:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7zZ-0004gM-3h for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7zX-0008FR-W5 for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:09 -0400 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:34279) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7zX-0008F4-Qj for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:07 -0400 Received: by mail-pl1-x641.google.com with SMTP id a23so7621386plm.1 for ; Mon, 30 Mar 2020 20:55:07 -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.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:05 -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=4fxKsy6khBcHTq1p6rkwxiGqHx6M8cWBd65wf3ZxqfQ=; b=APe97RPRwahsiYzPaIZvKEg7kxEcZ9VN2zoNFNCG+NumkrpRkPHTiU3fbYUfHVdT2z FxeamWMB04LyyqhreI//MuW3TP8oMp1uZGkDZ9/Z6wdDjlqAohr9aa0QSuRDvgwz33Hk FQsrmw2OfiaQ7NLS31HZrtKs5a52JPU/vxpeiO9icIzzMvGDe60rWiqp9wPJEFnNu8mN AIejH6ua01VEtw0+Gb0uNnKRyGCBkngv9McmrpjuuA/6ZDlwPmDbMaZjNitKMols0TeB RuSYD/sVlBdmBLUQSMO0JVX7jWE+NPcVkHFLmRAMHoEeUrzf5PXmGBqHJqXQuKtYvm7q LS5g== 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=4fxKsy6khBcHTq1p6rkwxiGqHx6M8cWBd65wf3ZxqfQ=; b=RNkYqje+T12bGh9sXJ8PFtfFzr/O9bHNwB1mTe6C0APQQcOsiUlFjNPoimnQLTwKoB AnpDgbhdaT4gFXoE7S/ehkTZrTg6DM/im/WBOA95Kuyrd8BBuO2prRiYCTJoYZbFubXe QHS0S7SSCGDRhIpAJc25SK8Zwrd119JFYOddNGCJTnNxrzE2wPrwXcz+qzWSbT9HTO0W GGzHTZffGvge6MH4XuZG4HkVn4+Jumm5nIieW5iD7uYRAcxkq6N08TbdsAipYeV4WiJ9 J6XUXRtvRY4F227AoUVtZw7jV8L8EtSdc1MgrshkPfz8Iouy4EEu1NpPapYtivG7GuSx hQKg== X-Gm-Message-State: AGi0PuaURZXd0WrfW0JzzFJ/BlTIbgzewVk8/mcLOE1s2c0xgM4xTqaV 708hdombqcLnOouskkCl6c3zHpM5H5g= X-Google-Smtp-Source: APiQypIsCNzFcNxYuHM+X6X4kfJwOhYVwQIJ1hSJ4lLateIHFArx1KGJmlGrTea4qaq6I8slt+gOrQ== X-Received: by 2002:a17:90a:2103:: with SMTP id a3mr1527798pje.181.1585626906522; Mon, 30 Mar 2020 20:55:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 05/10] configure: Unnest detection of -z, relro and -z, now Date: Mon, 30 Mar 2020 20:54:51 -0700 Message-Id: <20200331035456.6494-7-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 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::641 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, Fangrui Song , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) There is nothing about these options that is related to PIE. Use them unconditionally. Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Fangrui Song Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson --- v2: Do not split into two tests. v3: Update to QEMU_LDFLAGS. --- configure | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 1cdc439a57..1e622f5acb 100755 --- a/configure +++ b/configure @@ -2129,9 +2129,6 @@ if test "$pie" !=3D "no" ; then QEMU_CFLAGS=3D"-fPIE -DPIE $QEMU_CFLAGS" QEMU_LDFLAGS=3D"-pie $QEMU_LDFLAGS" pie=3D"yes" - if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then - QEMU_LDFLAGS=3D"-Wl,-z,relro -Wl,-z,now $QEMU_LDFLAGS" - fi else if test "$pie" =3D "yes"; then error_exit "PIE not available due to missing toolchain support" @@ -2142,6 +2139,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.plt is read-only = too. +if compile_prog "" "-Wl,-z,relro -Wl,-z,now" ; then + QEMU_LDFLAGS=3D"-Wl,-z,relro -Wl,-z,now $QEMU_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 22:50:48 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=1585627184; cv=none; d=zohomail.com; s=zohoarc; b=AS2vr+teNmnvEbLBsp0D/LFd1NE+HfP6hz0KhKIEvDwqYmjVINkjacjpwL2pWHoaRfQFK0pAyJ045nSTK36awPLgaaRLqO3MIr/4OjH65mezNV1p4JTZlXw5fueN3WLooTAWJnujkkevYm7VKsoSebsO94Dd7VIlaUcVuq8lAmI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585627184; 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=S+YD6LWo1z5Vsgzq3ypvuc0IEmwxuyzEeq5y1l14e9U=; b=nOLCihb3O3m+OTjrfcYPLmY2Nz/GHz18PpEgSH5pUpaEkghyJLH9CMDZYK0yNzDfnd8/vLoNqiUivxhIWDGyi4ZwJtQ8tMnPp5oDGw9rbxB9sUbcLOHMKK7vKwSX7km0pqSstGolfrLq1cSuNru4N3/fFJizuJecKTUjLRtS1Hc= 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 1585627184870384.65362606186795; Mon, 30 Mar 2020 20:59:44 -0700 (PDT) Received: from localhost ([::1]:60074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ83z-0004dC-KP for importer@patchew.org; Mon, 30 Mar 2020 23:59:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60880) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7za-0004jJ-Df for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7zZ-0008G2-7q for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:10 -0400 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]:40623) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7zZ-0008Ff-2J for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:09 -0400 Received: by mail-pj1-x1030.google.com with SMTP id kx8so509781pjb.5 for ; Mon, 30 Mar 2020 20:55:09 -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.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:07 -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=S+YD6LWo1z5Vsgzq3ypvuc0IEmwxuyzEeq5y1l14e9U=; b=F0iVltKBtDusq4Qu78xf8Dgg2AK0wrtUwzFG0F4FqPtqM596JK+LHTw8Ha4bbt7sLI hYL+YYQPcpHlRxNuD5CUG0CHT9kpCwKDlqcjaNsNLjuZ6qJ3XhCfe2I5BGSnFPeCB0Zq EBdvy8ESOP+lIVkvDUmdTwed633e8O7Q7VBPdgIwie6TCYrZNz10MYCCx89tNLIB/BNT DB2b1q6RjCdMf9VfRcrb4Y7AfFnZ0uJvcbqFqzKG2quVWPb0alMgcGKIgr5LwwE9Tsww yftmzybgy//6tR96tasRCDkya9zFKwAi7owLiSI8pO+lEBqU+9XiNyhIHLyQdAAXZaGH iwTQ== 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=S+YD6LWo1z5Vsgzq3ypvuc0IEmwxuyzEeq5y1l14e9U=; b=LhNR0t6ZZLt8v1CGibW0eJWmxIx5ZOtfQCZ9zcNvOLs7mCANl2At9pKs4yC/H5GL2T qoWphpNfZrSVpNuRmhMQrZCGCFRaf57RndTXGjJ72HLn6HrRckCtNdvdNXX6WJhDKEna mffwVJkQyz5WGaATIQI6F0UgPBDSShC6OplcNWVitlJMT35j3JpFdCP7Od1s1XCxHddC nAYI0wta5RNxPPcNppO7cnxyRa3kQlu9mngEHsnPijtE/0pnXCBqL3LN6NWv81YzIogd SuYWZkV/8ACsvefLJEXaY1u4IuFbSLujX0YYQRg3mds8xTSQfvLBoEX5S05aN0oVeYPu 99Dw== X-Gm-Message-State: AGi0Pua/99fER5f/xZNDhSBWFn9+jTtX05ryFYv3o50gi9AVnGSwCC4/ U7GyuKAWGqK0PTSUoL5oAP4no5eUtX0= X-Google-Smtp-Source: APiQypLtIUbS8qiECTzHGXvPwEMXrI8JVJVquDIhLXXlA1rMq7l0LegnQAv1Gg0Ukex5NcS0MG4f5A== X-Received: by 2002:a17:90a:8c18:: with SMTP id a24mr1585344pjo.43.1585626907775; Mon, 30 Mar 2020 20:55:07 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 06/10] configure: Override the os default with --disable-pie Date: Mon, 30 Mar 2020 20:54:52 -0700 Message-Id: <20200331035456.6494-8-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 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::1030 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?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= 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: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth Signed-off-by: Richard Henderson --- v3: Update for QEMU_LDFLAGS. --- configure | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 1e622f5acb..481d5077f7 100755 --- a/configure +++ b/configure @@ -2124,19 +2124,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" - QEMU_LDFLAGS=3D"-pie $QEMU_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" + QEMU_LDFLAGS=3D"$LDFLAGS_NOPIE $QEMU_LDFLAGS" +elif compile_prog "-fPIE -DPIE" "-pie"; then + QEMU_CFLAGS=3D"-fPIE -DPIE $QEMU_CFLAGS" + QEMU_LDFLAGS=3D"-pie $QEMU_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 22:50:48 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=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1585626979; cv=none; d=zohomail.com; s=zohoarc; b=eLjX/4lLKxU3G5fzMFA6PCt1yZ9KEs2ooiiI6F/iYiuLM1n1KP8+hJNNSNbBZdLDhok1gafbkCl10qHRzwfY/9tjxALfykYzFs+Hi/PML0WNASYcX4++vW2GyIR9VlaC68tIO1polO5KPRaUyDy4G9fKvEIxC/X/wy+R43mqhzg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585626979; 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=UgUHjWUCMpFSJAz+Az/IeJleYSOaGK+TNCsM8YWgUmI=; b=M45Wxe1gtSdhA2FIjiwd6ef/cIwwzmL4sldtFCfHdzpUaprYdrjln5DWR1aw4EB2Zy12kkbczuVDGm3mk8oqih0EmrH04AFEURSiAwaFhF0NsEvB/sGM3RI+LxppXzp6YuyAuw5dxOGp8CEYw8ozt2XoCKRSUp+0rpI75q1vCzY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1585626979399270.4964683326564; Mon, 30 Mar 2020 20:56:19 -0700 (PDT) Received: from localhost ([::1]:59992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ80g-0006fq-5q for importer@patchew.org; Mon, 30 Mar 2020 23:56:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60897) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7zb-0004lp-Mp for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7za-0008GY-GE for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:11 -0400 Received: from mail-pj1-x102a.google.com ([2607:f8b0:4864:20::102a]:34967) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7za-0008GE-9p for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:10 -0400 Received: by mail-pj1-x102a.google.com with SMTP id g9so520988pjp.0 for ; Mon, 30 Mar 2020 20:55:10 -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.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:08 -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=UgUHjWUCMpFSJAz+Az/IeJleYSOaGK+TNCsM8YWgUmI=; b=IZt6qDGz2zABDbH/Cvh2zniiofyquCkU6n66Y8Jz8qQPrbWBFUDwwXjhRZGmJUEOPk xB89NLsO9HkksXtD0CF2tMRny6VOV6K0HVv5c8BksAFG4e8MYdD5g44oOT70fm1aFihK NThfwPKm0JwnHffLsKFij8+vy11l3xRhVBLiE9QmH3ooExsbvKWCpSHk39p3j9fgERcg hp3D/Y62lp6u6CzBtNEiab8a0c4gRMM+D7RxogJxVKs9hUzn12Nxd1NMktTiX2dZHz+y n263VDZHHjlg28Sfz+3/D5EWotkbcgQAuiODxbjqEN4sNbU3xSLawWd52lVAfcLP40J0 yrtg== 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=UgUHjWUCMpFSJAz+Az/IeJleYSOaGK+TNCsM8YWgUmI=; b=NX3YFA8iLijtPwirSoq4XpRFq01uSMnvxQ/s2M5rJJhf9vJTnKbj95Y3GbIalSm0Nh fJkENjygO0d36nOTrLoXdf+fMzBKGd1LCc0hGmoUlMLaUn09TA9iSb1NwD3TNO2kAMYY AHiCiq9FogDObTEMyHLxt7jEgkyuIg2WCA1gmusLknstW5rliG8rgaudz4FOeREj4ft2 4XHzc+vw4BV2LuQpTGN+FOAdo85x4Ft4Anq4OzYElF+KABbqJ9Roe+mblLdp+jovnXF+ nVKji9ce6XbLcItsyGtm1MNVyRXUnQGOmdimSSfR56k8DE1hicfi3Bw71c50av5mYVNK Si3Q== X-Gm-Message-State: AGi0Puan8TgK/Tqoi7TZiAHvTbNGhuKWdWHwMeO0aF2Oc8gDIgQKBEYH Tpnv1NbJ66jV5GEfo+8OUgsDHaqrt6U= X-Google-Smtp-Source: APiQypK9AFq2jONhp5MRi7Ps+AYvCDTM1tcIXtytTndwN+V49XPyTcjFKJsiQn7ELNRfrYoEmYj8hg== X-Received: by 2002:a17:90b:1b05:: with SMTP id nu5mr1557197pjb.110.1585626908932; Mon, 30 Mar 2020 20:55:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 07/10] configure: Support -static-pie if requested Date: Mon, 30 Mar 2020 20:54:53 -0700 Message-Id: <20200331035456.6494-9-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 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::102a 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, =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) 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. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Richard Henderson --- v2: Fix --disable-pie --static v3: Update for QEMU_LDFLAGS. --- configure | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 481d5077f7..22870f3867 100755 --- a/configure +++ b/configure @@ -1067,7 +1067,6 @@ for opt do ;; --static) static=3D"yes" - QEMU_LDFLAGS=3D"-static $QEMU_LDFLAGS" QEMU_PKG_CONFIG_FLAGS=3D"--static $QEMU_PKG_CONFIG_FLAGS" ;; --mandir=3D*) mandir=3D"$optarg" @@ -2089,11 +2088,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 @@ -2124,7 +2118,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" + QEMU_LDFLAGS=3D"-static-pie $QEMU_LDFLAGS" + pie=3D"yes" + elif test "$pie" =3D "yes"; then + error_exit "-static-pie not available due to missing toolchain support" + else + QEMU_LDFLAGS=3D"-static $QEMU_LDFLAGS" + pie=3D"no" + fi +elif test "$pie" =3D "no"; then QEMU_CFLAGS=3D"$CFLAGS_NOPIE $QEMU_CFLAGS" QEMU_LDFLAGS=3D"$LDFLAGS_NOPIE $QEMU_LDFLAGS" elif compile_prog "-fPIE -DPIE" "-pie"; then --=20 2.20.1 From nobody Mon Apr 29 22:50:48 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=1585627178; cv=none; d=zohomail.com; s=zohoarc; b=bF4VhRJCEWJM/USwuKGDGAq+pJCfwZvuOmvEymjKBbx/uupo8kCdQ7JKHY9lC8f22yEeT7NkmKs6fwNDBTCMudFVVRuWqkDH3DNUE9bwHFCd+AoN/imQ/E7wr6eEexCyF5mW+XL+VXG6Oz7Jw/9h/gTlZXflFC04jhH/cmt9jb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585627178; 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=sVWQh9CNUJ7u635QOP+H3s5ThKzTlbDf/81J3QrEWMc=; b=QV1q3ZVJyfso5rXijAU1f05o2uqdXgk/3q4kWmIQ1vnMiGzrRkm1HvabeAFDoTklQ294NNhSRUqYxgFZTumjUzPZnIEQeLZmw+QTLh9lrZy3HdSSt3f0zYygoqGBgT34q7J4vsYv5dV1TDIaQ5yl8JdaySQXbn+TOMzlh+kFemc= 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 1585627178958306.81762170140075; Mon, 30 Mar 2020 20:59:38 -0700 (PDT) Received: from localhost ([::1]:60070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ83t-0004Rb-NU for importer@patchew.org; Mon, 30 Mar 2020 23:59:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60917) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7zd-0004oi-04 for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7zb-0008H9-Nr for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:12 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:43560) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7zb-0008Gm-I5 for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:11 -0400 Received: by mail-pl1-x635.google.com with SMTP id v23so7599934ply.10 for ; Mon, 30 Mar 2020 20:55:11 -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.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:09 -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=sVWQh9CNUJ7u635QOP+H3s5ThKzTlbDf/81J3QrEWMc=; b=abAIrGDBGlAjvpm2YYOvX3gKhR8abmRXTe5lzZVK1+hVb36wpznzeeQc+D/nenODF8 ukNo/c5+Cd8SALKDryLq2RwVE+MIhgQKViSnx1okcLhLE4eWGM1xCjZ434oz/RCc0qWy UZeEIdDYabKA8jfaLhltxG3lUKskCFqHnI7BXM7LMrsy/kSvv7Ipuhs60+r4pEltl0bV BK7cpzlN4YeB5+a/Ulhneb15ccTLITNV5EI1Ju4DWnp8UQSEFrNI0VFPN/kF031udfCa EXC7Pd3nQklulbetaZcqO3sApCddrGv+Bz81ZiAQ8k77Ai2XZ9UZ0Z8AShX+cIpkuAtQ jbwg== 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=sVWQh9CNUJ7u635QOP+H3s5ThKzTlbDf/81J3QrEWMc=; b=r+F4PtObjMXNOcaryYh3yyxaSlXiYxHjE270HQCtAzI8oZqtu1HCclZ3U2v5B/41Rj p4muet5fsszQNf1mDdJT/mZ3fjjxgkHcQc3fS+nfGAvDfBr7W4qHAEUO7vHlI5CIBwTe jLH4ZvwQRfCdzU8xDM8AepotllDDWLDWWzdGGiZ5qTvoVowAvaxfgwo1Zl5zXGNRlqZG 8MPnvoTFk2myD7EEUI2c8zgigYe9jM4sT+Wv/QStzp+D5kE97fIICPI9iOLe+D1IrtPY uHBWuYDw/Ln5a7JRchT05TUDmPHa47zJ+pmv65OlBf6kyafODKXnfyHf18Jd2+SdEFr6 NgEQ== X-Gm-Message-State: AGi0PuZkGnc1Ad3g9AlzA5DCfzUald9kSCNoLSXrpJSk/n6Ga/rvf+A7 nCyO4fK3WSCh2ysiLt5winpTUGBKRws= X-Google-Smtp-Source: APiQypI1/Fb8KG7jUfmSKwf4wsqkSAxL4ltHg/Y1X3/mgpk69xi7FN3ImeKVu5gsYHrLcb+VMNdFXQ== X-Received: by 2002:a17:90a:2801:: with SMTP id e1mr1592143pjd.78.1585626910274; Mon, 30 Mar 2020 20:55:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 08/10] target/mips: Fix loongson multimedia condition instructions Date: Mon, 30 Mar 2020 20:54:54 -0700 Message-Id: <20200331035456.6494-10-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 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::635 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, Aleksandar Markovic , Jiaxun Yang , Huacai Chen 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" From: Jiaxun Yang Loongson multimedia condition instructions were previously implemented as write 0 to rd due to lack of documentation. So I just confirmed with Loongs= on about their encoding and implemented them correctly. Signed-off-by: Jiaxun Yang Acked-by: Huacai Chen Reviewed-by: Richard Henderson Reviewed-by: Aleksandar Markovic Message-Id: <20200324122212.11156-1-jiaxun.yang@flygoat.com> Signed-off-by: Richard Henderson --- target/mips/translate.c | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/target/mips/translate.c b/target/mips/translate.c index d745bd2803..25b595a17d 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -5529,6 +5529,7 @@ static void gen_loongson_multimedia(DisasContext *ctx= , int rd, int rs, int rt) { uint32_t opc, shift_max; TCGv_i64 t0, t1; + TCGCond cond; =20 opc =3D MASK_LMI(ctx->opcode); switch (opc) { @@ -5862,14 +5863,39 @@ static void gen_loongson_multimedia(DisasContext *c= tx, int rd, int rs, int rt) =20 case OPC_SEQU_CP2: case OPC_SEQ_CP2: + cond =3D TCG_COND_EQ; + goto do_cc_cond; + break; case OPC_SLTU_CP2: + cond =3D TCG_COND_LTU; + goto do_cc_cond; + break; case OPC_SLT_CP2: + cond =3D TCG_COND_LT; + goto do_cc_cond; + break; case OPC_SLEU_CP2: + cond =3D TCG_COND_LEU; + goto do_cc_cond; + break; case OPC_SLE_CP2: - /* - * ??? Document is unclear: Set FCC[CC]. Does that mean the - * FD field is the CC field? - */ + cond =3D TCG_COND_LE; + do_cc_cond: + { + int cc =3D (ctx->opcode >> 8) & 0x7; + TCGv_i64 t64 =3D tcg_temp_new_i64(); + TCGv_i32 t32 =3D tcg_temp_new_i32(); + + tcg_gen_setcond_i64(cond, t64, t0, t1); + tcg_gen_extrl_i64_i32(t32, t64); + tcg_gen_deposit_i32(fpu_fcr31, fpu_fcr31, t32, + get_fp_bit(cc), 1); + + tcg_temp_free_i32(t32); + tcg_temp_free_i64(t64); + } + goto no_rd; + break; default: MIPS_INVAL("loongson_cp2"); generate_exception_end(ctx, EXCP_RI); @@ -5878,6 +5904,7 @@ static void gen_loongson_multimedia(DisasContext *ctx= , int rd, int rs, int rt) =20 gen_store_fpr64(ctx, t0, rd); =20 +no_rd: tcg_temp_free_i64(t0); tcg_temp_free_i64(t1); } --=20 2.20.1 From nobody Mon Apr 29 22:50:48 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=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1585627288; cv=none; d=zohomail.com; s=zohoarc; b=k4YUyI6mJwWcYc2SeEtcjskZKwNJrQ5n9bL4GTfAOYthKgI76W5GRbghOdd2kUniZbHhhouqQZNXcKQaZPj0H3ikC3hnQJb0M+j7FTyozftBFwiao7keyqwdNJG4R3J8Pz8aeMWSk3dIvRsfDtf6p3Kz60h0HzB7AaKI+i73kxE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585627288; 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=CDnFqJBoj0Xo8UAeGjSsmq+bEn4LCuvCKa5BZTVovPc=; b=nM0utMLOJTpCVCwa1aL7ZzFFkjvlA+Z/GdtGStKPBsNfqZvL5CUhAN0lpX25H/AOYy1PraJHaTlOPwglnokCHoMK5BqyuRAfekxJR1StisFT7ky5c87JUH71ea9TkJgsECNCSAVoYcZKiah1EqGnxpkkb28q8v2V5hGX76PU6KI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1585627288223974.3077596882844; Mon, 30 Mar 2020 21:01:28 -0700 (PDT) Received: from localhost ([::1]:60128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ85e-0007BD-Em for importer@patchew.org; Tue, 31 Mar 2020 00:01:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60937) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7ze-0004qp-26 for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7zc-0008K6-Sv for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:13 -0400 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:45782) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7zc-0008IO-Ni for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:12 -0400 Received: by mail-pf1-x441.google.com with SMTP id r14so7210915pfl.12 for ; Mon, 30 Mar 2020 20:55:12 -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.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:10 -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=CDnFqJBoj0Xo8UAeGjSsmq+bEn4LCuvCKa5BZTVovPc=; b=GCuLikD0qFP9t1TFXC+XvTBy6C8TSQ2lrXGh/ivBOei7lS97JesH7lo1L+Hrdt2llg 3yfGZiYfaOuLWF7lgFDPdATePRFQqvI/UoZ7CjPkDeubu3lpy3WO7t/ZLdcYVBRUG/xD Q9UM4SvDH8ulF9mgX9vvz/35pNMZn8qHUdxlNzBXKN1DwZML/hq5ZxHhWOMmoMYXfoiZ qsEqgbS0A+yvEQKoKGPy33yldE4hiHO++kQIS4QmY5IzwpX2k7Hy1HnZ9E71KcxS4XcV UCXWta41iUXU8purJ+ueWm+SU16mq6ngTOttyyGRTYr7JMX1Wi15JO5Ez+IoKR2nJLcj Rlvg== 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=CDnFqJBoj0Xo8UAeGjSsmq+bEn4LCuvCKa5BZTVovPc=; b=EXWlCocBHA9TZjnlrQGiSuhWqDsEiKnQRG3FzCOCk9luCt6Wx4N6W4poBelD3XRhu/ euEzohUEZ5XWGQUimtD7WK3wBTqNbHffUlPKdzwyh1OwRo9/2nJ3/leO9J9ZS/ZJE5Uj qzdGaKL8icvLJouDb5NEH9G0YmCMBK7uunzVmlhLNU58dSD8CZqTX7P893etgSrbdiaA N0h8jRfMoVJtZEZ8RL7/x05eM9mFZ2H8zztdZQlIZr92xoFNkmicVk+atnG2xgyA5mhC vJEG92ShtZ9DW/+G5Vt9wjh2z5dAtd/ROUE46pg3tTvHYPGsZpRdumC7FgwjlBA1HPxw RQHA== X-Gm-Message-State: ANhLgQ1uA+trYNao48I3hlNneAnTDmBDwfvLKJFjj2Uuu5jGGvR9KFH8 lEKAE/8OO/Na0Pxnf5bfQQLyDWI2xnw= X-Google-Smtp-Source: ADFU+vs77722v4uTNsg/jHYncoyunKE1CFdntjXhejT7i2Zi2yGIhAAO86YaisZG87tIMRl7DtrM4A== X-Received: by 2002:a63:dc11:: with SMTP id s17mr15567880pgg.285.1585626911455; Mon, 30 Mar 2020 20:55:11 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 09/10] tcg/i386: Fix INDEX_op_dup2_vec Date: Mon, 30 Mar 2020 20:54:55 -0700 Message-Id: <20200331035456.6494-11-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 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::441 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, qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" We were only constructing the 64-bit element, and not replicating the 64-bit element across the rest of the vector. Cc: qemu-stable@nongnu.org Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.inc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index 223dba9c8c..7f61eeedd0 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -2855,9 +2855,13 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode = opc, goto gen_simd; #if TCG_TARGET_REG_BITS =3D=3D 32 case INDEX_op_dup2_vec: - /* Constraints have already placed both 32-bit inputs in xmm regs.= */ - insn =3D OPC_PUNPCKLDQ; - goto gen_simd; + /* First merge the two 32-bit inputs to a single 64-bit element. */ + tcg_out_vex_modrm(s, OPC_PUNPCKLDQ, a0, a1, a2); + /* Then replicate the 64-bit elements across the rest of the vecto= r. */ + if (type !=3D TCG_TYPE_V64) { + tcg_out_dup_vec(s, type, MO_64, a0, a0); + } + break; #endif case INDEX_op_abs_vec: insn =3D abs_insn[vece]; --=20 2.20.1 From nobody Mon Apr 29 22:50:48 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=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1585627396; cv=none; d=zohomail.com; s=zohoarc; b=R+nUkEQ0wEss4Uu3a3aU3i9DVk6CXF4BxYuhlYVQmqrK6GCL01ph2BfmsyiQCCGlZG424/Ntree0gdRtoxFaQjdlAykyt8smOjkxV2M3MrnNSLUGSyYK0HQfj2Xycj688oVESZy0wrXka4MyMh6qvrK8A2fKIuX6vYCvPC62GGQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585627396; 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=c+Tp2V6+LD0F/OwBiPn+CFeXg9gywOboZsBIVwTf7gQ=; b=UfjhySeI2Hu6NzgnU7yXHhWOpAYiKX6qmr2K+SIj34/W5CTjOuazKWPsTp2AiUgT6V6MkyThQQwbG5fB/+Gb2rb0/ME2kOxDW6Qs35yK/CpDGWfIVJoD0Ls+sP9YJUl2mVe9yXnipVd9u1rb8XqJC2IRSkQd0K/SHKVjdP1qX2k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1585627396530716.7018016787795; Mon, 30 Mar 2020 21:03:16 -0700 (PDT) Received: from localhost ([::1]:60146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ87P-00086f-D0 for importer@patchew.org; Tue, 31 Mar 2020 00:03:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60955) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7zf-0004rp-9Q for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7ze-0008Ls-8b for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:15 -0400 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]:43782) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7ze-0008Kt-1y for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:14 -0400 Received: by mail-pg1-x532.google.com with SMTP id g20so263334pgk.10 for ; Mon, 30 Mar 2020 20:55:14 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:12 -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=c+Tp2V6+LD0F/OwBiPn+CFeXg9gywOboZsBIVwTf7gQ=; b=MSd+x3bnkEVoSxvLeKdHDVtbFsQRFrPR1E6d+c0MH3aPXnlh3U0b20GXJvwkw7sftb nC3ds+5Oq4XVfRUD2E36GM+T7W2K+E2+TuTm0fbe5PzjCcmx4bZDOB4LlO9yIpKaZuXe cPJpko1rPeaBbJgWZv7yj/RjUOhp7ubzr3s2lW6AKHtvA2yUZx4Nz3973e/Iufytc9SK rdijkqbpD7ul2MJuBNGLeJlEIr6S1ws4XmoeqSXN81ihpC98u7RB5vxXDVox8b9s0II2 DM+EdIEYKyhgky/y9bf0l/cICUIbVUDV3xSfuHLm+J4xn7cu9EJRWLBOnLFLurobHGI5 U74g== 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=c+Tp2V6+LD0F/OwBiPn+CFeXg9gywOboZsBIVwTf7gQ=; b=n8STos92U2OWC4ewDRnkkYyWq+yOeon59Cth81s1mYRrsaBJq5dBMb2/62T4hyZXry j8rrO5uv5CkhuwObQdPSWGaq5ljkC6b4N6rp4mQCIAWKc5gSqV+al2eddXoXS+IIgYp/ 0yfCng+EG+LKiUSb/t4W/btj0izwzL+sytabvMqUtyFzicywJ9g0pD4Stgiy6K/LFN2Y +rctbE3VxD99ftFIdrym2JOQ6wvMHqz+e5CO1TgPrlU9RhUfk4x3P+Kk2PhByMhQ8aep PYFDQ8eHN8aaBT9TrR9RX/PzSor3l2ukVke64XgM/QxV2knXf+t+EZJRjeI+A300Q3Cj 0gvw== X-Gm-Message-State: ANhLgQ1MVADVwq01D3KwgwnsyhA898H5IlTDAJgmg9/8Vz3Q5UnZX1Z2 HuL5ivCw/QhMoXNtswDgzOGHg5McToQ= X-Google-Smtp-Source: ADFU+vvI2kt1d4imhlR7tm2vHAXfHjfizlp1c5plBy6RMt4gH2xZmlPobgbJGDb8FtTJlqfEgyE63Q== X-Received: by 2002:a63:c712:: with SMTP id n18mr15360690pgg.343.1585626912712; Mon, 30 Mar 2020 20:55:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PULL for-5.0 10/10] decodetree: Use Python3 floor division operator Date: Mon, 30 Mar 2020 20:54:56 -0700 Message-Id: <20200331035456.6494-12-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 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::532 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, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) From: Philippe Mathieu-Daud=C3=A9 This script started using Python2, where the 'classic' division operator returns the floor result. In commit 3d004a371 we started to use Python3, where the division operator returns the float result ('true division'). To keep the same behavior, use the 'floor division' operator "//" which returns the floor result. Fixes: 3d004a371 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20200330121345.14665-1-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- scripts/decodetree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 2a8f2b6e06..46ab917807 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -1025,7 +1025,7 @@ class SizeTree: if extracted < self.width: output(ind, 'insn =3D ', decode_function, '_load_bytes(ctx, insn, {0}, {1});\n' - .format(extracted / 8, self.width / 8)); + .format(extracted // 8, self.width // 8)); extracted =3D self.width =20 # Attempt to aid the compiler in producing compact switch statemen= ts. @@ -1079,7 +1079,7 @@ class SizeLeaf: if extracted < self.width: output(ind, 'insn =3D ', decode_function, '_load_bytes(ctx, insn, {0}, {1});\n' - .format(extracted / 8, self.width / 8)); + .format(extracted // 8, self.width // 8)); extracted =3D self.width output(ind, 'return insn;\n') # end SizeLeaf --=20 2.20.1 From nobody Mon Apr 29 22:50:48 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=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1585627078; cv=none; d=zohomail.com; s=zohoarc; b=aW2GQf1HXNB+tKbcoTrBdUgRamTOPC5fnSg7T+PYyo7R8kDiqBLwFABPKJTaXsz9LEgqYJuWG5JC1I1Xu7o+O1DkGZFkkjk/vkyDaghmCFdz9STttJeHHCnTM1snGhQAjVemi7s1juvA4pFqJHjX1UDaSdI5AzHXxZHx2wHMobo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1585627078; 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=1qFoEnRP59bn9KPnaesHADAuwvvkoBPpPEfqGhyETA0=; b=P9VjjtgZcbGXfwSbw1nXQtTS9kKPmzbRmSenWO6QfgeTcdBkoqDcNsHxXnfxz1XTWRXusVtaSgGbNnlIOXqYn1irBBXi13o2gsJFgyJdcivGe5yF1QYKrnZX2CDHfyiDCAX/mkNGFvsSYFJYLprQrlwEsndQ82/DHBPVpg+KASo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass 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 1585627078866512.8554958749862; Mon, 30 Mar 2020 20:57:58 -0700 (PDT) Received: from localhost ([::1]:60032 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ82H-0001Ui-Kn for importer@patchew.org; Mon, 30 Mar 2020 23:57:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60801) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jJ7zU-0004YV-0v for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jJ7zS-00089v-T9 for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:03 -0400 Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]:43363) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jJ7zS-00089O-OA for qemu-devel@nongnu.org; Mon, 30 Mar 2020 23:55:02 -0400 Received: by mail-pf1-x443.google.com with SMTP id f206so9675129pfa.10 for ; Mon, 30 Mar 2020 20:55:02 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2020 20:55:00 -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=1qFoEnRP59bn9KPnaesHADAuwvvkoBPpPEfqGhyETA0=; b=OlafZaellGbT6BelHaaY7Hnksc3El3TlCFFzxF7iGQz9ebDUUEo1MWlkoNOqChbqyq XWIZJvRbaJheVdDhJic9kyq2gH91jdty9V8/HiI9JnGIM6E7LhRet/UwlpV9o+0AsEJK YG4xmEykGTgVcbB5qv9A6RIroJv48pswz9QQ/S29NGjrfry9l65xyWAQ4JMFr72wW2fd qOQlhKzu8dhCcHLRVxb3swEepr45bkra5/gdtXtg6RXXgccadjsTTWNqTv6Mz3GNaxMg /6ngmXnXawcm/er9p52NPtMXmkTC1qWvgi3O2kU71D4XIUXHbmtAmwjBzJauti0VjdWf oOMA== 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=1qFoEnRP59bn9KPnaesHADAuwvvkoBPpPEfqGhyETA0=; b=UzXkn/ElV3ulEZsSiwo9KgP8iyvqLq9rtplPRWScNfDlEgsL0O1KtwZvp1HWmPYh8n Y/9sJtyWPpEbshHFkAR8Vb64EX7A15LKGjhR8UrsmerQLPLlYvLpo4KgQL4E3uuCEQcI 8IDMKNzwT+DDEJ7EDv8ZuYax0jSqryjFIH/MzNAuc30/s6RivTBtIg+lAb+K9PHogRwR xSNNkg8+XtG2leB+JVb4UVPsfcDOaxn7aoxX2fqvvpaMe5l82zlG25PkgtbK07ELULNw WdRTUkAwbikFhhtKBX1nrBozoe1214jLlnu6iyvePpDbjZ7I9ipxMPuW8ZwgRTuS9iqD 4vZQ== X-Gm-Message-State: ANhLgQ3slD706KuqqZoGvWP0G+QS9gaLm8CT9TviaILsDdtm7ozEp4Pf 5zQbIoZEBpiLMzLeC1j+ofFPktxxgbE= X-Google-Smtp-Source: ADFU+vtrc/7fZbVtSnH0fPwg24JWIbvyBeQhAA/NZiU8HqeVfKvnZ6jfWYqXhlehVKB5edw1BNp/9w== X-Received: by 2002:a63:3083:: with SMTP id w125mr16400144pgw.282.1585626901433; Mon, 30 Mar 2020 20:55:01 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH for-5.0] tcg/i386: Fix INDEX_op_dup2_vec Date: Mon, 30 Mar 2020 20:54:47 -0700 Message-Id: <20200331035456.6494-3-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 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::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: peter.maydell@linaro.org, qemu-stable@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" We were only constructing the 64-bit element, and not replicating the 64-bit element across the rest of the vector. Cc: qemu-stable@nongnu.org Signed-off-by: Richard Henderson --- This bug is visible running RISU for aarch64 on x86_32. r~ --- tcg/i386/tcg-target.inc.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tcg/i386/tcg-target.inc.c b/tcg/i386/tcg-target.inc.c index 223dba9c8c..7f61eeedd0 100644 --- a/tcg/i386/tcg-target.inc.c +++ b/tcg/i386/tcg-target.inc.c @@ -2855,9 +2855,13 @@ static void tcg_out_vec_op(TCGContext *s, TCGOpcode = opc, goto gen_simd; #if TCG_TARGET_REG_BITS =3D=3D 32 case INDEX_op_dup2_vec: - /* Constraints have already placed both 32-bit inputs in xmm regs.= */ - insn =3D OPC_PUNPCKLDQ; - goto gen_simd; + /* First merge the two 32-bit inputs to a single 64-bit element. */ + tcg_out_vex_modrm(s, OPC_PUNPCKLDQ, a0, a1, a2); + /* Then replicate the 64-bit elements across the rest of the vecto= r. */ + if (type !=3D TCG_TYPE_V64) { + tcg_out_dup_vec(s, type, MO_64, a0, a0); + } + break; #endif case INDEX_op_abs_vec: insn =3D abs_insn[vece]; --=20 2.20.1