gdb/sim: switch raw echo to AC_MSG_NOTICE

Message ID 20240120005447.29652-1-vapier@gentoo.org
State New
Headers
Series gdb/sim: switch raw echo to AC_MSG_NOTICE |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed

Commit Message

Mike Frysinger Jan. 20, 2024, 12:54 a.m. UTC
  This simplifies the code, makes it more portable, and improves logging.
---
 gdb/configure                    | 10 ++++++----
 gdbserver/configure              | 10 ++++++----
 gdbsupport/configure             | 10 ++++++----
 gdbsupport/warning.m4            |  8 ++++----
 sim/configure                    | 10 ++++++----
 sim/m4/sim_ac_option_warnings.m4 |  8 ++++----
 6 files changed, 32 insertions(+), 24 deletions(-)
  

Patch

diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4
index bdac8b3e7d22..365fb80696ce 100644
--- a/gdbsupport/warning.m4
+++ b/gdbsupport/warning.m4
@@ -89,8 +89,8 @@  AS_HELP_STRING([--enable-build-warnings], [enable build-time compiler warnings i
         build_warnings="${t} ${build_warnings}";;
   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting compiler warning flags = $build_warnings" 6>&1
+if test x"$build_warnings" != x""; then
+  AC_MSG_NOTICE([Setting compiler warning flags = $build_warnings])
 fi])dnl
 AC_ARG_ENABLE(gdb-build-warnings,
 AS_HELP_STRING([--enable-gdb-build-warnings], [enable GDB specific build-time compiler warnings if gcc is used]),
@@ -103,8 +103,8 @@  AS_HELP_STRING([--enable-gdb-build-warnings], [enable GDB specific build-time co
         build_warnings="${t} ${build_warnings}";;
   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+if test x"$build_warnings" != x""; then
+  AC_MSG_NOTICE([Setting GDB specific compiler warning flags = $build_warnings])
 fi])dnl
 
 # The set of warnings supported by a C++ compiler is not the same as
diff --git a/sim/m4/sim_ac_option_warnings.m4 b/sim/m4/sim_ac_option_warnings.m4
index fcbcca9f7b71..4b0b15af2c14 100644
--- a/sim/m4/sim_ac_option_warnings.m4
+++ b/sim/m4/sim_ac_option_warnings.m4
@@ -116,8 +116,8 @@  AS_HELP_STRING([--enable-build-warnings], [enable build-time compiler warnings i
         build_warnings="${t} ${build_warnings}";;
   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting compiler warning flags = $build_warnings" 6>&1
+if test x"$build_warnings" != x""; then
+  AC_MSG_NOTICE([Setting compiler warning flags = $build_warnings])
 fi])dnl
 AC_ARG_ENABLE(sim-build-warnings,
 AS_HELP_STRING([--enable-sim-build-warnings], [enable SIM specific build-time compiler warnings if gcc is used]),
@@ -130,8 +130,8 @@  AS_HELP_STRING([--enable-sim-build-warnings], [enable SIM specific build-time co
         build_warnings="${t} ${build_warnings}";;
   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
 esac
-if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
-  echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
+if test x"$build_warnings" != x""; then
+  AC_MSG_NOTICE([Setting SIM specific compiler warning flags = $build_warnings])
 fi])dnl
 WARN_CFLAGS=""
 BUILD_WARN_CFLAGS=""