]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: unify dtc tool checks
authorMike Frysinger <vapier@gentoo.org>
Sun, 20 Jun 2021 02:13:00 +0000 (22:13 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sun, 20 Jun 2021 02:43:56 +0000 (22:43 -0400)
Only one arch uses this currently, but others could too.  By moving
it up to the common checks, it'll also let us simplify the moxie code
significantly.

sim/ChangeLog
sim/Makefile.in
sim/arch-subdir.mk.in
sim/configure
sim/m4/sim_ac_toolchain.m4
sim/moxie/ChangeLog
sim/moxie/Makefile.in
sim/moxie/configure
sim/moxie/configure.ac

index 67304f54f6e6afcbfb372089f41e78cc8b7673db..c22f9b31464f23b45fbd982bf0672f6892a87336 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-19  Mike Frysinger  <vapier@gentoo.org>
+
+       * arch-subdir.mk.in (DTC): Define.
+       * m4/sim_ac_toolchain.m4: Call AC_CHECK_TOOL.
+       * configure, Makefile.in: Regenerate.
+
 2021-06-19  Mike Frysinger  <vapier@gentoo.org>
 
        * arch-subdir.mk.in: Move intl vars from common/Make-common.in.
index c912db9650904cafeccd3b0f274cfae0d77e8b1e..9ba3471d34521c45ce3da6e28a204559f256e75f 100644 (file)
@@ -645,6 +645,7 @@ DATADIRNAME = @DATADIRNAME@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DSYMUTIL = @DSYMUTIL@
+DTC = @DTC@
 DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
index 8128a27971d7123330c17640c50a9c850dae624a..5f59f8808073e9685cc6a9477cd4deb98258d0e0 100644 (file)
@@ -39,6 +39,7 @@ LDFLAGS = @LDFLAGS@
 AR = @AR@
 AR_FLAGS = rc
 RANLIB = @RANLIB@
+DTC = @DTC@
 
 DEPMODE = @CCDEPMODE@
 DEPDIR = @DEPDIR@
index 1b56b62174b5d9f75e5554a701a9c0f34818340f..9f84c4fd34dba6e6b02051ae6c3a6076af9a08db 100755 (executable)
@@ -719,6 +719,7 @@ CFLAGS_FOR_BUILD
 RANLIB_FOR_BUILD
 CC_FOR_BUILD
 AR_FOR_BUILD
+DTC
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
@@ -4409,6 +4410,99 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 
 
 
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dtc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dtc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_DTC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DTC"; then
+  ac_cv_prog_DTC="$DTC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DTC="${ac_tool_prefix}dtc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+DTC=$ac_cv_prog_DTC
+if test -n "$DTC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTC" >&5
+$as_echo "$DTC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DTC"; then
+  ac_ct_DTC=$DTC
+  # Extract the first word of "dtc", so it can be a program name with args.
+set dummy dtc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_DTC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DTC"; then
+  ac_cv_prog_ac_ct_DTC="$ac_ct_DTC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_DTC="dtc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DTC=$ac_cv_prog_ac_ct_DTC
+if test -n "$ac_ct_DTC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DTC" >&5
+$as_echo "$ac_ct_DTC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_DTC" = x; then
+    DTC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    DTC=$ac_ct_DTC
+  fi
+else
+  DTC="$ac_cv_prog_DTC"
+fi
+
+
 if test "x$cross_compiling" = "xno"; then
   : "${AR_FOR_BUILD:=\$(AR)}"
   : "${CC_FOR_BUILD:=\$(CC)}"
@@ -11938,7 +12032,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11941 "configure"
+#line 12035 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12044,7 +12138,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12047 "configure"
+#line 12141 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 2f1a42868ca9004b19a8c9761260c2f27ffe2058..47b992880f077b7a6118dd3cd672fa6fa8a25192 100644 (file)
@@ -24,6 +24,8 @@ AC_C_BIGENDIAN
 AC_ARG_PROGRAM
 AC_PROG_INSTALL
 
+AC_CHECK_TOOL(DTC, dtc)
+
 dnl Setup toolchain settings for build-time tools..
 if test "x$cross_compiling" = "xno"; then
   : "${AR_FOR_BUILD:=\$(AR)}"
index e30f9e164351a04f139a19d73fc9526f07879c26..10d0086a978a8b012167ffb432432782744e20ad 100644 (file)
@@ -1,3 +1,9 @@
+2021-06-19  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.in (DTC): Delete.
+       * configure.ac: Delete AC_CHECK_TOOL call.
+       * configure: Regenerate.
+
 2021-06-19  Mike Frysinger  <vapier@gentoo.org>
 
        * aclocal.m4: Regenerate.
index bd58074491fc7016dad4b8afa53f22a83629f8f6..eed4d1cf675bb597b2b5f567233f5594b7411b27 100644 (file)
@@ -17,8 +17,6 @@
 
 ## COMMON_PRE_CONFIG_FRAG
 
-DTC = @DTC@
-
 dtbdir = @datadir@/gdb/dtb
 
 SIM_OBJS = \
index 277b4e2c815fc40c1a952c42a9445ff5bb449e1d..653a48fc47d2f6e34a5dc8938f56f469b200fdd2 100755 (executable)
@@ -590,7 +590,6 @@ sim_scache
 sim_float
 sim_bitsize
 cgen_breaks
-DTC
 MAINT
 MAINTAINER_MODE_FALSE
 MAINTAINER_MODE_TRUE
@@ -1750,99 +1749,6 @@ fi
 
 
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}dtc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dtc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_DTC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$DTC"; then
-  ac_cv_prog_DTC="$DTC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_DTC="${ac_tool_prefix}dtc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-DTC=$ac_cv_prog_DTC
-if test -n "$DTC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTC" >&5
-$as_echo "$DTC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DTC"; then
-  ac_ct_DTC=$DTC
-  # Extract the first word of "dtc", so it can be a program name with args.
-set dummy dtc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_DTC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_DTC"; then
-  ac_cv_prog_ac_ct_DTC="$ac_ct_DTC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_DTC="dtc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DTC=$ac_cv_prog_ac_ct_DTC
-if test -n "$ac_ct_DTC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DTC" >&5
-$as_echo "$ac_ct_DTC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_DTC" = x; then
-    DTC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    DTC=$ac_ct_DTC
-  fi
-else
-  DTC="$ac_cv_prog_DTC"
-fi
-
-
 
 hardware="cfi core pal glue "
 sim_hw_cflags="-DWITH_HW=1"
index c7475b799a6f9596b012a3b1e5f0f6d1a84d7f4b..08bf6ff8acbc03a0be8087aa8afe9a7851974400 100644 (file)
@@ -4,6 +4,4 @@ AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
 
 SIM_AC_COMMON
 
-AC_CHECK_TOOL(DTC, dtc)
-
 SIM_AC_OUTPUT