public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Cc: gdb@sourceware.org, joel@rtems.org
Subject: [PATCH] sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439]
Date: Sun, 23 Oct 2022 22:56:47 +0545	[thread overview]
Message-ID: <20221023171147.12371-1-vapier@gentoo.org> (raw)
In-Reply-To: <CAF9ehCU9Dg+LbpzekYYxtfyT4+Rm-WcCT1EEKLGvmAGc7C_YVQ@mail.gmail.com>

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


  reply	other threads:[~2022-10-23 18:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-01 19:58 mips jmr3904 simulator broken Joel Sherrill
2022-10-23 17:11 ` Mike Frysinger [this message]
2023-03-03 21:27   ` [PATCH] sim: mips/ppc/riscv: re-add AC_CANONICAL_SYSTEM [PR sim/29439] Jan-Benedict Glaw
2023-10-15 10:37     ` Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221023171147.12371-1-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.org \
    --cc=gdb@sourceware.org \
    --cc=joel@rtems.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).