public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Subject: [PATCH 01/13] gdb, gdbserver, gdbsupport: use AC_CANONICAL_{BUILD, HOST, TARGET} instead of AC_CANONICAL_SYSTEM
Date: Sun, 25 Oct 2020 22:14:35 -0400	[thread overview]
Message-ID: <20201026021447.3174684-2-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20201026021447.3174684-1-simon.marchi@polymtl.ca>

`autoreconf -Wall` notes that AC_CANONICAL_SYSTEM is obsolete:

    configure.ac:36: warning: The macro `AC_CANONICAL_SYSTEM' is obsolete.

Replace it by AC_CANONICAL_BUILD, AC_CANONICAL_HOST and
AC_CANONICAL_TARGET in configure.ac files in gdb, gdbserver and
gdbsupport.  All three macros may not be needed everywhere, but it is
hard to completely audit the configure files to see which are required,
so I think it's better (and that there's no downside) to just call all
three.

gdb/ChangeLog:

	* configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
	AC_CANONICAL_SYSTEM.
	* configure: Re-generate.

gdbserver/ChangeLog:

	* configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
	AC_CANONICAL_SYSTEM.
	* configure: Re-generate.

gdbsupport/ChangeLog:

	* configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
	AC_CANONICAL_SYSTEM.
	* configure: Re-generate.

Change-Id: Ifd0e21f1e478634e768b5de1b8ee06a7f690d863
---
 gdb/configure           |  9 +++++++++
 gdb/configure.ac        | 11 ++++++++++-
 gdbserver/configure     |  6 +++++-
 gdbserver/configure.ac  |  9 ++++++++-
 gdbsupport/configure    |  6 ++++++
 gdbsupport/configure.ac | 11 ++++++++++-
 6 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index a8942ecbd5d6..d943424ca5bb 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -5249,6 +5249,15 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
 
+# Set build, build_cpu, build_vendor and build_os.
+
+
+# Set host, host_cpu, host_vendor, and host_os.
+
+
+# Set target, target_cpu, target_vendor, and target_os.
+
+
 test "$program_prefix" != NONE &&
   program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 6b4b0fa85109..1d34d08ee431 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -33,7 +33,16 @@ AM_PROG_CC_STDC
 AM_PROG_INSTALL_STRIP
 
 AC_CONFIG_AUX_DIR(..)
-AC_CANONICAL_SYSTEM
+
+# Set build, build_cpu, build_vendor and build_os.
+AC_CANONICAL_BUILD
+
+# Set host, host_cpu, host_vendor, and host_os.
+AC_CANONICAL_HOST
+
+# Set target, target_cpu, target_vendor, and target_os.
+AC_CANONICAL_TARGET
+
 AC_ARG_PROGRAM
 
 # We require a C++11 compiler.  Check if one is available, and if
diff --git a/gdbserver/configure b/gdbserver/configure
index 95086d0f0a51..4b7ef288d065 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -4588,6 +4588,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 
 
+# Set build, build_cpu, build_vendor and build_os.
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
@@ -4626,6 +4627,8 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
+
+# Set host, host_cpu, host_vendor, and host_os.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
 if ${ac_cv_host+:} false; then :
@@ -4659,6 +4662,8 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
+
+# Set target, target_cpu, target_vendor, and target_os.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
 $as_echo_n "checking target system type... " >&6; }
 if ${ac_cv_target+:} false; then :
@@ -4699,7 +4704,6 @@ test -n "$target_alias" &&
     NONENONEs,x,x, &&
   program_prefix=${target_alias}-
 
-
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
diff --git a/gdbserver/configure.ac b/gdbserver/configure.ac
index 4c7e392bbced..c4748703dcda 100644
--- a/gdbserver/configure.ac
+++ b/gdbserver/configure.ac
@@ -29,7 +29,14 @@ AC_GNU_SOURCE
 AC_SYS_LARGEFILE
 AM_PROG_INSTALL_STRIP
 
-AC_CANONICAL_SYSTEM
+# Set build, build_cpu, build_vendor and build_os.
+AC_CANONICAL_BUILD
+
+# Set host, host_cpu, host_vendor, and host_os.
+AC_CANONICAL_HOST
+
+# Set target, target_cpu, target_vendor, and target_os.
+AC_CANONICAL_TARGET
 
 AC_PROG_INSTALL
 AC_CHECK_TOOL(AR, ar)
diff --git a/gdbsupport/configure b/gdbsupport/configure
index a37f3c232ce5..cce6f51701b4 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -2728,6 +2728,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 ac_config_headers="$ac_config_headers config.h:config.in"
 
+
+# Set build, build_cpu, build_vendor and build_os.
 ac_aux_dir=
 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
   if test -f "$ac_dir/install-sh"; then
@@ -2795,6 +2797,8 @@ IFS=$ac_save_IFS
 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
 
 
+
+# Set host, host_cpu, host_vendor, and host_os.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
 $as_echo_n "checking host system type... " >&6; }
 if ${ac_cv_host+:} false; then :
@@ -2828,6 +2832,8 @@ IFS=$ac_save_IFS
 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
 
 
+
+# Set target, target_cpu, target_vendor, and target_os.
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
 $as_echo_n "checking target system type... " >&6; }
 if ${ac_cv_target+:} false; then :
diff --git a/gdbsupport/configure.ac b/gdbsupport/configure.ac
index 401e16f821da..a62a130fe996 100644
--- a/gdbsupport/configure.ac
+++ b/gdbsupport/configure.ac
@@ -19,7 +19,16 @@ dnl Process this file with autoconf to produce a configure script.
 AC_INIT([gdbsupport], 1.0)
 AC_CONFIG_SRCDIR(common-defs.h)
 AC_CONFIG_HEADER(config.h:config.in)
-AC_CANONICAL_SYSTEM
+
+# Set build, build_cpu, build_vendor and build_os.
+AC_CANONICAL_BUILD
+
+# Set host, host_cpu, host_vendor, and host_os.
+AC_CANONICAL_HOST
+
+# Set target, target_cpu, target_vendor, and target_os.
+AC_CANONICAL_TARGET
+
 AM_MAINTAINER_MODE
 AC_CONFIG_AUX_DIR(..)
 AM_INIT_AUTOMAKE
-- 
2.29.0


  reply	other threads:[~2020-10-26  2:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26  2:14 [PATCH 00/13] Modernize gdb/gdbserver/gdbsupport configure files Simon Marchi
2020-10-26  2:14 ` Simon Marchi [this message]
2020-10-26  2:14 ` [PATCH 02/13] gdb: use AC_PROG_CC_STDC instead of AM_PROG_CC_STDC Simon Marchi
2020-10-26  2:14 ` [PATCH 03/13] gdbserver: modernize configure.ac Simon Marchi
2020-10-26  2:14 ` [PATCH 04/13] gdb: " Simon Marchi
2020-10-26  2:14 ` [PATCH 05/13] gdb/testsuite: " Simon Marchi
2020-10-26  2:14 ` [PATCH 06/13] gdb: modernize acinclude.m4 Simon Marchi
2020-10-26  2:14 ` [PATCH 07/13] gdbsupport: re-indent ptrace.m4 Simon Marchi
2020-10-26  2:14 ` [PATCH 08/13] gdbsupport: replace AC_TRY_COMPILE in ptrace.m4 Simon Marchi
2020-10-26  2:14 ` [PATCH 09/13] gdbsupport: replace AC_TRY_COMPILE in warning.m4 Simon Marchi
2020-10-26  2:17 ` [PATCH 10/13] gdbsupport: use AC_FUNC_FORK instead of AC_FUNC_VFORK Simon Marchi
2020-10-26  2:17   ` [PATCH 11/13] gdbsupport: replace AC_TRY_COMPILE in common.m4 Simon Marchi
2020-10-26  2:20     ` Simon Marchi
2020-10-26  2:17   ` [PATCH 12/13] gdb: replace AC_TRY_LINK in sanitize.m4 Simon Marchi
2020-10-26  2:17   ` [PATCH 13/13] gdbserver: replace AC_TRY_COMPILE in acinclude.m4 Simon Marchi
2020-10-26  2:22 ` [PATCH 00/13] Modernize gdb/gdbserver/gdbsupport configure files Simon Marchi
2020-10-30 17:29 ` Tom Tromey
2020-10-31 12:32   ` Simon Marchi

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=20201026021447.3174684-2-simon.marchi@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.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).