From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id omRVNGeHVWMlzQ8AWB0awg (envelope-from ) for ; Sun, 23 Oct 2022 14:26:47 -0400 Received: by simark.ca (Postfix, from userid 112) id CDC3A1E112; Sun, 23 Oct 2022 14:26:47 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=OWDhvL9t; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 208F31E0D3 for ; Sun, 23 Oct 2022 14:26:46 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 09EF53856DFE for ; Sun, 23 Oct 2022 18:26:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 09EF53856DFE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666549605; bh=45hgj+FgbN4VpuiWoIqXg2DPl/jJl6USdtKU9RZfwIY=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OWDhvL9t06LEL2oJEkZLwr7EwMs6splcphb9Xr3qdKFHZe9B9bJlBhofBchg8v0uQ NJl5hTsWNw1/ze0XR/n33rzndSvE3gMHXSlSgUub3Fd0rSzF/zgkmFwUN6D+KWB+Je usEcJhBHdLt9W3I7hwIrB4rsn8zUHqr1PumgnutM= Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 717793857030; Sun, 23 Oct 2022 18:26:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 717793857030 Received: by smtp.gentoo.org (Postfix, from userid 559) id C49D6340C7F; Sun, 23 Oct 2022 18:26:15 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH] sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439] Date: Sun, 23 Oct 2022 22:56:47 +0545 Message-Id: <20221023171147.12371-1-vapier@gentoo.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: gdb@sourceware.org, joel@rtems.org Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" These configure scripts check $target and change behavior. They shouldn't be doing that, but until we can rework the sim to change behavior based on the input ELF, restore AC_CANONICAL_SYSTEM to these so that $target is correctly populated. This was lost in the d3562f83a7b8a1ae6e333cd5561419d3da18fcb4 ("sim: unify toolchain probing logic") refactor as the logic was hoisted up to the common code. But the fact the vars weren't passed down to the sub-configure scripts was missed. Bug: https://sourceware.org/PR29439 --- sim/mips/configure | 158 +++++++++++++++++++++++++++++++++++++++++ sim/mips/configure.ac | 4 ++ sim/ppc/configure | 129 +++++++++++++++++++++++++++++++++ sim/ppc/configure.ac | 4 ++ sim/riscv/configure | 158 +++++++++++++++++++++++++++++++++++++++++ sim/riscv/configure.ac | 4 ++ 6 files changed, 457 insertions(+) diff --git a/sim/mips/configure.ac b/sim/mips/configure.ac index 96806424958c..bdc675842d38 100644 --- a/sim/mips/configure.ac +++ b/sim/mips/configure.ac @@ -2,6 +2,10 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) +dnl The sim shouldn't be checking $target and changing behavior. But it is, +dnl and until we clean that up, we need to expand --target for use below. +AC_CANONICAL_SYSTEM + # DEPRECATED # # Instead of defining a `subtarget' macro, code should be checking diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac index 75232006e94a..b5909b705719 100644 --- a/sim/ppc/configure.ac +++ b/sim/ppc/configure.ac @@ -5,6 +5,10 @@ AC_CONFIG_MACRO_DIRS([../.. ../../config]) AC_PROG_INSTALL AC_PROG_CC +dnl The sim shouldn't be checking $target and changing behavior. But it is, +dnl and until we clean that up, we need to expand --target for use below. +AC_CANONICAL_SYSTEM + AC_ARG_ENABLE(sim-bitsize, [ --enable-sim-bitsize=n Specify target bitsize (32 or 64).], [case "${enableval}" in diff --git a/sim/riscv/configure.ac b/sim/riscv/configure.ac index 6edb28c863ed..0e74a1edda5c 100644 --- a/sim/riscv/configure.ac +++ b/sim/riscv/configure.ac @@ -2,6 +2,10 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT(Makefile.in) AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config]) +dnl The sim shouldn't be checking $target and changing behavior. But it is, +dnl and until we clean that up, we need to expand --target for use below. +AC_CANONICAL_SYSTEM + # Select the bitsize of the target. riscv_addr_bitsize= case "${target}" in -- 2.37.3