From: Mike Frysinger Date: Sat, 9 Jan 2021 08:56:10 +0000 (-0500) Subject: sim: clean up C11 header includes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=68ed2854284d415a71efd856a40343f550881ede;p=binutils-gdb.git 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. --- diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index 5708802be00..e4f07482c3c 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/aarch64/config.in b/sim/aarch64/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/aarch64/config.in +++ b/sim/aarch64/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 ef481b4d87f..b682b1b36e7 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 67060927b06..7b49939da0b 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/arm/config.in b/sim/arm/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/arm/config.in +++ b/sim/arm/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 43607d8156d..51dcea114d7 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 c368fa4681b..0f837b25524 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + * interp.c: Delete HAVE_STRING_H. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/avr/config.in b/sim/avr/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/avr/config.in +++ b/sim/avr/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 1bcb7b47b31..3eb9c874572 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 deaf711e104..3aff8816187 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -19,9 +19,8 @@ #include "config.h" -#ifdef HAVE_STRING_H #include -#endif + #include "bfd.h" #include "libiberty.h" #include "gdb/remote-sim.h" diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 1ac810e8a1e..36acbdc40af 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/bfin/config.in b/sim/bfin/config.in index 5be1f16ce93..cc4a677d16a 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 header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 3701395a1f8..c0d129d8124 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 e1abb698fd1..b08642f219c 100644 --- a/sim/bpf/ChangeLog +++ b/sim/bpf/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/bpf/config.in b/sim/bpf/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/bpf/config.in +++ b/sim/bpf/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 74b7e59c58e..cad42b2a930 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 e525110bf41..6ffee1610d7 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,16 @@ +2021-01-11 Mike Frysinger + + * 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 * sim-basics.h [__CYGWIN32__] (vasprintf, asprintf): Delete. diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4 index b2297dfeb15..45ec134d6d7 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 5172d9751df..f9e848fd913 100644 --- a/sim/common/callback.c +++ b/sim/common/callback.c @@ -26,20 +26,10 @@ #include "ansidecl.h" #include #include -#ifdef HAVE_STDLIB_H #include -#endif -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_LIMITS_H /* For PIPE_BUF. */ #include -#endif #include #include #include diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c index 42068a398a7..56df075f680 100644 --- a/sim/common/cgen-scache.c +++ b/sim/common/cgen-scache.c @@ -20,9 +20,7 @@ along with this program. If not, see . */ #define SCACHE_DEFINE_INLINE #include "sim-main.h" -#ifdef HAVE_STDLIB_H #include -#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 9319b198caa..8bda3261578 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif /* DEVICE diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c index 66a916c6657..dd4ab4fb390 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif /* DEVICE diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c index 1b01870050d..fc552fa0acf 100644 --- a/sim/common/dv-sockser.c +++ b/sim/common/dv-sockser.c @@ -21,17 +21,9 @@ along with this program. If not, see . */ #include "config.h" #include "sim-main.h" -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_FCNTL_H #include #endif diff --git a/sim/common/hw-alloc.c b/sim/common/hw-alloc.c index e504236d1d6..141dc21167f 100644 --- a/sim/common/hw-alloc.c +++ b/sim/common/hw-alloc.c @@ -21,10 +21,7 @@ along with this program. If not, see . */ #include "hw-main.h" #include "hw-base.h" - -#ifdef HAVE_STDLIB_H #include -#endif struct hw_alloc_data { diff --git a/sim/common/hw-base.c b/sim/common/hw-base.c index 87ca7292e55..af8b1812489 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - -#if HAVE_STDLIB_H #include -#endif - #include #include "hw-config.h" diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c index 76e41b4d321..bc91264c020 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 -#endif - -#if HAVE_STRING_H #include -#endif /* Address methods */ diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c index 917d7bde4e9..1c749dd8c27 100644 --- a/sim/common/hw-events.c +++ b/sim/common/hw-events.c @@ -23,9 +23,7 @@ along with this program. If not, see . */ #include "sim-events.h" -#if HAVE_STRING_H #include -#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 539be3938ad..bbd08f632fd 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 -#endif struct hw_handle_mapping { diff --git a/sim/common/hw-ports.c b/sim/common/hw-ports.c index 7aefb973912..50e2cbc30e4 100644 --- a/sim/common/hw-ports.c +++ b/sim/common/hw-ports.c @@ -21,18 +21,8 @@ along with this program. If not, see . */ #include "hw-main.h" #include "hw-base.h" -#ifdef HAVE_STDLIB_H #include -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #include diff --git a/sim/common/hw-properties.c b/sim/common/hw-properties.c index fe29ff41ae8..11a371cea00 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif /* property entries */ diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c index 91822337d97..4d50ec6ed62 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #include /* manipulate/lookup device names */ diff --git a/sim/common/nrun.c b/sim/common/nrun.c index 134dec8bc11..0caa82062a2 100644 --- a/sim/common/nrun.c +++ b/sim/common/nrun.c @@ -21,15 +21,8 @@ along with this program. If not, see . */ #include #include - /* For strsignal. */ -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "sim-main.h" diff --git a/sim/common/sim-arange.c b/sim/common/sim-arange.c index 90203a9784b..a40dabbeb7d 100644 --- a/sim/common/sim-arange.c +++ b/sim/common/sim-arange.c @@ -24,13 +24,8 @@ along with this program. If not, see . */ #include "sim-basics.h" #include "sim-arange.h" -#ifdef HAVE_STDLIB_H #include -#endif - -#ifdef HAVE_STRING_H #include -#endif /* Insert a range. */ diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c index e17557666d7..db05cafe13e 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - -#ifdef HAVE_STDLIB_H #include -#endif - #include /* For SIGPROCMASK et al. */ typedef enum { diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c index 30147a81da4..bff5b08b5e5 100644 --- a/sim/common/sim-fpu.c +++ b/sim/common/sim-fpu.c @@ -41,9 +41,7 @@ along with this program. If not, see . */ #include "sim-io.h" #include "sim-assert.h" -#ifdef HAVE_STDLIB_H #include -#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 979a4679af6..81b4f64f7c2 100644 --- a/sim/common/sim-hw.c +++ b/sim/common/sim-hw.c @@ -28,17 +28,8 @@ along with this program. If not, see . */ #include "hw-main.h" #include "hw-base.h" - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H #include -#endif #include #include diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c index d998be84439..e0aab1e9eb4 100644 --- a/sim/common/sim-load.c +++ b/sim/common/sim-load.c @@ -24,9 +24,7 @@ along with this program. If not, see . */ #include "ansidecl.h" #include /* for NULL */ #include -#ifdef HAVE_STDLIB_H #include -#endif #include #include "sim-basics.h" diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c index 77a48df5d56..a102d74ecd0 100644 --- a/sim/common/sim-memopt.c +++ b/sim/common/sim-memopt.c @@ -23,19 +23,9 @@ along with this program. If not, see . */ #include "sim-assert.h" #include "sim-options.h" -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H #include -#endif -#ifdef HAVE_ERRNO_H #include -#endif #ifdef HAVE_FCNTL_H #include #endif diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index e0de39adab7..d4434cfd738 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -19,16 +19,8 @@ along with this program. If not, see . */ #include "config.h" #include "sim-main.h" -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H #include -#endif #include #include #include "libiberty.h" diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c index a886013edac..f4ce89f0428 100644 --- a/sim/common/sim-profile.c +++ b/sim/common/sim-profile.c @@ -22,17 +22,8 @@ along with this program. If not, see . */ #include "sim-options.h" #include "sim-assert.h" -#ifdef HAVE_STDLIB_H #include -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include #if !WITH_PROFILE_PC_P diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c index 29b793ce79a..5f161da630b 100644 --- a/sim/common/sim-trace.c +++ b/sim/common/sim-trace.c @@ -29,16 +29,8 @@ along with this program. If not, see . */ #include "sim-assert.h" -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H #include -#endif #ifndef SIZE_PHASE #define SIZE_PHASE 8 diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c index 122e7f2f617..69949aa1520 100644 --- a/sim/common/sim-utils.c +++ b/sim/common/sim-utils.c @@ -20,14 +20,8 @@ along with this program. If not, see . */ #include "sim-main.h" #include "sim-assert.h" -#ifdef HAVE_STDLIB_H #include -#endif - -#ifdef HAVE_TIME_H #include -#endif - #ifdef HAVE_SYS_TIME_H #include /* needed by sys/resource.h */ #endif @@ -35,14 +29,7 @@ along with this program. If not, see . */ #ifdef HAVE_SYS_RESOURCE_H #include #endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "libiberty.h" #include "bfd.h" diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c index 9c929a15731..bbd5be434be 100644 --- a/sim/common/sim-watch.c +++ b/sim/common/sim-watch.c @@ -26,18 +26,8 @@ along with this program. If not, see . */ #include #include - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - -#ifdef HAVE_STDLIB_H #include -#endif enum { OPTION_WATCH_DELETE = OPTION_START, diff --git a/sim/common/syscall.c b/sim/common/syscall.c index 8a8c81fbf6b..fbe8021c8ef 100644 --- a/sim/common/syscall.c +++ b/sim/common/syscall.c @@ -30,14 +30,8 @@ #include "libiberty.h" #include #include -#ifdef HAVE_STDLIB_H #include -#endif -#ifdef HAVE_STRING_H #include -#elif defined (HAVE_STRINGS_H) -#include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 14edee23c29..7ec37863f33 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + * simops.c: Delete HAVE_STRING_H & HAVE_TIME_H. + 2021-01-09 Mike Frysinger * cr16_sim.h (State): Change to an extern. diff --git a/sim/cr16/config.in b/sim/cr16/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/cr16/config.in +++ b/sim/cr16/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 f33e5d5409f..8a1f3867255 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 c7139eb9699..f52376237e9 100644 --- a/sim/cr16/simops.c +++ b/sim/cr16/simops.c @@ -27,12 +27,8 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_STRING_H #include -#endif -#ifdef HAVE_TIME_H #include -#endif #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 2af85ec58da..df6db418503 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,10 @@ +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/cris/config.in b/sim/cris/config.in index 789d4127be4..aa4d64950e9 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 header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 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 267e9d373c6..b40c756d6d1 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 12e0023e864..a2b08a98d40 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 d22bf068caf..612eff4e931 100644 --- a/sim/cris/dv-rv.c +++ b/sim/cris/dv-rv.c @@ -25,26 +25,12 @@ #include "hw-tree.h" #include - -#ifdef HAVE_ERRNO_H #include -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif diff --git a/sim/cris/rvdummy.c b/sim/cris/rvdummy.c index cb16410304d..f147ea9e59b 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 #endif -#ifdef HAVE_STDLIB_H #include -#endif -#ifdef HAVE_STRING_H #include -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif @@ -60,9 +55,7 @@ main (int argc, char *argv[]) #include #endif -#ifdef HAVE_ERRNO_H #include -#endif /* Not guarded in dv-sockser.c, so why here. */ #include diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index b8c7cb2a96e..787896cae23 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -26,9 +26,7 @@ along with this program. If not, see . */ #include "elf-bfd.h" #include "sim-main.h" -#ifdef HAVE_STDLIB_H #include -#endif #include #include "sim-options.h" #include "dis-asm.h" diff --git a/sim/cris/traps.c b/sim/cris/traps.c index 03429e12ed2..2aaa1f43b16 100644 --- a/sim/cris/traps.c +++ b/sim/cris/traps.c @@ -24,9 +24,7 @@ along with this program. If not, see . */ /* FIXME: get rid of targ-vals.h usage everywhere else. */ #include -#ifdef HAVE_ERRNO_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 13abbb86147..b5b45d28548 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger + + * 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 * d10v_sim.h (State): Change to an extern. diff --git a/sim/d10v/config.in b/sim/d10v/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/d10v/config.in +++ b/sim/d10v/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 d522be20cc2..e7811297111 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 5c70b38d9d8..276c76beab0 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif /* HAVE_STRING_H */ -#endif /* HAVE_STRINGS_H */ - -#ifdef HAVE_STDLIB_H #include -#endif enum _leftright { LEFT_FIRST, RIGHT_FIRST }; diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c index 92fd82710fd..ed0c8a36259 100644 --- a/sim/d10v/simops.c +++ b/sim/d10v/simops.c @@ -7,9 +7,7 @@ #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_STRING_H #include -#endif #include "sim-main.h" #include "simops.h" diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index d296ab311b9..d169de8c098 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + * sis.c: Delete HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/erc32/config.in b/sim/erc32/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/erc32/config.in +++ b/sim/erc32/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 af8261e4816..360cffb6657 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 26f3ed9cd6a..858bcbb9d7b 100644 --- a/sim/erc32/sis.c +++ b/sim/erc32/sis.c @@ -19,9 +19,7 @@ #include "config.h" #include #include -#ifdef HAVE_STDLIB_H #include -#endif #include #include #include "sis.h" diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index c021f1c4ab8..90228792512 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/frv/config.in b/sim/frv/config.in index ea6c08c477d..c60f7d8649d 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 header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 fb752cf1543..d10ca4b2d89 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 d90984a1ee9..b5cc8dec798 100644 --- a/sim/frv/options.c +++ b/sim/frv/options.c @@ -24,16 +24,8 @@ along with this program. If not, see . */ #include "sim-assert.h" #include "sim-options.h" -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H #include -#endif /* FRV specific command line options. */ diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c index 2eb6e6da5f3..636890bd2cb 100644 --- a/sim/frv/sim-if.c +++ b/sim/frv/sim-if.c @@ -20,9 +20,7 @@ along with this program. If not, see . */ #define WANT_CPU #define WANT_CPU_FRVBF #include "sim-main.h" -#ifdef HAVE_STDLIB_H #include -#endif #include "sim-options.h" #include "libiberty.h" #include "bfd.h" diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index ad31e24e01f..68aaf94ea14 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/ft32/config.in b/sim/ft32/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/ft32/config.in +++ b/sim/ft32/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 6eeb19ff067..cea6a42b666 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 4bab9c52b07..f6dd484c79f 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + * compile.c: Delete HAVE_TIME_H & HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index 3a3b2e7241b..a0e8bbbf898 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -19,12 +19,8 @@ #include "config.h" #include -#ifdef HAVE_TIME_H #include -#endif -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_SYS_PARAM_H #include #endif diff --git a/sim/h8300/config.in b/sim/h8300/config.in index a05c9620897..81502266895 100644 --- a/sim/h8300/config.in +++ b/sim/h8300/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 2585927f7d3..34c63bfdd34 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 7f9e87aa917..25a2c33fede 100644 --- a/sim/igen/ChangeLog +++ b/sim/igen/ChangeLog @@ -1,3 +1,14 @@ +2021-01-11 Mike Frysinger + + * configure.ac (AC_CHECK_HEADERS): Delete stdlib.h, string.h, and + strings.h. + * configure, configure.ac: Regenerate. + +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/igen/configure b/sim/igen/configure index a6df60c8390..877a23de97d 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 f03d8b785d3..12536c26be4 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 8059e004e3b..e37d680b09c 100644 --- a/sim/igen/filter.c +++ b/sim/igen/filter.c @@ -24,13 +24,7 @@ #include "config.h" -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "misc.h" #include "lf.h" diff --git a/sim/igen/lf.c b/sim/igen/lf.c index e8bf75c8824..4a7978e7a71 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif struct _lf { diff --git a/sim/igen/misc.c b/sim/igen/misc.c index 1678bfcc672..d74f74e12e5 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#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 7634816dcd2..40e9cd05d1c 100644 --- a/sim/igen/misc.h +++ b/sim/igen/misc.h @@ -54,18 +54,8 @@ typedef unsigned __int64 unsigned64; #include #include - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - -#ifdef HAVE_STDLIB_H #include -#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 5b0d07e842d..d21b282dc45 100644 --- a/sim/igen/table.c +++ b/sim/igen/table.c @@ -35,10 +35,7 @@ #ifdef HAVE_UNISTD_H #include #endif - -#ifdef HAVE_STDLIB_H #include -#endif typedef struct _open_table open_table; struct _open_table diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index 79a1dd2d95f..7346cbd06ad 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + * sim-if.c: Delete HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/iq2000/config.in b/sim/iq2000/config.in index ea6c08c477d..c60f7d8649d 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 header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 a0cd1a1d2fd..d16aeee0155 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 238ec97e47d..07169402c99 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 . */ #include "sim-main.h" -#ifdef HAVE_STDLIB_H + #include -#endif + #include "sim-options.h" #include "libiberty.h" #include "bfd.h" diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index f4c1a3b9ceb..4796212f091 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + * sim-if.c: Delete HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/lm32/config.in b/sim/lm32/config.in index ea6c08c477d..c60f7d8649d 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 header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 6c0fc08e300..fa59d925f6d 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 cbe975113b3..176456ed62d 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 -#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 8a5c8d15046..1d609ca9d84 100644 --- a/sim/m32c/ChangeLog +++ b/sim/m32c/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/m32c/config.in b/sim/m32c/config.in index b5791d73a72..cae76607786 100644 --- a/sim/m32c/config.in +++ b/sim/m32c/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 c2b72d70857..407dd1f624a 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 ed284eada55..dd4bba95a11 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/m32r/config.in b/sim/m32r/config.in index ea6c08c477d..c60f7d8649d 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 header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 ceb542c07f1..5b73aa511fb 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 c25d9a859c2..08003b50fd6 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H #include -#endif #include "dv-m32r_uart.h" diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 7545c768cf8..d8d031d83e9 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/m68hc11/config.in b/sim/m68hc11/config.in index ea6c08c477d..c60f7d8649d 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 header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 546e57107d1..909a4e3833d 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 de32036a37b..041bd516b99 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/mcore/config.in b/sim/mcore/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/mcore/config.in +++ b/sim/mcore/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 d522be20cc2..e7811297111 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 523971ca99c..db8307d18cd 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/microblaze/config.in b/sim/microblaze/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/microblaze/config.in +++ b/sim/microblaze/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 43607d8156d..51dcea114d7 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 6197dd6f372..94827d5df31 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/mips/config.in b/sim/mips/config.in index a1463017b9b..09537fe1ca7 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 header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 5692eeadd79..45580015361 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 9dbac8c58fc..49e5f716757 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -41,16 +41,8 @@ code on the hardware. #include #include #include -#ifdef HAVE_STDLIB_H #include -#endif -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "getopt.h" #include "libiberty.h" diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 2f93d99837f..3932e81d8c6 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/mn10300/config.in b/sim/mn10300/config.in index 716d2bc869c..c9fb022ca3e 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 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 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 b8c4ab0d8bd..6604a3a6297 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 7f0655f3f47..418f3f00a39 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "bfd.h" diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c index 67bf9a34f68..a696cdbfab9 100644 --- a/sim/mn10300/op_utils.c +++ b/sim/mn10300/op_utils.c @@ -5,22 +5,11 @@ #ifdef HAVE_UTIME_H #include #endif - -#ifdef HAVE_TIME_H #include -#endif - #ifdef HAVE_UNISTD_H #include #endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include #include #include diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 00ad7a73018..c01b323fe16 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/moxie/config.in b/sim/moxie/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/moxie/config.in +++ b/sim/moxie/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 7cf3c120541..d500eef4ed9 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 1f1a0c457b2..974e59ea344 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/msp430/config.in b/sim/msp430/config.in index 2be193d6717..e4894c4c510 100644 --- a/sim/msp430/config.in +++ b/sim/msp430/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 683c79fb31c..654492c80b2 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 83f9817a467..89cf42a6425 100644 --- a/sim/or1k/ChangeLog +++ b/sim/or1k/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/or1k/config.in b/sim/or1k/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/or1k/config.in +++ b/sim/or1k/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 8fc5d623040..538011c2ad1 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 18f70387063..b5258a828a5 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif -#ifdef HAVE_STDLIB_H #include -#endif static void free_state (SIM_DESC); diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 625afeccd57..6906cc26a6c 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,21 @@ +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/ppc/config.in b/sim/ppc/config.in index e157e9fd1b2..1a256d93900 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 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 9934d2a378a..108c92a44bf 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 ee52bba81ec..9bc10570f03 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 c7e8bdf0c00..3169553a587 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif struct _cpu { diff --git a/sim/ppc/debug.c b/sim/ppc/debug.c index 1ec279bac2a..dba14255366 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 -#endif -#ifdef HAVE_STRING_H #include -#endif int ppc_trace[nr_trace_options]; diff --git a/sim/ppc/device.c b/sim/ppc/device.c index d5093bbdadb..6a0209e5ce6 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #include STATIC_INLINE_DEVICE (void) clean_device_properties(device *); diff --git a/sim/ppc/device_table.c b/sim/ppc/device_table.c index d2c6195e1da..7d8fabd4dd5 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 -#endif - #include diff --git a/sim/ppc/device_table.h b/sim/ppc/device_table.h index 654ecade4b0..b61f4bd06d7 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif typedef struct _device_callbacks device_callbacks; diff --git a/sim/ppc/dgen.c b/sim/ppc/dgen.c index 8e8f5fb61bc..9437944a9a6 100644 --- a/sim/ppc/dgen.c +++ b/sim/ppc/dgen.c @@ -34,18 +34,8 @@ #ifdef HAVE_UNISTD_H #include #endif - -#ifdef HAVE_STDLIB_H #include -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif /****************************************************************/ diff --git a/sim/ppc/emul_bugapi.c b/sim/ppc/emul_bugapi.c index 8481b6fb39e..c3c607b43f0 100644 --- a/sim/ppc/emul_bugapi.c +++ b/sim/ppc/emul_bugapi.c @@ -30,18 +30,8 @@ #ifdef HAVE_UNISTD_H #include #endif - -#ifdef HAVE_STDLIB_H #include -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif /* EMULATION diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c index f326410b060..d4214f51b97 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #ifdef HAVE_UNISTD_H #include #endif diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c index 0bda20e164b..0135a93298b 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #include #include #include @@ -82,9 +75,7 @@ int getrusage(); #include #endif -#ifdef HAVE_STDLIB_H #include -#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 3a1c24586fa..92c3c1ededf 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif @@ -130,9 +123,7 @@ int getrusage(); #include #endif -#ifdef HAVE_STDLIB_H #include -#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 7aa6a556014..a2024275290 100644 --- a/sim/ppc/filter.c +++ b/sim/ppc/filter.c @@ -22,13 +22,7 @@ #include "build-config.h" -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "misc.h" #include "filter.h" diff --git a/sim/ppc/gen-model.c b/sim/ppc/gen-model.c index 00f2b02118e..a591d316e2e 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 \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 38d6d85cefc..4ffd73203f4 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif /* DEVICE diff --git a/sim/ppc/hw_eeprom.c b/sim/ppc/hw_eeprom.c index 3406be93c62..b0a3ac635b1 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif /* DEVICE diff --git a/sim/ppc/hw_nvram.c b/sim/ppc/hw_nvram.c index f8caaa8edd2..0580dcc2a43 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#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 69d956b1a5f..8afe312a7ef 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif /* DEVICE diff --git a/sim/ppc/hw_pal.c b/sim/ppc/hw_pal.c index 0789929cde0..8b077099369 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #ifdef HAVE_UNISTD_H #include #endif -#ifdef HAVE_STDLIB_H #include -#endif /* DEVICE diff --git a/sim/ppc/hw_phb.c b/sim/ppc/hw_phb.c index 8e3fb179501..08defc2868c 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 -#endif - #include diff --git a/sim/ppc/hw_sem.c b/sim/ppc/hw_sem.c index f1c32954443..5f3595204d2 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #include #include diff --git a/sim/ppc/hw_shm.c b/sim/ppc/hw_shm.c index 31288714833..f2fa144244a 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 -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #include #include diff --git a/sim/ppc/lf.c b/sim/ppc/lf.c index 1794a27f350..a3815a8788e 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif struct _lf { FILE *stream; diff --git a/sim/ppc/main.c b/sim/ppc/main.c index 667c02f2d43..1e73444ff83 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 -#endif - #ifdef HAVE_UNISTD_H #include #endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #include #if !defined(O_NDELAY) || !defined(F_GETFL) || !defined(F_SETFL) diff --git a/sim/ppc/misc.c b/sim/ppc/misc.c index 8c21bd38b1b..6de3cf9a95b 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif void error (char *msg, ...) diff --git a/sim/ppc/misc.h b/sim/ppc/misc.h index 232f2eaacd0..c080ae29f0b 100644 --- a/sim/ppc/misc.h +++ b/sim/ppc/misc.h @@ -24,18 +24,8 @@ #include #include - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - -#ifdef HAVE_STDLIB_H #include -#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 8235b66df1d..452cd19c3d9 100644 --- a/sim/ppc/mon.c +++ b/sim/ppc/mon.c @@ -26,30 +26,15 @@ #include "mon.h" #include -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #ifdef HAVE_UNISTD_H #include #endif - -#ifdef HAVE_STDLIB_H #include -#endif - #ifdef HAVE_SYS_TYPES_H #include #endif - -#ifdef HAVE_TIME_H #include -#endif - #ifdef HAVE_SYS_TIMES_H #include #endif diff --git a/sim/ppc/pk_disklabel.c b/sim/ppc/pk_disklabel.c index fb820fd32dd..d424c0480ae 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 -#endif - - /* PACKAGE diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c index 3e322e3820f..ebb9cb42737 100644 --- a/sim/ppc/psim.c +++ b/sim/ppc/psim.c @@ -31,21 +31,9 @@ #include #include - -#ifdef HAVE_STDLIB_H #include -#endif - #include - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #include "bfd.h" #include "libiberty.h" diff --git a/sim/ppc/registers.c b/sim/ppc/registers.c index b672f9907e2..2bab55a65fc 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - INLINE_REGISTERS\ (void) diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index 0a209bf6e0d..c8364f09004 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "libiberty.h" #include "bfd.h" diff --git a/sim/ppc/table.c b/sim/ppc/table.c index 43c74622377..3c7e4464beb 100644 --- a/sim/ppc/table.c +++ b/sim/ppc/table.c @@ -32,10 +32,7 @@ #ifdef HAVE_UNISTD_H #include #endif - -#ifdef HAVE_STDLIB_H #include -#endif typedef struct _open_table open_table; struct _open_table { diff --git a/sim/ppc/tree.c b/sim/ppc/tree.c index 5d20bf4103c..a0e0820b4d9 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - #include #include "libiberty.h" diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog index 620b50ff313..ce8ca2a0dad 100644 --- a/sim/pru/ChangeLog +++ b/sim/pru/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure.ac (AC_PREREQ): Delete. diff --git a/sim/pru/config.in b/sim/pru/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/pru/config.in +++ b/sim/pru/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 1bcb7b47b31..3eb9c874572 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 936e7b71f40..8944ad42255 100644 --- a/sim/rl78/ChangeLog +++ b/sim/rl78/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/rl78/config.in b/sim/rl78/config.in index 2be193d6717..e4894c4c510 100644 --- a/sim/rl78/config.in +++ b/sim/rl78/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 e9fe1139fa3..24de7d61ba4 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 e5896c293fb..79b4e992897 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger + + * config.in, configure: Regenerate. + * main.c: Delete HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger * configure: Regenerate. diff --git a/sim/rx/config.in b/sim/rx/config.in index c66cab2b75d..97caf8d0532 100644 --- a/sim/rx/config.in +++ b/sim/rx/config.in @@ -19,9 +19,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 964f9f2bdc8..447a2520048 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 1eac6037f03..4a9d3ecebea 100644 --- a/sim/rx/main.c +++ b/sim/rx/main.c @@ -22,9 +22,7 @@ along with this program. If not, see . */ #include "config.h" #include #include -#ifdef HAVE_STDLIB_H #include -#endif #ifdef HAVE_UNISTD_H #include #endif diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 214c45ec870..c3a103abe9b 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/sh/config.in b/sim/sh/config.in index 7c667a1c0d4..cb5ea1b01c9 100644 --- a/sim/sh/config.in +++ b/sim/sh/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the 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 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 d522be20cc2..e7811297111 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 c77cf3b1d3b..872bfe28893 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -37,24 +37,12 @@ # endif #endif -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif - -#ifdef HAVE_STDLIB_H #include -#endif - #ifdef HAVE_SYS_STAT_H #include #endif -#ifdef HAVE_TIME_H #include -#endif #ifdef HAVE_SYS_TIME_H #include #endif diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 865a2883fbe..4f2ccc7cfc5 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger + + * 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 * configure: Regenerate. diff --git a/sim/v850/config.in b/sim/v850/config.in index 3b86818572d..830d22ea322 100644 --- a/sim/v850/config.in +++ b/sim/v850/config.in @@ -19,9 +19,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the 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 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 d2e3879e7fa..a8a5aa399fa 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 daf96180176..10d8a67a6fb 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 -#endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "bfd.h" diff --git a/sim/v850/simops.c b/sim/v850/simops.c index 40d578e5d0a..93185b6de66 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -7,22 +7,11 @@ #ifdef HAVE_UTIME_H #include #endif - -#ifdef HAVE_TIME_H #include -#endif - #ifdef HAVE_UNISTD_H #include #endif - -#ifdef HAVE_STRING_H #include -#else -#ifdef HAVE_STRINGS_H -#include -#endif -#endif #include "targ-vals.h"