summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-01-09 03:56:10 -0500
committerMike Frysinger <vapier@gentoo.org>2021-01-11 08:05:54 -0500
commit68ed2854284d415a71efd856a40343f550881ede (patch)
treef00f87cc7628c8e82de418bacc5d941db46c2481
parenta8aa72b913e78407e5de4fefd22f9b98e4466f30 (diff)
sim: clean up C11 header includes
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.
-rw-r--r--sim/aarch64/ChangeLog4
-rw-r--r--sim/aarch64/config.in6
-rwxr-xr-xsim/aarch64/configure41
-rw-r--r--sim/arm/ChangeLog4
-rw-r--r--sim/arm/config.in6
-rwxr-xr-xsim/arm/configure41
-rw-r--r--sim/avr/ChangeLog5
-rw-r--r--sim/avr/config.in6
-rwxr-xr-xsim/avr/configure41
-rw-r--r--sim/avr/interp.c3
-rw-r--r--sim/bfin/ChangeLog4
-rw-r--r--sim/bfin/config.in6
-rwxr-xr-xsim/bfin/configure41
-rw-r--r--sim/bpf/ChangeLog4
-rw-r--r--sim/bpf/config.in6
-rwxr-xr-xsim/bpf/configure41
-rw-r--r--sim/common/ChangeLog13
-rw-r--r--sim/common/acinclude.m47
-rw-r--r--sim/common/callback.c10
-rw-r--r--sim/common/cgen-scache.c2
-rw-r--r--sim/common/dv-glue.c6
-rw-r--r--sim/common/dv-pal.c9
-rw-r--r--sim/common/dv-sockser.c8
-rw-r--r--sim/common/hw-alloc.c3
-rw-r--r--sim/common/hw-base.c11
-rw-r--r--sim/common/hw-device.c5
-rw-r--r--sim/common/hw-events.c2
-rw-r--r--sim/common/hw-handles.c2
-rw-r--r--sim/common/hw-ports.c10
-rw-r--r--sim/common/hw-properties.c6
-rw-r--r--sim/common/hw-tree.c10
-rw-r--r--sim/common/nrun.c7
-rw-r--r--sim/common/sim-arange.c5
-rw-r--r--sim/common/sim-events.c10
-rw-r--r--sim/common/sim-fpu.c2
-rw-r--r--sim/common/sim-hw.c9
-rw-r--r--sim/common/sim-load.c2
-rw-r--r--sim/common/sim-memopt.c10
-rw-r--r--sim/common/sim-options.c8
-rw-r--r--sim/common/sim-profile.c9
-rw-r--r--sim/common/sim-trace.c8
-rw-r--r--sim/common/sim-utils.c13
-rw-r--r--sim/common/sim-watch.c10
-rw-r--r--sim/common/syscall.c6
-rw-r--r--sim/cr16/ChangeLog5
-rw-r--r--sim/cr16/config.in6
-rwxr-xr-xsim/cr16/configure41
-rw-r--r--sim/cr16/simops.c4
-rw-r--r--sim/cris/ChangeLog7
-rw-r--r--sim/cris/config.in9
-rwxr-xr-xsim/cris/configure43
-rw-r--r--sim/cris/configure.ac2
-rw-r--r--sim/cris/dv-rv.c14
-rw-r--r--sim/cris/rvdummy.c7
-rw-r--r--sim/cris/sim-if.c2
-rw-r--r--sim/cris/traps.c2
-rw-r--r--sim/d10v/ChangeLog6
-rw-r--r--sim/d10v/config.in6
-rwxr-xr-xsim/d10v/configure41
-rw-r--r--sim/d10v/interp.c9
-rw-r--r--sim/d10v/simops.c2
-rw-r--r--sim/erc32/ChangeLog5
-rw-r--r--sim/erc32/config.in6
-rwxr-xr-xsim/erc32/configure41
-rw-r--r--sim/erc32/sis.c2
-rw-r--r--sim/frv/ChangeLog6
-rw-r--r--sim/frv/config.in6
-rwxr-xr-xsim/frv/configure41
-rw-r--r--sim/frv/options.c8
-rw-r--r--sim/frv/sim-if.c2
-rw-r--r--sim/ft32/ChangeLog4
-rw-r--r--sim/ft32/config.in6
-rwxr-xr-xsim/ft32/configure41
-rw-r--r--sim/h8300/ChangeLog5
-rw-r--r--sim/h8300/compile.c4
-rw-r--r--sim/h8300/config.in6
-rwxr-xr-xsim/h8300/configure41
-rw-r--r--sim/igen/ChangeLog11
-rwxr-xr-xsim/igen/configure3
-rw-r--r--sim/igen/configure.ac3
-rw-r--r--sim/igen/filter.c6
-rw-r--r--sim/igen/lf.c9
-rw-r--r--sim/igen/misc.c9
-rw-r--r--sim/igen/misc.h10
-rw-r--r--sim/igen/table.c3
-rw-r--r--sim/iq2000/ChangeLog5
-rw-r--r--sim/iq2000/config.in6
-rwxr-xr-xsim/iq2000/configure41
-rw-r--r--sim/iq2000/sim-if.c4
-rw-r--r--sim/lm32/ChangeLog5
-rw-r--r--sim/lm32/config.in6
-rwxr-xr-xsim/lm32/configure41
-rw-r--r--sim/lm32/sim-if.c2
-rw-r--r--sim/m32c/ChangeLog4
-rw-r--r--sim/m32c/config.in6
-rwxr-xr-xsim/m32c/configure41
-rw-r--r--sim/m32r/ChangeLog6
-rw-r--r--sim/m32r/config.in6
-rwxr-xr-xsim/m32r/configure41
-rw-r--r--sim/m32r/sim-if.c8
-rw-r--r--sim/m68hc11/ChangeLog4
-rw-r--r--sim/m68hc11/config.in6
-rwxr-xr-xsim/m68hc11/configure41
-rw-r--r--sim/mcore/ChangeLog4
-rw-r--r--sim/mcore/config.in6
-rwxr-xr-xsim/mcore/configure41
-rw-r--r--sim/microblaze/ChangeLog4
-rw-r--r--sim/microblaze/config.in6
-rwxr-xr-xsim/microblaze/configure41
-rw-r--r--sim/mips/ChangeLog6
-rw-r--r--sim/mips/config.in6
-rwxr-xr-xsim/mips/configure41
-rw-r--r--sim/mips/interp.c8
-rw-r--r--sim/mn10300/ChangeLog6
-rw-r--r--sim/mn10300/config.in6
-rwxr-xr-xsim/mn10300/configure41
-rw-r--r--sim/mn10300/interp.c10
-rw-r--r--sim/mn10300/op_utils.c11
-rw-r--r--sim/moxie/ChangeLog4
-rw-r--r--sim/moxie/config.in6
-rwxr-xr-xsim/moxie/configure41
-rw-r--r--sim/msp430/ChangeLog4
-rw-r--r--sim/msp430/config.in6
-rwxr-xr-xsim/msp430/configure41
-rw-r--r--sim/or1k/ChangeLog6
-rw-r--r--sim/or1k/config.in6
-rwxr-xr-xsim/or1k/configure41
-rw-r--r--sim/or1k/sim-if.c8
-rw-r--r--sim/ppc/ChangeLog18
-rw-r--r--sim/ppc/config.in3
-rwxr-xr-xsim/ppc/configure2
-rw-r--r--sim/ppc/configure.ac2
-rw-r--r--sim/ppc/cpu.c6
-rw-r--r--sim/ppc/debug.c4
-rw-r--r--sim/ppc/device.c10
-rw-r--r--sim/ppc/device_table.c3
-rw-r--r--sim/ppc/device_table.h6
-rw-r--r--sim/ppc/dgen.c10
-rw-r--r--sim/ppc/emul_bugapi.c10
-rw-r--r--sim/ppc/emul_chirp.c7
-rw-r--r--sim/ppc/emul_netbsd.c9
-rw-r--r--sim/ppc/emul_unix.c9
-rw-r--r--sim/ppc/filter.c6
-rw-r--r--sim/ppc/gen-model.c2
-rw-r--r--sim/ppc/hw_com.c9
-rw-r--r--sim/ppc/hw_eeprom.c6
-rw-r--r--sim/ppc/hw_nvram.c17
-rw-r--r--sim/ppc/hw_opic.c6
-rw-r--r--sim/ppc/hw_pal.c9
-rw-r--r--sim/ppc/hw_phb.c3
-rw-r--r--sim/ppc/hw_sem.c7
-rw-r--r--sim/ppc/hw_shm.c7
-rw-r--r--sim/ppc/lf.c9
-rw-r--r--sim/ppc/main.c11
-rw-r--r--sim/ppc/misc.c9
-rw-r--r--sim/ppc/misc.h10
-rw-r--r--sim/ppc/mon.c15
-rw-r--r--sim/ppc/pk_disklabel.c4
-rw-r--r--sim/ppc/psim.c12
-rw-r--r--sim/ppc/registers.c10
-rw-r--r--sim/ppc/sim_calls.c9
-rw-r--r--sim/ppc/table.c3
-rw-r--r--sim/ppc/tree.c11
-rw-r--r--sim/pru/ChangeLog4
-rw-r--r--sim/pru/config.in6
-rwxr-xr-xsim/pru/configure41
-rw-r--r--sim/rl78/ChangeLog4
-rw-r--r--sim/rl78/config.in6
-rwxr-xr-xsim/rl78/configure41
-rw-r--r--sim/rx/ChangeLog5
-rw-r--r--sim/rx/config.in6
-rwxr-xr-xsim/rx/configure41
-rw-r--r--sim/rx/main.c2
-rw-r--r--sim/sh/ChangeLog6
-rw-r--r--sim/sh/config.in6
-rwxr-xr-xsim/sh/configure41
-rw-r--r--sim/sh/interp.c12
-rw-r--r--sim/v850/ChangeLog6
-rw-r--r--sim/v850/config.in6
-rwxr-xr-xsim/v850/configure41
-rw-r--r--sim/v850/interp.c9
-rw-r--r--sim/v850/simops.c11
182 files changed, 1097 insertions, 1090 deletions
diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog
index 5708802be0..e4f07482c3 100644
--- a/sim/aarch64/ChangeLog
+++ b/sim/aarch64/ChangeLog
@@ -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.
diff --git a/sim/aarch64/config.in b/sim/aarch64/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/aarch64/config.in
+++ b/sim/aarch64/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/aarch64/configure b/sim/aarch64/configure
index ef481b4d87..b682b1b36e 100755
--- a/sim/aarch64/configure
+++ b/sim/aarch64/configure
@@ -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
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index 67060927b0..7b49939da0 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -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.
diff --git a/sim/arm/config.in b/sim/arm/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/arm/config.in
+++ b/sim/arm/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/arm/configure b/sim/arm/configure
index 43607d8156..51dcea114d 100755
--- a/sim/arm/configure
+++ b/sim/arm/configure
@@ -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
diff --git a/sim/avr/ChangeLog b/sim/avr/ChangeLog
index c368fa4681..0f837b2552 100644
--- a/sim/avr/ChangeLog
+++ b/sim/avr/ChangeLog
@@ -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.
diff --git a/sim/avr/config.in b/sim/avr/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/avr/config.in
+++ b/sim/avr/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/avr/configure b/sim/avr/configure
index 1bcb7b47b3..3eb9c87457 100755
--- a/sim/avr/configure
+++ b/sim/avr/configure
@@ -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
diff --git a/sim/avr/interp.c b/sim/avr/interp.c
index deaf711e10..3aff881618 100644
--- a/sim/avr/interp.c
+++ b/sim/avr/interp.c
@@ -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"
diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog
index 1ac810e8a1..36acbdc40a 100644
--- a/sim/bfin/ChangeLog
+++ b/sim/bfin/ChangeLog
@@ -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.
diff --git a/sim/bfin/config.in b/sim/bfin/config.in
index 5be1f16ce9..cc4a677d16 100644
--- a/sim/bfin/config.in
+++ b/sim/bfin/config.in
@@ -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
@@ -175,9 +172,6 @@
/* 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
diff --git a/sim/bfin/configure b/sim/bfin/configure
index 3701395a1f..c0d129d812 100755
--- a/sim/bfin/configure
+++ b/sim/bfin/configure
@@ -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
diff --git a/sim/bpf/ChangeLog b/sim/bpf/ChangeLog
index e1abb698fd..b08642f219 100644
--- a/sim/bpf/ChangeLog
+++ b/sim/bpf/ChangeLog
@@ -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.
diff --git a/sim/bpf/config.in b/sim/bpf/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/bpf/config.in
+++ b/sim/bpf/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/bpf/configure b/sim/bpf/configure
index 74b7e59c58..cad42b2a93 100755
--- a/sim/bpf/configure
+++ b/sim/bpf/configure
@@ -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
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index e525110bf4..6ffee1610d 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -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.
diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4
index b2297dfeb1..45ec134d6d 100644
--- a/sim/common/acinclude.m4
+++ b/sim/common/acinclude.m4
@@ -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],
diff --git a/sim/common/callback.c b/sim/common/callback.c
index 5172d9751d..f9e848fd91 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -26,20 +26,10 @@
#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>
diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c
index 42068a398a..56df075f68 100644
--- a/sim/common/cgen-scache.c
+++ b/sim/common/cgen-scache.c
@@ -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"
diff --git a/sim/common/dv-glue.c b/sim/common/dv-glue.c
index 9319b198ca..8bda326157 100644
--- a/sim/common/dv-glue.c
+++ b/sim/common/dv-glue.c
@@ -22,13 +22,7 @@
#include "hw-main.h"
-#ifdef HAVE_STRING_H
#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
/* DEVICE
diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c
index 66a916c665..dd4ab4fb39 100644
--- a/sim/common/dv-pal.c
+++ b/sim/common/dv-pal.c
@@ -28,20 +28,11 @@
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
diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index 1b01870050..fc552fa0ac 100644
--- a/sim/common/dv-sockser.c
+++ b/sim/common/dv-sockser.c
@@ -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
diff --git a/sim/common/hw-alloc.c b/sim/common/hw-alloc.c
index e504236d1d..141dc21167 100644
--- a/sim/common/hw-alloc.c
+++ b/sim/common/hw-alloc.c
@@ -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
{
diff --git a/sim/common/hw-base.c b/sim/common/hw-base.c
index 87ca7292e5..af8b181248 100644
--- a/sim/common/hw-base.c
+++ b/sim/common/hw-base.c
@@ -23,19 +23,8 @@
#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"
diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c
index 76e41b4d32..bc91264c02 100644
--- a/sim/common/hw-device.c
+++ b/sim/common/hw-device.c
@@ -23,13 +23,8 @@
#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 */
diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c
index 917d7bde4e..1c749dd8c2 100644
--- a/sim/common/hw-events.c
+++ b/sim/common/hw-events.c
@@ -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 */
diff --git a/sim/common/hw-handles.c b/sim/common/hw-handles.c
index 539be3938a..bbd08f632f 100644
--- a/sim/common/hw-handles.c
+++ b/sim/common/hw-handles.c
@@ -23,9 +23,7 @@
#include "hw-main.h"
#include "hw-base.h"
-#if HAVE_STDLIB_H
#include <stdlib.h>
-#endif
struct hw_handle_mapping
{
diff --git a/sim/common/hw-ports.c b/sim/common/hw-ports.c
index 7aefb97391..50e2cbc30e 100644
--- a/sim/common/hw-ports.c
+++ b/sim/common/hw-ports.c
@@ -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>
diff --git a/sim/common/hw-properties.c b/sim/common/hw-properties.c
index fe29ff41ae..11a371cea0 100644
--- a/sim/common/hw-properties.c
+++ b/sim/common/hw-properties.c
@@ -25,13 +25,7 @@
#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 */
diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c
index 91822337d9..4d50ec6ed6 100644
--- a/sim/common/hw-tree.c
+++ b/sim/common/hw-tree.c
@@ -27,18 +27,8 @@
#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 */
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index 134dec8bc1..0caa82062a 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -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"
diff --git a/sim/common/sim-arange.c b/sim/common/sim-arange.c
index 90203a9784..a40dabbeb7 100644
--- a/sim/common/sim-arange.c
+++ b/sim/common/sim-arange.c
@@ -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. */
diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c
index e17557666d..db05cafe13 100644
--- a/sim/common/sim-events.c
+++ b/sim/common/sim-events.c
@@ -27,18 +27,8 @@
#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 {
diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c
index 30147a81da..bff5b08b5e 100644
--- a/sim/common/sim-fpu.c
+++ b/sim/common/sim-fpu.c
@@ -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. */
diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c
index 979a4679af..81b4f64f7c 100644
--- a/sim/common/sim-hw.c
+++ b/sim/common/sim-hw.c
@@ -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>
diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c
index d998be8443..e0aab1e9eb 100644
--- a/sim/common/sim-load.c
+++ b/sim/common/sim-load.c
@@ -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"
diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c
index 77a48df5d5..a102d74ecd 100644
--- a/sim/common/sim-memopt.c
+++ b/sim/common/sim-memopt.c
@@ -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
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index e0de39adab..d4434cfd73 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -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"
diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c
index a886013eda..f4ce89f042 100644
--- a/sim/common/sim-profile.c
+++ b/sim/common/sim-profile.c
@@ -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
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index 29b793ce79..5f161da630 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -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
diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c
index 122e7f2f61..69949aa152 100644
--- a/sim/common/sim-utils.c
+++ b/sim/common/sim-utils.c
@@ -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"
diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c
index 9c929a1573..bbd5be434b 100644
--- a/sim/common/sim-watch.c
+++ b/sim/common/sim-watch.c
@@ -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,
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index 8a8c81fbf6..fbe8021c8e 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -30,14 +30,8 @@
#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
diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog
index 14edee23c2..7ec37863f3 100644
--- a/sim/cr16/ChangeLog
+++ b/sim/cr16/ChangeLog
@@ -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.
diff --git a/sim/cr16/config.in b/sim/cr16/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/cr16/config.in
+++ b/sim/cr16/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/cr16/configure b/sim/cr16/configure
index f33e5d5409..8a1f386725 100755
--- a/sim/cr16/configure
+++ b/sim/cr16/configure
@@ -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
diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c
index c7139eb969..f52376237e 100644
--- a/sim/cr16/simops.c
+++ b/sim/cr16/simops.c
@@ -27,12 +27,8 @@
#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
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
index 2af85ec58d..df6db41850 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -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.
diff --git a/sim/cris/config.in b/sim/cris/config.in
index 789d4127be..aa4d64950e 100644
--- a/sim/cris/config.in
+++ b/sim/cris/config.in
@@ -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
@@ -148,9 +142,6 @@
/* 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
diff --git a/sim/cris/configure b/sim/cris/configure
index 267e9d373c..b40c756d6d 100755
--- a/sim/cris/configure
+++ b/sim/cris/configure
@@ -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"
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index 12e0023e86..a2b08a98d4 100644
--- a/sim/cris/configure.ac
+++ b/sim/cris/configure.ac
@@ -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)
diff --git a/sim/cris/dv-rv.c b/sim/cris/dv-rv.c
index d22bf068ca..612eff4e93 100644
--- a/sim/cris/dv-rv.c
+++ b/sim/cris/dv-rv.c
@@ -25,26 +25,12 @@
#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
diff --git a/sim/cris/rvdummy.c b/sim/cris/rvdummy.c
index cb16410304..f147ea9e59 100644
--- a/sim/cris/rvdummy.c
+++ b/sim/cris/rvdummy.c
@@ -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>
diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c
index b8c7cb2a96..787896cae2 100644
--- a/sim/cris/sim-if.c
+++ b/sim/cris/sim-if.c
@@ -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"
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index 03429e12ed..2aaa1f43b1 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -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
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog
index 13abbb8614..b5b45d2854 100644
--- a/sim/d10v/ChangeLog
+++ b/sim/d10v/ChangeLog
@@ -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.
diff --git a/sim/d10v/config.in b/sim/d10v/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/d10v/config.in
+++ b/sim/d10v/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/d10v/configure b/sim/d10v/configure
index d522be20cc..e781129711 100755
--- a/sim/d10v/configure
+++ b/sim/d10v/configure
@@ -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
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 5c70b38d9d..276c76beab 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -11,17 +11,8 @@
#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 };
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index 92fd82710f..ed0c8a3625 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -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"
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index d296ab311b..d169de8c09 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -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.
diff --git a/sim/erc32/config.in b/sim/erc32/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/erc32/config.in
+++ b/sim/erc32/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/erc32/configure b/sim/erc32/configure
index af8261e481..360cffb665 100755
--- a/sim/erc32/configure
+++ b/sim/erc32/configure
@@ -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
diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index 26f3ed9cd6..858bcbb9d7 100644
--- a/sim/erc32/sis.c
+++ b/sim/erc32/sis.c
@@ -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"
diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog
index c021f1c4ab..9022879251 100644
--- a/sim/frv/ChangeLog
+++ b/sim/frv/ChangeLog
@@ -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.
diff --git a/sim/frv/config.in b/sim/frv/config.in
index ea6c08c477..c60f7d8649 100644
--- a/sim/frv/config.in
+++ b/sim/frv/config.in
@@ -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
@@ -136,9 +133,6 @@
/* 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
diff --git a/sim/frv/configure b/sim/frv/configure
index fb752cf154..d10ca4b2d8 100755
--- a/sim/frv/configure
+++ b/sim/frv/configure
@@ -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
diff --git a/sim/frv/options.c b/sim/frv/options.c
index d90984a1ee..b5cc8dec79 100644
--- a/sim/frv/options.c
+++ b/sim/frv/options.c
@@ -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. */
diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c
index 2eb6e6da5f..636890bd2c 100644
--- a/sim/frv/sim-if.c
+++ b/sim/frv/sim-if.c
@@ -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"
diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog
index ad31e24e01..68aaf94ea1 100644
--- a/sim/ft32/ChangeLog
+++ b/sim/ft32/ChangeLog
@@ -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.
diff --git a/sim/ft32/config.in b/sim/ft32/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/ft32/config.in
+++ b/sim/ft32/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/ft32/configure b/sim/ft32/configure
index 6eeb19ff06..cea6a42b66 100755
--- a/sim/ft32/configure
+++ b/sim/ft32/configure
@@ -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
diff --git a/sim/h8300/ChangeLog b/sim/h8300/ChangeLog
index 4bab9c52b0..f6dd484c79 100644
--- a/sim/h8300/ChangeLog
+++ b/sim/h8300/ChangeLog
@@ -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.
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index 3a3b2e7241..a0e8bbbf89 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -19,12 +19,8 @@
#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
diff --git a/sim/h8300/config.in b/sim/h8300/config.in
index a05c962089..8150226689 100644
--- a/sim/h8300/config.in
+++ b/sim/h8300/config.in
@@ -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
@@ -133,9 +130,6 @@
/* 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
diff --git a/sim/h8300/configure b/sim/h8300/configure
index 2585927f7d..34c63bfdd3 100755
--- a/sim/h8300/configure
+++ b/sim/h8300/configure
@@ -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
diff --git a/sim/igen/ChangeLog b/sim/igen/ChangeLog
index 7f9e87aa91..25a2c33fed 100644
--- a/sim/igen/ChangeLog
+++ b/sim/igen/ChangeLog
@@ -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.
diff --git a/sim/igen/configure b/sim/igen/configure
index a6df60c839..877a23de97 100755
--- a/sim/igen/configure
+++ b/sim/igen/configure
@@ -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"
diff --git a/sim/igen/configure.ac b/sim/igen/configure.ac
index f03d8b785d..12536c26be 100644
--- a/sim/igen/configure.ac
+++ b/sim/igen/configure.ac
@@ -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)
diff --git a/sim/igen/filter.c b/sim/igen/filter.c
index 8059e004e3..e37d680b09 100644
--- a/sim/igen/filter.c
+++ b/sim/igen/filter.c
@@ -24,13 +24,7 @@
#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"
diff --git a/sim/igen/lf.c b/sim/igen/lf.c
index e8bf75c882..4a7978e7a7 100644
--- a/sim/igen/lf.c
+++ b/sim/igen/lf.c
@@ -29,17 +29,8 @@
#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
{
diff --git a/sim/igen/misc.c b/sim/igen/misc.c
index 1678bfcc67..d74f74e12e 100644
--- a/sim/igen/misc.c
+++ b/sim/igen/misc.c
@@ -28,17 +28,8 @@
#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' */
diff --git a/sim/igen/misc.h b/sim/igen/misc.h
index 7634816dcd..40e9cd05d1 100644
--- a/sim/igen/misc.h
+++ b/sim/igen/misc.h
@@ -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)
diff --git a/sim/igen/table.c b/sim/igen/table.c
index 5b0d07e842..d21b282dc4 100644
--- a/sim/igen/table.c
+++ b/sim/igen/table.c
@@ -35,10 +35,7 @@
#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
diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index 79a1dd2d95..7346cbd06a 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -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.
diff --git a/sim/iq2000/config.in b/sim/iq2000/config.in
index ea6c08c477..c60f7d8649 100644
--- a/sim/iq2000/config.in
+++ b/sim/iq2000/config.in
@@ -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
@@ -136,9 +133,6 @@
/* 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
diff --git a/sim/iq2000/configure b/sim/iq2000/configure
index a0cd1a1d2f..d16aeee015 100755
--- a/sim/iq2000/configure
+++ b/sim/iq2000/configure
@@ -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
diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c
index 238ec97e47..07169402c9 100644
--- a/sim/iq2000/sim-if.c
+++ b/sim/iq2000/sim-if.c
@@ -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"
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index f4c1a3b9ce..4796212f09 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -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.
diff --git a/sim/lm32/config.in b/sim/lm32/config.in
index ea6c08c477..c60f7d8649 100644
--- a/sim/lm32/config.in
+++ b/sim/lm32/config.in
@@ -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
@@ -136,9 +133,6 @@
/* 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
diff --git a/sim/lm32/configure b/sim/lm32/configure
index 6c0fc08e30..fa59d925f6 100755
--- a/sim/lm32/configure
+++ b/sim/lm32/configure
@@ -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
diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c
index cbe975113b..176456ed62 100644
--- a/sim/lm32/sim-if.c
+++ b/sim/lm32/sim-if.c
@@ -23,9 +23,7 @@
#include "libiberty.h"
#include "bfd.h"
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
/* Cover function of sim_state_free to free the cpu buffers as well. */
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index 8a5c8d1504..1d609ca9d8 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -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.
diff --git a/sim/m32c/config.in b/sim/m32c/config.in
index b5791d73a7..cae7660778 100644
--- a/sim/m32c/config.in
+++ b/sim/m32c/config.in
@@ -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
@@ -145,9 +142,6 @@
/* 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
diff --git a/sim/m32c/configure b/sim/m32c/configure
index c2b72d7085..407dd1f624 100755
--- a/sim/m32c/configure
+++ b/sim/m32c/configure
@@ -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
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index ed284eada5..dd4bba95a1 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -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.
diff --git a/sim/m32r/config.in b/sim/m32r/config.in
index ea6c08c477..c60f7d8649 100644
--- a/sim/m32r/config.in
+++ b/sim/m32r/config.in
@@ -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
@@ -136,9 +133,6 @@
/* 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
diff --git a/sim/m32r/configure b/sim/m32r/configure
index ceb542c07f..5b73aa511f 100755
--- a/sim/m32r/configure
+++ b/sim/m32r/configure
@@ -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
diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c
index c25d9a859c..08003b50fd 100644
--- a/sim/m32r/sim-if.c
+++ b/sim/m32r/sim-if.c
@@ -22,16 +22,8 @@
#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"
diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog
index 7545c768cf..d8d031d83e 100644
--- a/sim/m68hc11/ChangeLog
+++ b/sim/m68hc11/ChangeLog
@@ -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.
diff --git a/sim/m68hc11/config.in b/sim/m68hc11/config.in
index ea6c08c477..c60f7d8649 100644
--- a/sim/m68hc11/config.in
+++ b/sim/m68hc11/config.in
@@ -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
@@ -136,9 +133,6 @@
/* 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
diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure
index 546e57107d..909a4e3833 100755
--- a/sim/m68hc11/configure
+++ b/sim/m68hc11/configure
@@ -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
diff --git a/sim/mcore/ChangeLog b/sim/mcore/ChangeLog
index de32036a37..041bd516b9 100644
--- a/sim/mcore/ChangeLog
+++ b/sim/mcore/ChangeLog
@@ -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.
diff --git a/sim/mcore/config.in b/sim/mcore/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/mcore/config.in
+++ b/sim/mcore/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/mcore/configure b/sim/mcore/configure
index d522be20cc..e781129711 100755
--- a/sim/mcore/configure
+++ b/sim/mcore/configure
@@ -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
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
index 523971ca99..db8307d18c 100644
--- a/sim/microblaze/ChangeLog
+++ b/sim/microblaze/ChangeLog
@@ -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.
diff --git a/sim/microblaze/config.in b/sim/microblaze/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/microblaze/config.in
+++ b/sim/microblaze/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/microblaze/configure b/sim/microblaze/configure
index 43607d8156..51dcea114d 100755
--- a/sim/microblaze/configure
+++ b/sim/microblaze/configure
@@ -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
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 6197dd6f37..94827d5df3 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -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.
diff --git a/sim/mips/config.in b/sim/mips/config.in
index a1463017b9..09537fe1ca 100644
--- a/sim/mips/config.in
+++ b/sim/mips/config.in
@@ -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
@@ -145,9 +142,6 @@
/* 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
diff --git a/sim/mips/configure b/sim/mips/configure
index 5692eeadd7..4558001536 100755
--- a/sim/mips/configure
+++ b/sim/mips/configure
@@ -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
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 9dbac8c58f..49e5f71675 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -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"
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index 2f93d99837..3932e81d8c 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -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.
diff --git a/sim/mn10300/config.in b/sim/mn10300/config.in
index 716d2bc869..c9fb022ca3 100644
--- a/sim/mn10300/config.in
+++ b/sim/mn10300/config.in
@@ -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
@@ -151,9 +148,6 @@
/* 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
diff --git a/sim/mn10300/configure b/sim/mn10300/configure
index b8c4ab0d8b..6604a3a629 100755
--- a/sim/mn10300/configure
+++ b/sim/mn10300/configure
@@ -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
diff --git a/sim/mn10300/interp.c b/sim/mn10300/interp.c
index 7f0655f3f4..418f3f00a3 100644
--- a/sim/mn10300/interp.c
+++ b/sim/mn10300/interp.c
@@ -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"
diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c
index 67bf9a34f6..a696cdbfab 100644
--- a/sim/mn10300/op_utils.c
+++ b/sim/mn10300/op_utils.c
@@ -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>
diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog
index 00ad7a7301..c01b323fe1 100644
--- a/sim/moxie/ChangeLog
+++ b/sim/moxie/ChangeLog
@@ -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.
diff --git a/sim/moxie/config.in b/sim/moxie/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/moxie/config.in
+++ b/sim/moxie/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/moxie/configure b/sim/moxie/configure
index 7cf3c12054..d500eef4ed 100755
--- a/sim/moxie/configure
+++ b/sim/moxie/configure
@@ -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
diff --git a/sim/msp430/ChangeLog b/sim/msp430/ChangeLog
index 1f1a0c457b..974e59ea34 100644
--- a/sim/msp430/ChangeLog
+++ b/sim/msp430/ChangeLog
@@ -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.
diff --git a/sim/msp430/config.in b/sim/msp430/config.in
index 2be193d671..e4894c4c51 100644
--- a/sim/msp430/config.in
+++ b/sim/msp430/config.in
@@ -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
@@ -133,9 +130,6 @@
/* 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
diff --git a/sim/msp430/configure b/sim/msp430/configure
index 683c79fb31..654492c80b 100755
--- a/sim/msp430/configure
+++ b/sim/msp430/configure
@@ -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
diff --git a/sim/or1k/ChangeLog b/sim/or1k/ChangeLog
index 83f9817a46..89cf42a642 100644
--- a/sim/or1k/ChangeLog
+++ b/sim/or1k/ChangeLog
@@ -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.
diff --git a/sim/or1k/config.in b/sim/or1k/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/or1k/config.in
+++ b/sim/or1k/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/or1k/configure b/sim/or1k/configure
index 8fc5d62304..538011c2ad 100755
--- a/sim/or1k/configure
+++ b/sim/or1k/configure
@@ -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
diff --git a/sim/or1k/sim-if.c b/sim/or1k/sim-if.c
index 18f7038706..b5258a828a 100644
--- a/sim/or1k/sim-if.c
+++ b/sim/or1k/sim-if.c
@@ -21,16 +21,8 @@
#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);
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 625afeccd5..6906cc26a6 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -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.
diff --git a/sim/ppc/config.in b/sim/ppc/config.in
index e157e9fd1b..1a256d9390 100644
--- a/sim/ppc/config.in
+++ b/sim/ppc/config.in
@@ -261,9 +261,6 @@
/* 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
diff --git a/sim/ppc/configure b/sim/ppc/configure
index 9934d2a378..108c92a44b 100755
--- a/sim/ppc/configure
+++ b/sim/ppc/configure
@@ -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"
diff --git a/sim/ppc/configure.ac b/sim/ppc/configure.ac
index ee52bba81e..9bc10570f0 100644
--- a/sim/ppc/configure.ac
+++ b/sim/ppc/configure.ac
@@ -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
diff --git a/sim/ppc/cpu.c b/sim/ppc/cpu.c
index c7e8bdf0c0..3169553a58 100644
--- a/sim/ppc/cpu.c
+++ b/sim/ppc/cpu.c
@@ -26,13 +26,7 @@
#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 {
diff --git a/sim/ppc/debug.c b/sim/ppc/debug.c
index 1ec279bac2..dba1425536 100644
--- a/sim/ppc/debug.c
+++ b/sim/ppc/debug.c
@@ -24,12 +24,8 @@
#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];
diff --git a/sim/ppc/device.c b/sim/ppc/device.c
index d5093bbdad..6a0209e5ce 100644
--- a/sim/ppc/device.c
+++ b/sim/ppc/device.c
@@ -29,18 +29,8 @@
#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 *);
diff --git a/sim/ppc/device_table.c b/sim/ppc/device_table.c
index d2c6195e1d..7d8fabd4dd 100644
--- a/sim/ppc/device_table.c
+++ b/sim/ppc/device_table.c
@@ -23,10 +23,7 @@
#include "device_table.h"
-#if HAVE_STDLIB_H
#include <stdlib.h>
-#endif
-
#include <ctype.h>
diff --git a/sim/ppc/device_table.h b/sim/ppc/device_table.h
index 654ecade4b..b61f4bd06d 100644
--- a/sim/ppc/device_table.h
+++ b/sim/ppc/device_table.h
@@ -25,13 +25,7 @@
#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;
diff --git a/sim/ppc/dgen.c b/sim/ppc/dgen.c
index 8e8f5fb61b..9437944a9a 100644
--- a/sim/ppc/dgen.c
+++ b/sim/ppc/dgen.c
@@ -34,18 +34,8 @@
#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
/****************************************************************/
diff --git a/sim/ppc/emul_bugapi.c b/sim/ppc/emul_bugapi.c
index 8481b6fb39..c3c607b43f 100644
--- a/sim/ppc/emul_bugapi.c
+++ b/sim/ppc/emul_bugapi.c
@@ -30,18 +30,8 @@
#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
diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c
index f326410b06..d4214f51b9 100644
--- a/sim/ppc/emul_chirp.c
+++ b/sim/ppc/emul_chirp.c
@@ -27,14 +27,7 @@
#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
diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c
index 0bda20e164..0135a93298 100644
--- a/sim/ppc/emul_netbsd.c
+++ b/sim/ppc/emul_netbsd.c
@@ -28,14 +28,7 @@
#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 */
diff --git a/sim/ppc/emul_unix.c b/sim/ppc/emul_unix.c
index 3a1c24586f..92c3c1eded 100644
--- a/sim/ppc/emul_unix.c
+++ b/sim/ppc/emul_unix.c
@@ -28,14 +28,7 @@
#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;
diff --git a/sim/ppc/filter.c b/sim/ppc/filter.c
index 7aa6a55601..a202427529 100644
--- a/sim/ppc/filter.c
+++ b/sim/ppc/filter.c
@@ -22,13 +22,7 @@
#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"
diff --git a/sim/ppc/gen-model.c b/sim/ppc/gen-model.c
index 00f2b02118..a591d316e2 100644
--- a/sim/ppc/gen-model.c
+++ b/sim/ppc/gen-model.c
@@ -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) {
diff --git a/sim/ppc/hw_com.c b/sim/ppc/hw_com.c
index 38d6d85cef..4ffd73203f 100644
--- a/sim/ppc/hw_com.c
+++ b/sim/ppc/hw_com.c
@@ -27,20 +27,11 @@
#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
diff --git a/sim/ppc/hw_eeprom.c b/sim/ppc/hw_eeprom.c
index 3406be93c6..b0a3ac635b 100644
--- a/sim/ppc/hw_eeprom.c
+++ b/sim/ppc/hw_eeprom.c
@@ -23,13 +23,7 @@
#include "device_table.h"
-#ifdef HAVE_STRING_H
#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
/* DEVICE
diff --git a/sim/ppc/hw_nvram.c b/sim/ppc/hw_nvram.c
index f8caaa8edd..0580dcc2a4 100644
--- a/sim/ppc/hw_nvram.c
+++ b/sim/ppc/hw_nvram.c
@@ -27,17 +27,8 @@
#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
@@ -73,11 +64,7 @@
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
diff --git a/sim/ppc/hw_opic.c b/sim/ppc/hw_opic.c
index 69d956b1a5..8afe312a7e 100644
--- a/sim/ppc/hw_opic.c
+++ b/sim/ppc/hw_opic.c
@@ -23,13 +23,7 @@
#include "device_table.h"
-#ifdef HAVE_STRING_H
#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
/* DEVICE
diff --git a/sim/ppc/hw_pal.c b/sim/ppc/hw_pal.c
index 0789929cde..8b07709936 100644
--- a/sim/ppc/hw_pal.c
+++ b/sim/ppc/hw_pal.c
@@ -29,20 +29,11 @@
#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
diff --git a/sim/ppc/hw_phb.c b/sim/ppc/hw_phb.c
index 8e3fb17950..08defc2868 100644
--- a/sim/ppc/hw_phb.c
+++ b/sim/ppc/hw_phb.c
@@ -27,10 +27,7 @@
#include "corefile.h"
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
-
#include <ctype.h>
diff --git a/sim/ppc/hw_sem.c b/sim/ppc/hw_sem.c
index f1c3295444..5f3595204d 100644
--- a/sim/ppc/hw_sem.c
+++ b/sim/ppc/hw_sem.c
@@ -23,14 +23,7 @@
#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>
diff --git a/sim/ppc/hw_shm.c b/sim/ppc/hw_shm.c
index 3128871483..f2fa144244 100644
--- a/sim/ppc/hw_shm.c
+++ b/sim/ppc/hw_shm.c
@@ -23,14 +23,7 @@
#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>
diff --git a/sim/ppc/lf.c b/sim/ppc/lf.c
index 1794a27f35..a3815a8788 100644
--- a/sim/ppc/lf.c
+++ b/sim/ppc/lf.c
@@ -26,17 +26,8 @@
#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;
diff --git a/sim/ppc/main.c b/sim/ppc/main.c
index 667c02f2d4..1e73444ff8 100644
--- a/sim/ppc/main.c
+++ b/sim/ppc/main.c
@@ -33,22 +33,11 @@
#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)
diff --git a/sim/ppc/misc.c b/sim/ppc/misc.c
index 8c21bd38b1..6de3cf9a95 100644
--- a/sim/ppc/misc.c
+++ b/sim/ppc/misc.c
@@ -25,17 +25,8 @@
#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, ...)
diff --git a/sim/ppc/misc.h b/sim/ppc/misc.h
index 232f2eaacd..c080ae29f0 100644
--- a/sim/ppc/misc.h
+++ b/sim/ppc/misc.h
@@ -24,18 +24,8 @@
#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)
diff --git a/sim/ppc/mon.c b/sim/ppc/mon.c
index 8235b66df1..452cd19c3d 100644
--- a/sim/ppc/mon.c
+++ b/sim/ppc/mon.c
@@ -26,30 +26,15 @@
#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
diff --git a/sim/ppc/pk_disklabel.c b/sim/ppc/pk_disklabel.c
index fb820fd32d..d424c0480a 100644
--- a/sim/ppc/pk_disklabel.c
+++ b/sim/ppc/pk_disklabel.c
@@ -29,11 +29,7 @@
#include "pk.h"
-#ifdef HAVE_STDLIB_H
#include <stdlib.h>
-#endif
-
-
/* PACKAGE
diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c
index 3e322e3820..ebb9cb4273 100644
--- a/sim/ppc/psim.c
+++ b/sim/ppc/psim.c
@@ -31,21 +31,9 @@
#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"
diff --git a/sim/ppc/registers.c b/sim/ppc/registers.c
index b672f9907e..2bab55a65f 100644
--- a/sim/ppc/registers.c
+++ b/sim/ppc/registers.c
@@ -26,18 +26,8 @@
#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)
diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c
index 0a209bf6e0..c8364f0900 100644
--- a/sim/ppc/sim_calls.c
+++ b/sim/ppc/sim_calls.c
@@ -27,17 +27,8 @@
#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"
diff --git a/sim/ppc/table.c b/sim/ppc/table.c
index 43c7462237..3c7e4464be 100644
--- a/sim/ppc/table.c
+++ b/sim/ppc/table.c
@@ -32,10 +32,7 @@
#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 {
diff --git a/sim/ppc/tree.c b/sim/ppc/tree.c
index 5d20bf4103..a0e0820b4d 100644
--- a/sim/ppc/tree.c
+++ b/sim/ppc/tree.c
@@ -29,19 +29,8 @@
#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"
diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog
index 620b50ff31..ce8ca2a0da 100644
--- a/sim/pru/ChangeLog
+++ b/sim/pru/ChangeLog
@@ -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.
diff --git a/sim/pru/config.in b/sim/pru/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/pru/config.in
+++ b/sim/pru/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/pru/configure b/sim/pru/configure
index 1bcb7b47b3..3eb9c87457 100755
--- a/sim/pru/configure
+++ b/sim/pru/configure
@@ -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
diff --git a/sim/rl78/ChangeLog b/sim/rl78/ChangeLog
index 936e7b71f4..8944ad4225 100644
--- a/sim/rl78/ChangeLog
+++ b/sim/rl78/ChangeLog
@@ -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.
diff --git a/sim/rl78/config.in b/sim/rl78/config.in
index 2be193d671..e4894c4c51 100644
--- a/sim/rl78/config.in
+++ b/sim/rl78/config.in
@@ -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
@@ -133,9 +130,6 @@
/* 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
diff --git a/sim/rl78/configure b/sim/rl78/configure
index e9fe1139fa..24de7d61ba 100755
--- a/sim/rl78/configure
+++ b/sim/rl78/configure
@@ -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
diff --git a/sim/rx/ChangeLog b/sim/rx/ChangeLog
index e5896c293f..79b4e99289 100644
--- a/sim/rx/ChangeLog
+++ b/sim/rx/ChangeLog
@@ -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.
diff --git a/sim/rx/config.in b/sim/rx/config.in
index c66cab2b75..97caf8d053 100644
--- a/sim/rx/config.in
+++ b/sim/rx/config.in
@@ -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
@@ -139,9 +136,6 @@
/* 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
diff --git a/sim/rx/configure b/sim/rx/configure
index 964f9f2bdc..447a252004 100755
--- a/sim/rx/configure
+++ b/sim/rx/configure
@@ -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
diff --git a/sim/rx/main.c b/sim/rx/main.c
index 1eac6037f0..4a9d3ecebe 100644
--- a/sim/rx/main.c
+++ b/sim/rx/main.c
@@ -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
diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog
index 214c45ec87..c3a103abe9 100644
--- a/sim/sh/ChangeLog
+++ b/sim/sh/ChangeLog
@@ -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.
diff --git a/sim/sh/config.in b/sim/sh/config.in
index 7c667a1c0d..cb5ea1b01c 100644
--- a/sim/sh/config.in
+++ b/sim/sh/config.in
@@ -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
@@ -130,9 +127,6 @@
/* 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
diff --git a/sim/sh/configure b/sim/sh/configure
index d522be20cc..e781129711 100755
--- a/sim/sh/configure
+++ b/sim/sh/configure
@@ -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
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index c77cf3b1d3..872bfe2889 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -37,24 +37,12 @@
# 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
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog
index 865a2883fb..4f2ccc7cfc 100644
--- a/sim/v850/ChangeLog
+++ b/sim/v850/ChangeLog
@@ -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.
diff --git a/sim/v850/config.in b/sim/v850/config.in
index 3b86818572..830d22ea32 100644
--- a/sim/v850/config.in
+++ b/sim/v850/config.in
@@ -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
@@ -145,9 +142,6 @@
/* 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
diff --git a/sim/v850/configure b/sim/v850/configure
index d2e3879e7f..a8a5aa399f 100755
--- a/sim/v850/configure
+++ b/sim/v850/configure
@@ -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
diff --git a/sim/v850/interp.c b/sim/v850/interp.c
index daf9618017..10d8a67a6f 100644
--- a/sim/v850/interp.c
+++ b/sim/v850/interp.c
@@ -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"
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index 40d578e5d0..93185b6de6 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -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"