]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: clean up C11 header includes
authorMike Frysinger <vapier@gentoo.org>
Sat, 9 Jan 2021 08:56:10 +0000 (03:56 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 11 Jan 2021 13:05:54 +0000 (08:05 -0500)
Since we require C11 now, we can assume many headers exist, and
clean up all of the conditional includes.  It's not like any of
this code actually accounted for the headers not existing, just
whether we could include them.

The strings.h cleanup is a little nuanced: it isn't in C11, but
every use of it in the codebase will include strings.h only if
string.h doesn't exist.  Since we now assume the C11 string.h
exists, we'll never include strings.h, so we can delete it.

182 files changed:
sim/aarch64/ChangeLog
sim/aarch64/config.in
sim/aarch64/configure
sim/arm/ChangeLog
sim/arm/config.in
sim/arm/configure
sim/avr/ChangeLog
sim/avr/config.in
sim/avr/configure
sim/avr/interp.c
sim/bfin/ChangeLog
sim/bfin/config.in
sim/bfin/configure
sim/bpf/ChangeLog
sim/bpf/config.in
sim/bpf/configure
sim/common/ChangeLog
sim/common/acinclude.m4
sim/common/callback.c
sim/common/cgen-scache.c
sim/common/dv-glue.c
sim/common/dv-pal.c
sim/common/dv-sockser.c
sim/common/hw-alloc.c
sim/common/hw-base.c
sim/common/hw-device.c
sim/common/hw-events.c
sim/common/hw-handles.c
sim/common/hw-ports.c
sim/common/hw-properties.c
sim/common/hw-tree.c
sim/common/nrun.c
sim/common/sim-arange.c
sim/common/sim-events.c
sim/common/sim-fpu.c
sim/common/sim-hw.c
sim/common/sim-load.c
sim/common/sim-memopt.c
sim/common/sim-options.c
sim/common/sim-profile.c
sim/common/sim-trace.c
sim/common/sim-utils.c
sim/common/sim-watch.c
sim/common/syscall.c
sim/cr16/ChangeLog
sim/cr16/config.in
sim/cr16/configure
sim/cr16/simops.c
sim/cris/ChangeLog
sim/cris/config.in
sim/cris/configure
sim/cris/configure.ac
sim/cris/dv-rv.c
sim/cris/rvdummy.c
sim/cris/sim-if.c
sim/cris/traps.c
sim/d10v/ChangeLog
sim/d10v/config.in
sim/d10v/configure
sim/d10v/interp.c
sim/d10v/simops.c
sim/erc32/ChangeLog
sim/erc32/config.in
sim/erc32/configure
sim/erc32/sis.c
sim/frv/ChangeLog
sim/frv/config.in
sim/frv/configure
sim/frv/options.c
sim/frv/sim-if.c
sim/ft32/ChangeLog
sim/ft32/config.in
sim/ft32/configure
sim/h8300/ChangeLog
sim/h8300/compile.c
sim/h8300/config.in
sim/h8300/configure
sim/igen/ChangeLog
sim/igen/configure
sim/igen/configure.ac
sim/igen/filter.c
sim/igen/lf.c
sim/igen/misc.c
sim/igen/misc.h
sim/igen/table.c
sim/iq2000/ChangeLog
sim/iq2000/config.in
sim/iq2000/configure
sim/iq2000/sim-if.c
sim/lm32/ChangeLog
sim/lm32/config.in
sim/lm32/configure
sim/lm32/sim-if.c
sim/m32c/ChangeLog
sim/m32c/config.in
sim/m32c/configure
sim/m32r/ChangeLog
sim/m32r/config.in
sim/m32r/configure
sim/m32r/sim-if.c
sim/m68hc11/ChangeLog
sim/m68hc11/config.in
sim/m68hc11/configure
sim/mcore/ChangeLog
sim/mcore/config.in
sim/mcore/configure
sim/microblaze/ChangeLog
sim/microblaze/config.in
sim/microblaze/configure
sim/mips/ChangeLog
sim/mips/config.in
sim/mips/configure
sim/mips/interp.c
sim/mn10300/ChangeLog
sim/mn10300/config.in
sim/mn10300/configure
sim/mn10300/interp.c
sim/mn10300/op_utils.c
sim/moxie/ChangeLog
sim/moxie/config.in
sim/moxie/configure
sim/msp430/ChangeLog
sim/msp430/config.in
sim/msp430/configure
sim/or1k/ChangeLog
sim/or1k/config.in
sim/or1k/configure
sim/or1k/sim-if.c
sim/ppc/ChangeLog
sim/ppc/config.in
sim/ppc/configure
sim/ppc/configure.ac
sim/ppc/cpu.c
sim/ppc/debug.c
sim/ppc/device.c
sim/ppc/device_table.c
sim/ppc/device_table.h
sim/ppc/dgen.c
sim/ppc/emul_bugapi.c
sim/ppc/emul_chirp.c
sim/ppc/emul_netbsd.c
sim/ppc/emul_unix.c
sim/ppc/filter.c
sim/ppc/gen-model.c
sim/ppc/hw_com.c
sim/ppc/hw_eeprom.c
sim/ppc/hw_nvram.c
sim/ppc/hw_opic.c
sim/ppc/hw_pal.c
sim/ppc/hw_phb.c
sim/ppc/hw_sem.c
sim/ppc/hw_shm.c
sim/ppc/lf.c
sim/ppc/main.c
sim/ppc/misc.c
sim/ppc/misc.h
sim/ppc/mon.c
sim/ppc/pk_disklabel.c
sim/ppc/psim.c
sim/ppc/registers.c
sim/ppc/sim_calls.c
sim/ppc/table.c
sim/ppc/tree.c
sim/pru/ChangeLog
sim/pru/config.in
sim/pru/configure
sim/rl78/ChangeLog
sim/rl78/config.in
sim/rl78/configure
sim/rx/ChangeLog
sim/rx/config.in
sim/rx/configure
sim/rx/main.c
sim/sh/ChangeLog
sim/sh/config.in
sim/sh/configure
sim/sh/interp.c
sim/v850/ChangeLog
sim/v850/config.in
sim/v850/configure
sim/v850/interp.c
sim/v850/simops.c

index 5708802be00d0941768c190085b1eb75fb15bea5..e4f07482c3cf6e99e556f136948e57840089d50b 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index ef481b4d87f7ef3203642275dc557c2ba3d41afa..b682b1b36e79e26b65af27c0f0a0c2172f30dd58 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 67060927b068ed529822ce8bcceadc79b41786c1..7b49939da0bdeb973bc14015d9dc717e30642456 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 43607d8156dce4464063c6dc4ca1107882c6b407..51dcea114d7fd550befb0b1d1f699fb99f6ecb56 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index c368fa4681be6254fe343a1d1a9cf06a2a80bb44..0f837b255248679a3a6c4b5afaaae8955d25f5fc 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * interp.c: Delete HAVE_STRING_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 1bcb7b47b31dbef37b297df2aeae397f835b378c..3eb9c8745725fd36097c5ad03939fa7efd1c48eb 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index deaf711e1040b7db2178847c11216b13627a1f69..3aff8816187e8cbcb285fcba10b421582cbeca17 100644 (file)
@@ -19,9 +19,8 @@
 
 #include "config.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
+
 #include "bfd.h"
 #include "libiberty.h"
 #include "gdb/remote-sim.h"
index 1ac810e8a1e49ad95b0597ecf910fc1589ce420a..36acbdc40af10435c15be4efaa3c5aa500eddf11 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 5be1f16ce9368fe73c7c1944d8b89c01a0de3d33..cc4a677d16a70473111299a37e59ebeddde37629 100644 (file)
@@ -16,9 +16,6 @@
 /* Define if dv-sockser is usable. */
 #undef HAVE_DV_SOCKSER
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 3701395a1f8dfb9afbf4bf9873b20cd89ad5989f..c0d129d8124b7a2bcd2c7c096623505257a505dc 100755 (executable)
@@ -6840,6 +6840,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6933,6 +6946,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7137,6 +7155,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8973,15 +8996,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -9014,7 +9035,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12951,7 +12972,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12954 "configure"
+#line 12975 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13057,7 +13078,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13060 "configure"
+#line 13081 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index e1abb698fd1ada28d1519c0926b4bb741076dce6..b08642f219c784329042990cf8e6c04b190002da 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 74b7e59c58ec282fc3f0247378426c39955ad474..cad42b2a93064d2fdc4c1340369738f3887aa257 100755 (executable)
@@ -6802,6 +6802,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6895,6 +6908,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7099,6 +7117,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8935,15 +8958,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8976,7 +8997,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12913,7 +12934,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12916 "configure"
+#line 12937 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13019,7 +13040,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13022 "configure"
+#line 13043 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index e525110bf4155ec85423aa17e73492e67864f805..6ffee1610d730d3fd8a206e3b6f20d8ed343a5c6 100644 (file)
@@ -1,3 +1,16 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * acinclude.m4 (SIM_AC_COMMON): Delete checks for stdlib.h, string.h,
+       strings.h, time.h, and errno.h.
+       * callback.c, cgen-scache.c, dv-glue.c, dv-pal.c, dv-sockser.c,
+       hw-alloc.c, hw-base.c, hw-device.c, hw-events.c, hw-handles.c,
+       hw-ports.c, hw-properties.c, hw-tree.c, nrun.c, sim-arange.c,
+       sim-events.c, sim-fpu.c, sim-hw.c, sim-load.c, sim-memopt.c,
+       sim-options.c, sim-profile.c, sim-trace.c, sim-utils.c,
+       sim-watch.c, syscall.c: Delete HAVE_ERRNO_H, HAVE_STDLIB_H,
+       HAVE_STRING_H, HAVE_STRINGS_H, HAVE_LIMITS_H, HAVE_TIME_H,
+       and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-basics.h [__CYGWIN32__] (vasprintf, asprintf): Delete.
index b2297dfeb1507901f9724ec52c9744aeb6a4725c..45ec134d6d766ce2925f964e4393acb62d5b8838 100644 (file)
@@ -98,12 +98,11 @@ ALL_LINGUAS=
 ZW_GNU_GETTEXT_SISTER_DIR(../../intl)
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h)
+# NB: You can assume C11 headers exist.
+AC_CHECK_HEADERS(unistd.h)
 AC_CHECK_HEADERS(sys/time.h sys/times.h sys/resource.h sys/mman.h)
 AC_CHECK_HEADERS(fcntl.h fpu_control.h)
-AC_CHECK_HEADERS(dlfcn.h errno.h sys/stat.h)
+AC_CHECK_HEADERS(dlfcn.h sys/stat.h)
 AC_CHECK_FUNCS(getrusage time sigaction __setfpucw)
 AC_CHECK_FUNCS(mmap munmap lstat truncate ftruncate posix_fallocate)
 AC_CHECK_MEMBERS([[struct stat.st_dev], [struct stat.st_ino],
index 5172d9751df8e7ab8b46b6eeebec407a44045f09..f9e848fd913d722d0c3a4b93d9127084526025da 100644 (file)
 #include "ansidecl.h"
 #include <stdarg.h>
 #include <stdio.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_LIMITS_H
 /* For PIPE_BUF.  */
 #include <limits.h>
-#endif
 #include <errno.h>
 #include <fcntl.h>
 #include <time.h>
index 42068a398a7bfd0c477d08c96f81c92a6f9fd14c..56df075f6804aeab93ca07f120c204d997fb59c6 100644 (file)
@@ -20,9 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define SCACHE_DEFINE_INLINE
 
 #include "sim-main.h"
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include "libiberty.h"
 #include "sim-options.h"
 #include "sim-io.h"
index 9319b198caa9c011c8350a23dd3ba30c1fe7726e..8bda32615780e6936a6468067b14325ae7c85931 100644 (file)
 
 #include "hw-main.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /* DEVICE
 
index 66a916c6657e1afacf5b6aef3bec7f12bc9add0f..dd4ab4fb390f2819e916250417e2f1a3820d1500 100644 (file)
    its immediate domain */
 #include "hw-tree.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 /* DEVICE
 
index 1b01870050d4ca5b53104b595480d319fbcd7645..fc552fa0acf09c0a077afbcb325b514dcdbf2c85 100644 (file)
@@ -21,17 +21,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "config.h"
 #include "sim-main.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 #include <signal.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index e504236d1d6dfd16fad5b2493f9bcf65a8f8869b..141dc21167f35ea0724f8672042d49099cb013e3 100644 (file)
@@ -21,10 +21,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "hw-main.h"
 #include "hw-base.h"
 
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 struct hw_alloc_data
 {
index 87ca7292e55808403eb9e8eb582a80d3d63bd928..af8b18124896925f97005773d597110e87b9034d 100644 (file)
 #include "hw-main.h"
 #include "hw-base.h"
 
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#if HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <ctype.h>
 
 #include "hw-config.h"
index 76e41b4d3210ccea44d1b44b3d6875441783bc5c..bc91264c020832fdbe55b921af6567747628ed1c 100644 (file)
 #include "hw-main.h"
 #include "hw-base.h"
 
-#if HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#if HAVE_STRING_H
 #include <string.h>
-#endif
 
 /* Address methods */
 
index 917d7bde4e9079fde257dee2fb11300c03414007..1c749dd8c27c9c014427786f06f861d06ad03be4 100644 (file)
@@ -23,9 +23,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-events.h"
 
-#if HAVE_STRING_H
 #include <string.h>
-#endif
 
 /* The hw-events object is implemented using sim-events */
 
index 539be3938adffbc9399d475aab865b653b3dd7af..bbd08f632fddeb3967cec332d1a745a1555f540b 100644 (file)
@@ -23,9 +23,7 @@
 #include "hw-main.h"
 #include "hw-base.h"
 
-#if HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 struct hw_handle_mapping
 {
index 7aefb9739123244c3df996948116d8349b6a9753..50e2cbc30e45594f3a1bd07b46e935c26c81c88d 100644 (file)
@@ -21,18 +21,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "hw-main.h"
 #include "hw-base.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <ctype.h>
 
 
index fe29ff41ae84818b65701fa9f0b2ede97a97fe76..11a371cea00f8aabe6ccdd7554d08be9ed6fbae8 100644 (file)
 #include "sim-io.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /* property entries */
 
index 91822337d97f18e753430e1c82bce4c0ff425878..4d50ec6ed62ec6ce2f317fe65ab33b63cb3f9d55 100644 (file)
 #include "sim-io.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <ctype.h>
 
 /* manipulate/lookup device names */
index 134dec8bc11049504bde2c9ef57da788536bb8d8..0caa82062a240fa3609d7b221463ec9e07bbb5a5 100644 (file)
@@ -21,15 +21,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <signal.h>
 #include <stdlib.h>
-
 /* For strsignal.  */
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "sim-main.h"
 
index 90203a9784b85a38b05bb4c733fd8c1b5692bda5..a40dabbeb7d7c8293af3f5adc9b05174d302ca6d 100644 (file)
@@ -24,13 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-basics.h"
 #include "sim-arange.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 /* Insert a range.  */
 
index e17557666d7e6080bcd65c163f953ca7d9339712..db05cafe13e77270906aed40cb5f9b3cbe363086 100644 (file)
 #include "sim-assert.h"
 #include "libiberty.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <signal.h> /* For SIGPROCMASK et al. */
 
 typedef enum {
index 30147a81da47ba07988d5df90fa392774d9fc1ac..bff5b08b5e59b8a522ff1a045533f0bae456f7a2 100644 (file)
@@ -41,9 +41,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-io.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 /* Debugging support.
    If digits is -1, then print all digits.  */
index 979a4679af6ab894e6be0bf21816c08bc04caa2e..81b4f64f7c22e794d61d68e9d5ff9c13b9dac8bf 100644 (file)
@@ -28,17 +28,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "hw-main.h"
 #include "hw-base.h"
 
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <ctype.h>
 #include <errno.h>
 
index d998be8443962c4f5aec0e73ae4bc36b46b07a65..e0aab1e9eb49d5ade1cf9bc17ece8bca5f7bce96 100644 (file)
@@ -24,9 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "ansidecl.h"
 #include <stdio.h> /* for NULL */
 #include <stdarg.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <time.h>
 
 #include "sim-basics.h"
index 77a48df5d569f22773fc0f1af87944284c6c890d..a102d74ecd0b625395029d5b0fa7ff7508482163 100644 (file)
@@ -23,19 +23,9 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-assert.h"
 #include "sim-options.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index e0de39adab76dab906635eb810b83ff688627a07..d4434cfd7385c41c92a75eff32ea74fbc44e0ea8 100644 (file)
@@ -19,16 +19,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "config.h"
 #include "sim-main.h"
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <ctype.h>
 #include <stdio.h>
 #include "libiberty.h"
index a886013edac6f94f8dbdd56187aea61a4408a4e5..f4ce89f0428e97ec43d432561300226687824d57 100644 (file)
@@ -22,17 +22,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-options.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 #include <ctype.h>
 
 #if !WITH_PROFILE_PC_P
index 29b793ce79aa15fbf31cc43605a00466ab8a31b4..5f161da630bb5c0681ec9eccaa6ce695c99f8195 100644 (file)
@@ -29,16 +29,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-assert.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #ifndef SIZE_PHASE
 #define SIZE_PHASE 8
index 122e7f2f617a6addd03180e84d773f85363c8432..69949aa1520150d830797041d4b28cbcb91217f0 100644 (file)
@@ -20,14 +20,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-main.h"
 #include "sim-assert.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h> /* needed by sys/resource.h */
 #endif
@@ -35,14 +29,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
 #endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "libiberty.h"
 #include "bfd.h"
index 9c929a15731be7c454d486607bd49d0b863cb008..bbd5be434bea69aab6a54ced2c5bc1c8821db5f5 100644 (file)
@@ -26,18 +26,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <ctype.h>
 #include <stdio.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 enum {
   OPTION_WATCH_DELETE                      = OPTION_START,
index 8a8c81fbf6b480c1787510a2540d3ad19dd12676..fbe8021c8ef17d5fff98a8a978e6dcd8872b770b 100644 (file)
 #include "libiberty.h"
 #include <stdarg.h>
 #include <stdio.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#elif defined (HAVE_STRINGS_H)
-#include <strings.h>
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 14edee23c29c76e0a92f2d83b13d2dd15e4ce7d3..7ec37863f336589645a899ce8866148063400dac 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * simops.c: Delete HAVE_STRING_H & HAVE_TIME_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * cr16_sim.h (State): Change to an extern.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index f33e5d5409fa4dc256131e19e2fa8d7260e23d31..8a1f3867255a827a425f34a27a310f190e9d9213 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index c7139eb96993e431af72dffea679f835f7954eed..f52376237e94a2c6b908d7ea730a166f6a84d54b 100644 (file)
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
index 2af85ec58da5589bdc5522b2b2ac6cf04572ca81..df6db418503d25909479b8eea404c36099d20ab9 100644 (file)
@@ -1,3 +1,10 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * dv-rv.c, rvdummy.c, sim-if.c, traps.c: Delete HAVE_ERRNO_H,
+       HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H, and strings.h
+       include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 789d4127be4e76a24fe832e0f2ab4dfb89cefd47..aa4d64950e9a5e1c25ac69413603268f55136450 100644 (file)
@@ -16,9 +16,6 @@
 /* Define if dv-sockser is usable. */
 #undef HAVE_DV_SOCKSER
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
@@ -43,9 +40,6 @@
 /* Define to 1 if you have the `socket' library (-lsocket). */
 #undef HAVE_LIBSOCKET
 
-/* Define to 1 if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
 /* Define to 1 if you have the `lstat' function. */
 #undef HAVE_LSTAT
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 267e9d373c683363932cd3a7a0aff15f45cc8cf8..b40c756d6d1599fa90333803551c891d33f0e072 100755 (executable)
@@ -6811,6 +6811,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6904,6 +6917,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7108,6 +7126,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8944,15 +8967,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8985,7 +9006,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12922,7 +12943,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12925 "configure"
+#line 12946 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13028,7 +13049,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13031 "configure"
+#line 13052 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13580,7 +13601,7 @@ _ACEOF
 
 
 # For dv-rv and rvdummy.
-for ac_header in sys/socket.h sys/select.h limits.h sys/param.h
+for ac_header in sys/socket.h sys/select.h sys/param.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
index 12e0023e864ec5d69f84792380c900260199a037..a2b08a98d409744627f645ba6f08d4298165b7d4 100644 (file)
@@ -5,7 +5,7 @@ sinclude(../common/acinclude.m4)
 SIM_AC_COMMON
 
 # For dv-rv and rvdummy.
-AC_CHECK_HEADERS(sys/socket.h sys/select.h limits.h sys/param.h)
+AC_CHECK_HEADERS(sys/socket.h sys/select.h sys/param.h)
 
 SIM_AC_OPTION_ENDIAN(LITTLE)
 SIM_AC_OPTION_ALIGNMENT(NONSTRICT_ALIGNMENT)
index d22bf068caf5d1decbf34e9ba6ee2183eda18d17..612eff4e9314ef39b965d6a84c5ec7aabf15ac21 100644 (file)
 #include "hw-tree.h"
 
 #include <ctype.h>
-
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
index cb16410304d627f94bf3933ff7c7aacd43706498..f147ea9e59b8b2df38995eb77366092d54984210 100644 (file)
@@ -41,13 +41,8 @@ main (int argc, char *argv[])
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -60,9 +55,7 @@ main (int argc, char *argv[])
 #include <sys/select.h>
 #endif
 
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif
 
 /* Not guarded in dv-sockser.c, so why here.  */
 #include <netinet/in.h>
index b8c7cb2a96e78dbee716439823534451dcacdbe5..787896cae23364e24ea814a7ab50217a8c41b410 100644 (file)
@@ -26,9 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "elf-bfd.h"
 
 #include "sim-main.h"
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <errno.h>
 #include "sim-options.h"
 #include "dis-asm.h"
index 03429e12ed2c1435cee5573260db579ad4cee438..2aaa1f43b1685e5b12e280136290036b2c097750 100644 (file)
@@ -24,9 +24,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 /* FIXME: get rid of targ-vals.h usage everywhere else.  */
 
 #include <stdarg.h>
-#ifdef HAVE_ERRNO_H
 #include <errno.h>
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 13abbb8614773679a80f1fce7143c3c30f3705c9..b5b45d28548260fc578e1833e841cfb7ba5486d0 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+       HAVE_STDLIB_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * d10v_sim.h (State): Change to an extern.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index d522be20cc2976ddc08e1ac7d4b6347167caa8eb..e7811297111b766e39e8373e6e5950f22b81f046 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 5c70b38d9d8fe13256defb3ebbf3d0177da4196c..276c76beab0930a8f14f3271a4889f703df01a5a 100644 (file)
 #include "gdb/sim-d10v.h"
 #include "gdb/signals.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif /* HAVE_STRING_H */
-#endif /* HAVE_STRINGS_H */
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 enum _leftright { LEFT_FIRST, RIGHT_FIRST };
 
index 92fd82710fd53f9a28bf72439d61b50d73e5440b..ed0c8a3625910f4add10121e1ce61eb8e64e94c9 100644 (file)
@@ -7,9 +7,7 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 #include "sim-main.h"
 #include "simops.h"
index d296ab311b9546c584fc4b0034e410658829baaa..d169de8c098fefc85b89f0f9c58817f027c73dec 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * sis.c: Delete HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index af8261e4816b4d09298d15d5fa7b0f3cea75fd18..360cffb6657b1eec34e9b02de3b652f3e6ab4ad1 100755 (executable)
@@ -6784,6 +6784,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6877,6 +6890,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7081,6 +7099,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8917,15 +8940,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8958,7 +8979,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12895,7 +12916,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12898 "configure"
+#line 12919 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13001,7 +13022,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13004 "configure"
+#line 13025 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 26f3ed9cd6ad9c19f32ffab2ab4e129e249245c9..858bcbb9d7be2d91f9f61f8da81b8c163efee94e 100644 (file)
@@ -19,9 +19,7 @@
 #include "config.h"
 #include <signal.h>
 #include <string.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include <stdio.h>
 #include <sys/fcntl.h>
 #include "sis.h"
index c021f1c4ab8a66745c4e1ef3a29cd18b20f54b0e..90228792512bd1277896f87c7708a667b4a4b297 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * options.c, sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+       HAVE_STDLIB_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index ea6c08c477dedf78d9e06d942a930a7ab85acfc5..c60f7d8649d677435f603a9a880580b8c0f5bb1b 100644 (file)
@@ -16,9 +16,6 @@
 /* Define if dv-sockser is usable. */
 #undef HAVE_DV_SOCKSER
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index fb752cf154394d24624cb516e3a944d3b57fdcbd..d10ca4b2d89f7379d7e04c103c8296713fd84365 100755 (executable)
@@ -6806,6 +6806,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6899,6 +6912,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7103,6 +7121,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8939,15 +8962,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8980,7 +9001,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12917,7 +12938,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12920 "configure"
+#line 12941 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13023,7 +13044,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13026 "configure"
+#line 13047 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index d90984a1ee9bf81142092fba8d996882a25a102a..b5cc8dec7989e4a51f260a97388e27a37d0ae759 100644 (file)
@@ -24,16 +24,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "sim-assert.h"
 #include "sim-options.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 /* FRV specific command line options. */
 
index 2eb6e6da5f3f13e4d6b3a39075e05b90f5efe729..636890bd2cbcdd9dcc4602a85da3e6d69ff8fedf 100644 (file)
@@ -20,9 +20,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #define WANT_CPU
 #define WANT_CPU_FRVBF
 #include "sim-main.h"
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #include "sim-options.h"
 #include "libiberty.h"
 #include "bfd.h"
index ad31e24e01f6a92c13f84fa34d8b04a32b54aadb..68aaf94ea14e10a882629969ee33658c9cbb8228 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 6eeb19ff067b29c513fbbb714657c981cace6ef5..cea6a42b666008a2e2b67f8fde2bb40bf5eaef7d 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 4bab9c52b070a6e664bf1308f7455de1a540fec4..f6dd484c79f754e89b0c7d5e47b5326868ff7179 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * compile.c: Delete HAVE_TIME_H & HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 3a3b2e7241bbcdba3a270ef3a7d0fec9956d7202..a0e8bbbf89865b640beea4bd9c75c4012b80273e 100644 (file)
 
 #include "config.h"
 #include <signal.h>
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
index a05c962089792d84999e9412b59329b7bd6203cb..81502266895e7dc98037cd1d05acd81d18d9d549 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 2585927f7d3c82ed316d181cdf6200902aef509c..34c63bfdd343a28d5c8ddddb7e806c08e0cb874e 100755 (executable)
@@ -6789,6 +6789,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6882,6 +6895,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7086,6 +7104,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8922,15 +8945,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8963,7 +8984,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12900,7 +12921,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12903 "configure"
+#line 12924 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13006,7 +13027,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13009 "configure"
+#line 13030 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 7f9e87aa917bd850e5a4f59d7ed2e64a6473a431..25a2c33fede0d624d2a3ab47571536cbd6d42b2e 100644 (file)
@@ -1,3 +1,14 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac (AC_CHECK_HEADERS): Delete stdlib.h, string.h, and
+       strings.h.
+       * configure, configure.ac: Regenerate.
+
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * filter.c, if.c, misc.c, misc.h, table.c: Delete HAVE_STRING_H,
+       HAVE_STRINGS_H, HAVE_STDLIB_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index a6df60c839009ca2d248da30f5f111e09f382ce9..877a23de97d1a4ce54b0b19c31fc8742fa1963df 100755 (executable)
@@ -5028,6 +5028,7 @@ program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 ac_config_headers="$ac_config_headers config.h:config.in"
 
 
+# NB: You can assume C11 headers exist.
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5425,7 +5426,7 @@ fi
 done
 
 
-for ac_header in stdlib.h string.h strings.h sys/stat.h sys/types.h unistd.h
+for ac_header in sys/stat.h sys/types.h unistd.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
index f03d8b785d3e69ebef4acb23c746b1158902e7a6..12536c26be4eb8923acdbaf79384861c7929ca84 100644 (file)
@@ -32,7 +32,8 @@ AC_ARG_PROGRAM
 
 AC_CONFIG_HEADER(config.h:config.in)
 
-AC_CHECK_HEADERS(stdlib.h string.h strings.h sys/stat.h sys/types.h unistd.h)
+# NB: You can assume C11 headers exist.
+AC_CHECK_HEADERS(sys/stat.h sys/types.h unistd.h)
 AC_HEADER_DIRENT
 
 AC_SUBST(AR_FOR_BUILD)
index 8059e004e3bb7d87c96ef72277752235e5fe98a8..e37d680b09c8631ed53077b85f5237045dead75f 100644 (file)
 
 #include "config.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "misc.h"
 #include "lf.h"
index e8bf75c88249fec3a10fe6be1eaf501f740e1f98..4a7978e7a713778251eec1fb62f0cfa7cbbd036a 100644 (file)
 #include "misc.h"
 #include "lf.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 struct _lf
 {
index 1678bfcc672a62681e7ff1b7e786acc610895f21..d74f74e12e5d650a56f643d67f61ad21e611959c 100644 (file)
 #include "config.h"
 #include "misc.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /* NB: Because warning and error can be interchanged, neither append a
    trailing '\n' */
index 7634816dcd29bea24f19d466d319c6113e6d1c49..40e9cd05d1c320690e93526ed623f88b9d230e4d 100644 (file)
@@ -54,18 +54,8 @@ typedef unsigned __int64 unsigned64;
 
 #include <stdio.h>
 #include <ctype.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
 #define __attribute__(arg)
index 5b0d07e842de837611366179c31e7332d3ccd347..d21b282dc45b790a8c5d2dacea8060833fc5a92d 100644 (file)
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 typedef struct _open_table open_table;
 struct _open_table
index 79a1dd2d95f0464da9d31ac0ed6fdd580cd7c84e..7346cbd06ad40cb0e8654ee7dd202eb6d5241379 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * sim-if.c: Delete HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index ea6c08c477dedf78d9e06d942a930a7ab85acfc5..c60f7d8649d677435f603a9a880580b8c0f5bb1b 100644 (file)
@@ -16,9 +16,6 @@
 /* Define if dv-sockser is usable. */
 #undef HAVE_DV_SOCKSER
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index a0cd1a1d2fd3c878102a8648d58c2a5cf0a12532..d16aeee01552ce9e91e2ee03a20d0f31524cb6e0 100755 (executable)
@@ -6803,6 +6803,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6896,6 +6909,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7100,6 +7118,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8936,15 +8959,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8977,7 +8998,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12914,7 +12935,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12917 "configure"
+#line 12938 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13020,7 +13041,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13023 "configure"
+#line 13044 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 238ec97e47db85f4610c06f32ed18f46b974b2b0..07169402c99d44d4132173d254eac6498b6fd2fe 100644 (file)
@@ -18,9 +18,9 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "sim-main.h"
-#ifdef HAVE_STDLIB_H
+
 #include <stdlib.h>
-#endif
+
 #include "sim-options.h"
 #include "libiberty.h"
 #include "bfd.h"
index f4c1a3b9cebe508e3bed40c03f35200203fc6ea5..4796212f0919b68bb05a5d42233e7b41f80672b2 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * sim-if.c: Delete HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index ea6c08c477dedf78d9e06d942a930a7ab85acfc5..c60f7d8649d677435f603a9a880580b8c0f5bb1b 100644 (file)
@@ -16,9 +16,6 @@
 /* Define if dv-sockser is usable. */
 #undef HAVE_DV_SOCKSER
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 6c0fc08e300816a8c0f14fa1fc88d28e3a42b087..fa59d925f6d189cb0971446144113b9600866d9f 100755 (executable)
@@ -6803,6 +6803,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6896,6 +6909,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7100,6 +7118,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8936,15 +8959,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8977,7 +8998,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12914,7 +12935,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12917 "configure"
+#line 12938 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13020,7 +13041,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13023 "configure"
+#line 13044 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index cbe975113b3d1b80540ff7c2966b378d071e2033..176456ed62d4f3d40d29ced71e91484b50e423dc 100644 (file)
@@ -23,9 +23,7 @@
 #include "libiberty.h"
 #include "bfd.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 \f
 /* Cover function of sim_state_free to free the cpu buffers as well.  */
 
index 8a5c8d15046b66eb8d773bb317e289bf3a18cd88..1d609ca9d8486abe42ead0aa06beddd4fb4c32b6 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index b5791d73a727d5d9118ffcbde2aaae1b1521ba8b..cae766077868e9a8b05d734a410cadc561bd377d 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index c2b72d70857bd4dc99500231617eb452bc52647f..407dd1f624a913b069b2583071e5a17cc90e0ce9 100755 (executable)
@@ -6790,6 +6790,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6883,6 +6896,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7087,6 +7105,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8923,15 +8946,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8964,7 +8985,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12901,7 +12922,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12904 "configure"
+#line 12925 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13007,7 +13028,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13010 "configure"
+#line 13031 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index ed284eada5541e10afca16be35edaeea407cd862..dd4bba95a11d2ffd3d1638981937149a5adda7b6 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H,
+       and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index ea6c08c477dedf78d9e06d942a930a7ab85acfc5..c60f7d8649d677435f603a9a880580b8c0f5bb1b 100644 (file)
@@ -16,9 +16,6 @@
 /* Define if dv-sockser is usable. */
 #undef HAVE_DV_SOCKSER
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index ceb542c07f1435c68d45a562cbf763e151cbc9c2..5b73aa511fbfd65b20735c7af1d7790a2520739e 100755 (executable)
@@ -6805,6 +6805,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6898,6 +6911,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7102,6 +7120,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8938,15 +8961,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8979,7 +9000,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12916,7 +12937,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12919 "configure"
+#line 12940 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13022,7 +13043,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13025 "configure"
+#line 13046 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index c25d9a859c2c6a14f966f0173e567e226fc278bc..08003b50fd6f46f98d2f964a0a97837249eb2745 100644 (file)
 #include "libiberty.h"
 #include "bfd.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #include "dv-m32r_uart.h"
 
index 7545c768cf8f10925f507859f437b42cb8312efd..d8d031d83e9d68341c070f4ed0877836934be516 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index ea6c08c477dedf78d9e06d942a930a7ab85acfc5..c60f7d8649d677435f603a9a880580b8c0f5bb1b 100644 (file)
@@ -16,9 +16,6 @@
 /* Define if dv-sockser is usable. */
 #undef HAVE_DV_SOCKSER
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 546e57107d13c4e56892ebda94097f46ca98d5b3..909a4e3833ddd865a6824a682f075cadd0697888 100755 (executable)
@@ -6800,6 +6800,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6893,6 +6906,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7097,6 +7115,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8933,15 +8956,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8974,7 +8995,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12911,7 +12932,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12914 "configure"
+#line 12935 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13017,7 +13038,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13020 "configure"
+#line 13041 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index de32036a37b4e9ca6ef3adfd9f655fe094c34393..041bd516b99ca73161be2c84d8474fdbb1d86d26 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index d522be20cc2976ddc08e1ac7d4b6347167caa8eb..e7811297111b766e39e8373e6e5950f22b81f046 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 523971ca99c20b223de2bc99459c48b5f82829aa..db8307d18cd58c0b7aac47b6887a5a1b01debf44 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 43607d8156dce4464063c6dc4ca1107882c6b407..51dcea114d7fd550befb0b1d1f699fb99f6ecb56 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 6197dd6f3728b92f27c9f4d65b50e1c753aea4ba..94827d5df31ea2a7cfe076568694a4ce986de4cf 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * interp.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H,
+       and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index a1463017b9b73fa1af1213ebf798b22bb538eb3f..09537fe1ca72b4f3c2ec41ed37d08b74dc13bbfd 100644 (file)
@@ -22,9 +22,6 @@
 /* Define if dv-sockser is usable. */
 #undef HAVE_DV_SOCKSER
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 5692eeadd79838ed7da938c8093b6ee8de73669d..455800153618d2147f301e0640876cad2a5d8db0 100755 (executable)
@@ -6830,6 +6830,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6923,6 +6936,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7127,6 +7145,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8963,15 +8986,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -9004,7 +9025,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12941,7 +12962,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12944 "configure"
+#line 12965 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13047,7 +13068,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13050 "configure"
+#line 13071 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 9dbac8c58fc76f8a3e54c9819037c25bc0a495b6..49e5f716757408424b1840c0dbf18491b13e4051 100644 (file)
@@ -41,16 +41,8 @@ code on the hardware.
 #include <ctype.h>
 #include <limits.h>
 #include <math.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "getopt.h"
 #include "libiberty.h"
index 2f93d99837ffd8407d77f8d44e283e0c9fa35c08..3932e81d8c690010c4a394da72d271f7cc100d67 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * interp.c, op_utils.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+       HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 716d2bc869c417f215186f601e63e288b1976813..c9fb022ca3e5c595d83036cb70921ab287035df7 100644 (file)
@@ -22,9 +22,6 @@
 /* Define if dv-sockser is usable. */
 #undef HAVE_DV_SOCKSER
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the `execv' function. */
 #undef HAVE_EXECV
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index b8c4ab0d8bd6ef9d0830372b92ebb9f544967f38..6604a3a629731ff29ff6175e1890d7eea2f8c1b0 100755 (executable)
@@ -6806,6 +6806,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6899,6 +6912,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7103,6 +7121,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8939,15 +8962,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8980,7 +9001,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12917,7 +12938,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12920 "configure"
+#line 12941 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13023,7 +13044,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13026 "configure"
+#line 13047 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 7f0655f3f472ef1a660a29f25c2fd01c2db163f8..418f3f00a394838183758b3e353070bca224dfac 100644 (file)
@@ -8,18 +8,8 @@
 #include "bfd.h"
 #include "sim-assert.h"
 
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "bfd.h"
 
index 67bf9a34f68457d273785a308a0f1fd2ee5fa8d1..a696cdbfab979229a920d6d219c19fbec0c7f74d 100644 (file)
@@ -5,22 +5,11 @@
 #ifdef HAVE_UTIME_H
 #include <utime.h>
 #endif
-
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 #include <sys/stat.h>
 #include <sys/times.h>
 #include <sys/time.h>
index 00ad7a730181147c2fa88a89cf528500f67d712c..c01b323fe16f8d43191d36f5556c3e06007c9371 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 7cf3c120541de0d78dafb6441c032f455c1ac0c1..d500eef4ed9c1e45cf79866819995f478493f33c 100755 (executable)
@@ -6798,6 +6798,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6891,6 +6904,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7095,6 +7113,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8931,15 +8954,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8972,7 +8993,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12909,7 +12930,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12912 "configure"
+#line 12933 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13015,7 +13036,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13018 "configure"
+#line 13039 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 1f1a0c457b29da19f72c7b077821f201ed6b8e23..974e59ea34488f011e782e6c59b63e2d603b71a3 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 2be193d67171a67f13807c000446d70d3fdf8e53..e4894c4c510548924a443528ff251ce7a7c6ddc5 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 683c79fb31c592c4b9a465cba920ef00f4d5eb29..654492c80b2e87ba076416f2c16a6cb4f689ba77 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 83f9817a46726f32a45a3db111483d8576df91c0..89cf42a64259bd1602bca6f31ed464d4df34e7f0 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H,
+       and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 8fc5d623040a2a93aa60e1486aa6ba2861a5502e..538011c2ad1a8ac93aca3968b54558b7fbe5fdf8 100755 (executable)
@@ -6802,6 +6802,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6895,6 +6908,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7099,6 +7117,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8935,15 +8958,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8976,7 +8997,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12913,7 +12934,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12916 "configure"
+#line 12937 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13019,7 +13040,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13022 "configure"
+#line 13043 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 18f70387063fd5bf74307b941bba1341957ae680..b5258a828a5fc32d721c614f5f25d33babb931f9 100644 (file)
 #include "libiberty.h"
 #include "bfd.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 static void free_state (SIM_DESC);
 \f
index 625afeccd57b00d127871ecec01b7451b3dbbc12..6906cc26a6c4fe6af7a07e7a2bd63e1149c414da 100644 (file)
@@ -1,3 +1,21 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * configure.ac: Delete checks for stdlib.h, string.h,
+       strings.h, and time.h.
+       * config.in, configure: Regenerate.
+       * cpu.c, debug.c, device.c, device_table.c, device_table.h,
+       dgen.c, emul_bugapi.c, emul_chirp.c, emul_netbsd.c, emul_unix.c,
+       filter.c, hw_com.c, hw_eeprom.c, hw_nvram.c, hw_opic.c, hw_pal.c,
+       hw_phb.c, hw_sem.c, hw_shm.c, lf.c, main.c, misc.c, misc.h,
+       mon.c, pk_disklabel.c, psim.c, registers.c, sim_calls.c, table.c,
+       tree.c: Delete HAVE_ERRNO_H, HAVE_STDLIB_H, HAVE_STRING_H,
+       HAVE_STRINGS_H, HAVE_LIMITS_H, HAVE_TIME_H, and strings.h include.
+       * hw_nvram.c: Likewise.
+       (_hw_nvram_device): Always define host_time as time_t.
+       (hw_nvram_update_clock): Delete error fallback.
+       * gen-model.c (gen_model_c): Delete HAVE_STDLIB_H output.
+
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index e157e9fd1b207ea7b6232b4b92ea7b7a8cd3ff4c..1a256d939009077a72d122f5200d85d27c301dd0 100644 (file)
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
    `HAVE_STRUCT_TM_TM_ZONE' instead. */
 #undef HAVE_TM_ZONE
index 9934d2a378acaefbeb19515b9c33a7ef5d7c0969..108c92a44bf83e802948e0b51229b77b38dcea8b 100755 (executable)
@@ -7279,7 +7279,7 @@ fi
 done
 
 
-for ac_header in fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h
+for ac_header in fcntl.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h unistd.h sys/vfs.h sys/statfs.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
index ee52bba81ecc263c237bd52aea470a5645057a1b..9bc10570f038cea538e2cdc0df08a927cb6a3955 100644 (file)
@@ -655,7 +655,7 @@ AC_TYPE_UID_T
 
 AC_CHECK_FUNCS(access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink)
 
-AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h)
+AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h unistd.h sys/vfs.h sys/statfs.h)
 AC_HEADER_DIRENT
 
 dnl Figure out what type of termio/termios support there is
index c7e8bdf0c0031055d0dffd5be0f79e0a6ebef63e..3169553a58707db32fa8448f0e575c943c39712f 100644 (file)
 #include "cpu.h"
 #include "idecode.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 struct _cpu {
 
index 1ec279bac2ae8af7884e467db10630ca2d9f3635..dba14255366b31793e53eef850e6fbd270d550fb 100644 (file)
 #include "config.h"
 #include "basics.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
 #include <string.h>
-#endif
 
 int ppc_trace[nr_trace_options];
 
index d5093bbdadb192c0c8b83871d4e95d530fb646ac..6a0209e5ce693d722dd6bdf56e9c7c835b816dcf 100644 (file)
 #include "events.h"
 #include "psim.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <ctype.h>
 
 STATIC_INLINE_DEVICE (void) clean_device_properties(device *);
index d2c6195e1dae39a907e0cb5b714d0d393786d6be..7d8fabd4dd56db47b7ce6e63ca49b25b95413502 100644 (file)
 
 #include "device_table.h"
 
-#if HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <ctype.h>
 
 
index 654ecade4b01f0395b13fc55d5c33ca31b02dce1..b61f4bd06d731b90d614e5290a939ded60ad823c 100644 (file)
 #include "device.h"
 #include "tree.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 
 typedef struct _device_callbacks device_callbacks;
index 8e8f5fb61bcfbd984be2e4f16b58b76b7c1c7a4a..9437944a9a6b8602e8f38b42e597c13d3c5aa2fb 100644 (file)
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /****************************************************************/
 
index 8481b6fb39e6cfcad9496507caf10ded4532aef7..c3c607b43f0457235c0a26c5ea63d546c9f34624 100644 (file)
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 
 /* EMULATION
index f326410b060ddb16922261eaf967402d88504cbd..d4214f51b9711b8eb781964d583b8a6d9a40afbb 100644 (file)
 #include "emul_generic.h"
 #include "emul_chirp.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 0bda20e164b53085703b3d8f4ac9ae67a7e0dc6f..0135a93298b8a38d5175d32d39646ba7053f465a 100644 (file)
 #include "emul_generic.h"
 #include "emul_netbsd.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdio.h>
@@ -82,9 +75,7 @@ int getrusage();
 #include <unistd.h>
 #endif
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #define WITH_NetBSD_HOST (NetBSD >= 199306)
 #if WITH_NetBSD_HOST /* here NetBSD as that is what we're emulating */
index 3a1c24586fa2ad3d699d3989af464f3c71b1588f..92c3c1ededfacdc509993d94a0ec1aee8baed632 100644 (file)
 #include "emul_generic.h"
 #include "emul_unix.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
@@ -130,9 +123,7 @@ int getrusage();
 #include <unistd.h>
 #endif
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #if defined(BSD) && !defined(errno) && (BSD < 199306)  /* here BSD as just a bug */
 extern int errno;
index 7aa6a556014f8949aeb485c97e32158d4e202f62..a2024275290a9a90fd143e4b3c02b7b38ec3aab2 100644 (file)
 
 #include "build-config.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "misc.h"
 #include "filter.h"
index 00f2b02118e71669f3aeaebed90b8de84e75418f..a591d316e2ea7ffa260b54454b2ae5fb37252a47 100644 (file)
@@ -244,9 +244,7 @@ gen_model_c(insn_table *table, lf *file)
   lf_printf(file, "#include \"cpu.h\"\n");
   lf_printf(file, "#include \"mon.h\"\n");
   lf_printf(file, "\n");
-  lf_printf(file, "#ifdef HAVE_STDLIB_H\n");
   lf_printf(file, "#include <stdlib.h>\n");
-  lf_printf(file, "#endif\n");
   lf_printf(file, "\n");
 
   for(insn_ptr = model_data; insn_ptr; insn_ptr = insn_ptr->next) {
index 38d6d85cefc3da39c684f6637def27fb2a2bd200..4ffd73203f49fa2fb9ab73d1d29119dd7f92b86e 100644 (file)
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 /* DEVICE
    
index 3406be93c62d0f47a391113b7f163eaa52465f6c..b0a3ac635b16b68122ad961740978a6d2e01c327 100644 (file)
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 
 /* DEVICE
index f8caaa8edd293909af1da57345e47a33d598b5bb..0580dcc2a43da54d605349e9bf93cfb6d0dd8f1c 100644 (file)
 
 #include "device_table.h"
 
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 /* DEVICE
 
 typedef struct _hw_nvram_device {
   unsigned8 *memory;
   unsigned sizeof_memory;
-#ifdef HAVE_TIME_H
   time_t host_time;
-#else
-  long host_time;
-#endif
   unsigned timezone;
   /* useful */
   unsigned addr_year;
@@ -177,7 +164,6 @@ static void
 hw_nvram_update_clock(hw_nvram_device *nvram,
                      cpu *processor)
 {
-#ifdef HAVE_TIME_H
   if (!(nvram->memory[nvram->addr_control] & 0xc0)) {
     time_t host_time = time(NULL);
     if (nvram->host_time != host_time) {
@@ -193,9 +179,6 @@ hw_nvram_update_clock(hw_nvram_device *nvram,
       nvram->memory[nvram->addr_seconds] = hw_nvram_bcd(clock->tm_sec);
     }
   }
-#else
-  error("fixme - where do I find out GMT\n");
-#endif
 }
 
 static void
index 69d956b1a5f876f1d2028b6a94d2a6d3d18ba829..8afe312a7efe97492c6a09eaf6e9a031a27b7fab 100644 (file)
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 
 /* DEVICE
index 0789929cde067130165ea41d40d8ed6748663acd..8b07709936997a0684fd7fbf49fac65c16e79f5b 100644 (file)
 
 #include "cpu.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 
 /* DEVICE
index 8e3fb179501ddf6c3e8aae422367068deda87814..08defc2868ca81275c3bb3cffb169d4ee0e793bb 100644 (file)
 
 #include "corefile.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <ctype.h>
 
 
index f1c329544435e6d10fd5e579b9da519cc411705a..5f3595204d2cc472ef8f1aeb7d6246d248163739 100644 (file)
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <sys/ipc.h>
 #include <sys/sem.h>
 
index 31288714833404178adcffa1886681654ad4c0f5..f2fa144244acd874a02c21312c6a7d50e80ddbbe 100644 (file)
 
 #include "device_table.h"
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <sys/ipc.h>
 #include <sys/shm.h>
 
index 1794a27f35099c1fe7b41fbb3e680ed70df756ab..a3815a8788ede26f1fa692cb17383fe470da8362 100644 (file)
 #include "misc.h"
 #include "lf.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 struct _lf {
   FILE *stream;
index 667c02f2d43ab36b225f62a33e064d3a0141f922..1e73444ff83266a826ffbff119107cf97c9b02d2 100644 (file)
 #include "gdb/callback.h"
 #include "gdb/remote-sim.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <errno.h>
 
 #if !defined(O_NDELAY) || !defined(F_GETFL) || !defined(F_SETFL)
index 8c21bd38b1b8d374fe6142bdfde6133b16d252d5..6de3cf9a95b9c7582e24897baa8eea96438be424 100644 (file)
 #include "build-config.h"
 #include "misc.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 void
 error (char *msg, ...)
index 232f2eaacd0144460ac1b6e2fc591eb57dcc5890..c080ae29f0b4f5e55b4a6c74e51c2032f579487c 100644 (file)
 
 #include <stdio.h>
 #include <ctype.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 #if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7))
 #define __attribute__(arg)
index 8235b66df1df358adbbe859531db7ea0428f3615..452cd19c3d96b00e5b2e13d90ac5ac35a9354391 100644 (file)
 #include "mon.h"
 #include <stdio.h>
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
-
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
 #ifdef HAVE_SYS_TIMES_H
 #include <sys/times.h>
 #endif
index fb820fd32dd9ca279ec9de7b3be3fe6b4f7e0ba6..d424c0480aeb19e876b435bc58583b40d96fc7b6 100644 (file)
 
 #include "pk.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-
 
 /* PACKAGE
 
index 3e322e3820f83830d5076cf46fe7e69ee48804b8..ebb9cb42737741d656c58a194dd46575b80d04be 100644 (file)
 
 #include <stdio.h>
 #include <ctype.h>
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #include <setjmp.h>
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 
 #include "bfd.h"
 #include "libiberty.h"
index b672f9907e2865d35ad7bb916013761016ca4b7f..2bab55a65fca9673f01e7facd6dfcbd960b8b068 100644 (file)
 #include "basics.h"
 #include "registers.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 
 INLINE_REGISTERS\
 (void)
index 0a209bf6e0d0687833dd16c16a6a5ee654ffc504..c8364f090046d15aae6e686f6f30d02f9bae0c0b 100644 (file)
 
 #undef printf_filtered /* blow away the mapping */
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "libiberty.h"
 #include "bfd.h"
index 43c74622377c0c4731f7f95bfd92c1cf3446e615..3c7e4464beb582325c8674c71bc7af87068da70e 100644 (file)
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 
 typedef struct _open_table open_table;
 struct _open_table {
index 5d20bf4103cdb9226ed51a836199fcedb5093926..a0e0820b4d9514db203fc8f21c4a59e2ec1d2038 100644 (file)
 #include "device.h"
 #include "tree.h"
 
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <ctype.h>
 
 #include "libiberty.h"
index 620b50ff313627e2a8be91d9fe31351831f41bf2..ce8ca2a0daddeba171527f0837dca514fd11fa16 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure.ac (AC_PREREQ): Delete.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 1bcb7b47b31dbef37b297df2aeae397f835b378c..3eb9c8745725fd36097c5ad03939fa7efd1c48eb 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 936e7b71f4043a2836995f64c06320ff592dc59c..8944ad42255fa47f4d41de4e81c4856cc99a7403 100644 (file)
@@ -1,3 +1,7 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 2be193d67171a67f13807c000446d70d3fdf8e53..e4894c4c510548924a443528ff251ce7a7c6ddc5 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index e9fe1139fa3f1116967216c853a0574f15ba86b8..24de7d61ba4b5d0dc7a7c61c40131f058405ab3e 100755 (executable)
@@ -6782,6 +6782,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6875,6 +6888,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7079,6 +7097,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8915,15 +8938,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8956,7 +8977,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12893,7 +12914,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12896 "configure"
+#line 12917 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12999,7 +13020,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13002 "configure"
+#line 13023 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index e5896c293fbd99ac24ac72ecb6ce8452b375268d..79b4e99289746764ad9c221b5bfb50da3dba051b 100644 (file)
@@ -1,3 +1,8 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * main.c: Delete HAVE_STDLIB_H.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index c66cab2b75d84c9650515d707cdf15374f60cf3c..97caf8d05327f351cfe6a201c265421c32cbbff4 100644 (file)
@@ -19,9 +19,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index 964f9f2bdc877df8ec2ce5da035ccc9529b8debe..447a25200488b1eff05e9f2f4b4222ad2aaea784 100755 (executable)
@@ -6787,6 +6787,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6880,6 +6893,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7084,6 +7102,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8920,15 +8943,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8961,7 +8982,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12898,7 +12919,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12901 "configure"
+#line 12922 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13004,7 +13025,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13007 "configure"
+#line 13028 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index 1eac6037f032e3e1dd1cc8544139686fc0a20df5..4a9d3ecebea5ba9a13d2300d3e61c66c8d8b0aa7 100644 (file)
@@ -22,9 +22,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "config.h"
 #include <stdio.h>
 #include <string.h>
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 214c45ec870d882d51886100be8921942d5c904b..c3a103abe9b66fef97bd336d17ffdb7f6b854eed 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+       HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 7c667a1c0d4147429afd5d30d58f04f590cfee36..cb5ea1b01c95768650c6885bdacf41f90c81f8a9 100644 (file)
@@ -13,9 +13,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index d522be20cc2976ddc08e1ac7d4b6347167caa8eb..e7811297111b766e39e8373e6e5950f22b81f046 100755 (executable)
@@ -6797,6 +6797,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6890,6 +6903,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7094,6 +7112,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8930,15 +8953,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8971,7 +8992,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12908,7 +12929,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12911 "configure"
+#line 12932 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13014,7 +13035,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13017 "configure"
+#line 13038 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index c77cf3b1d3bf10e38be373542a4db57e5c4cb2c0..872bfe28893697e05789608f6709bcab9167dcbd 100644 (file)
 # endif
 #endif
 
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
index 865a2883fbe6c877c5f35e3f7c30fd2e13cda399..4f2ccc7cfc5ba3fc4a79e99cdccbb0bed655bb50 100644 (file)
@@ -1,3 +1,9 @@
+2021-01-11  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.in, configure: Regenerate.
+       * interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H,
+       HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include.
+
 2021-01-09  Mike Frysinger  <vapier@gentoo.org>
 
        * configure: Regenerate.
index 3b86818572d03767c5598a4d7fd70a9a49ecb055..830d22ea322beb91538eb3a32387809239318df3 100644 (file)
@@ -19,9 +19,6 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you have the <errno.h> header file. */
-#undef HAVE_ERRNO_H
-
 /* Define to 1 if you have the `execv' function. */
 #undef HAVE_EXECV
 
 /* Define to 1 if you have the `time' function. */
 #undef HAVE_TIME
 
-/* Define to 1 if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
 /* Define to 1 if you have the `truncate' function. */
 #undef HAVE_TRUNCATE
 
index d2e3879e7faafdb7400fb44e8b65e9fd3233d6c9..a8a5aa399fa74476a42892c3d134aef44a094784 100755 (executable)
@@ -6803,6 +6803,19 @@ test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
 
 
+plugin_option=
+plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
+for plugin in $plugin_names; do
+  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
+  if test x$plugin_so = x$plugin; then
+    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
+  fi
+  if test x$plugin_so != x$plugin; then
+    plugin_option="--plugin $plugin_so"
+    break
+  fi
+done
+
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
 set dummy ${ac_tool_prefix}ar; ac_word=$2
@@ -6896,6 +6909,11 @@ else
 fi
 
 test -z "$AR" && AR=ar
+if test -n "$plugin_option"; then
+  if $AR --help 2>&1 | grep -q "\--plugin"; then
+    AR="$AR $plugin_option"
+  fi
+fi
 test -z "$AR_FLAGS" && AR_FLAGS=cru
 
 
@@ -7100,6 +7118,11 @@ else
 fi
 
 test -z "$RANLIB" && RANLIB=:
+if test -n "$plugin_option" && test "$RANLIB" != ":"; then
+  if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
+    RANLIB="$RANLIB $plugin_option"
+  fi
+fi
 
 
 
@@ -8936,15 +8959,13 @@ $as_echo "$LINGUAS" >&6; }
 fi
 
 # Check for common headers.
-# FIXME: Seems to me this can cause problems for i386-windows hosts.
-# At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-for ac_header in stdlib.h string.h strings.h unistd.h time.h
+# NB: You can assume C11 headers exist.
+for ac_header in unistd.h
 do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
+if test "x$ac_cv_header_unistd_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define HAVE_UNISTD_H 1
 _ACEOF
 
 fi
@@ -8977,7 +8998,7 @@ fi
 
 done
 
-for ac_header in dlfcn.h errno.h sys/stat.h
+for ac_header in dlfcn.h sys/stat.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -12914,7 +12935,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12917 "configure"
+#line 12938 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13020,7 +13041,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 13023 "configure"
+#line 13044 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
index daf96180176868bc5799ecc34a716659b15b2068..10d8a67a6fb937e8689032975b7cb8ddffc4f745 100644 (file)
@@ -4,17 +4,8 @@
 #include "sim-assert.h"
 #include "itable.h"
 
-#ifdef HAVE_STDLIB_H
 #include <stdlib.h>
-#endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "bfd.h"
 
index 40d578e5d0ac87e17c5716c05cae787167668af9..93185b6de663ff3169e7c2969025be958a54e290 100644 (file)
@@ -7,22 +7,11 @@
 #ifdef HAVE_UTIME_H
 #include <utime.h>
 #endif
-
-#ifdef HAVE_TIME_H
 #include <time.h>
-#endif
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-#ifdef HAVE_STRING_H
 #include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
 
 #include "targ-vals.h"