diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-01-09 03:56:10 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-01-11 08:05:54 -0500 |
commit | 68ed2854284d415a71efd856a40343f550881ede (patch) | |
tree | f00f87cc7628c8e82de418bacc5d941db46c2481 | |
parent | a8aa72b913e78407e5de4fefd22f9b98e4466f30 (diff) | |
download | gdb-68ed2854284d415a71efd856a40343f550881ede.zip gdb-68ed2854284d415a71efd856a40343f550881ede.tar.gz gdb-68ed2854284d415a71efd856a40343f550881ede.tar.bz2 |
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.
182 files changed, 1097 insertions, 1090 deletions
diff --git a/sim/aarch64/ChangeLog b/sim/aarch64/ChangeLog index 5708802..e4f0748 100644 --- a/sim/aarch64/ChangeLog +++ b/sim/aarch64/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/aarch64/config.in b/sim/aarch64/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/aarch64/config.in +++ b/sim/aarch64/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/aarch64/configure b/sim/aarch64/configure index ef481b4..b682b1b 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 6706092..7b49939 100644 --- a/sim/arm/ChangeLog +++ b/sim/arm/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/arm/config.in b/sim/arm/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/arm/config.in +++ b/sim/arm/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/arm/configure b/sim/arm/configure index 43607d8..51dcea1 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 c368fa4..0f837b2 100644 --- a/sim/avr/ChangeLog +++ b/sim/avr/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * interp.c: Delete HAVE_STRING_H. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/avr/config.in b/sim/avr/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/avr/config.in +++ b/sim/avr/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/avr/configure b/sim/avr/configure index 1bcb7b4..3eb9c87 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 deaf711..3aff881 100644 --- a/sim/avr/interp.c +++ b/sim/avr/interp.c @@ -19,9 +19,8 @@ #include "config.h" -#ifdef HAVE_STRING_H #include <string.h> -#endif + #include "bfd.h" #include "libiberty.h" #include "gdb/remote-sim.h" diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 1ac810e..36acbdc 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/bfin/config.in b/sim/bfin/config.in index 5be1f16..cc4a677 100644 --- a/sim/bfin/config.in +++ b/sim/bfin/config.in @@ -16,9 +16,6 @@ /* Define if dv-sockser is usable. */ #undef HAVE_DV_SOCKSER -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -175,9 +172,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/bfin/configure b/sim/bfin/configure index 3701395..c0d129d 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 e1abb69..b08642f 100644 --- a/sim/bpf/ChangeLog +++ b/sim/bpf/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/bpf/config.in b/sim/bpf/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/bpf/config.in +++ b/sim/bpf/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/bpf/configure b/sim/bpf/configure index 74b7e59..cad42b2 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 e525110..6ffee16 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,16 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * acinclude.m4 (SIM_AC_COMMON): Delete checks for stdlib.h, string.h, + strings.h, time.h, and errno.h. + * callback.c, cgen-scache.c, dv-glue.c, dv-pal.c, dv-sockser.c, + hw-alloc.c, hw-base.c, hw-device.c, hw-events.c, hw-handles.c, + hw-ports.c, hw-properties.c, hw-tree.c, nrun.c, sim-arange.c, + sim-events.c, sim-fpu.c, sim-hw.c, sim-load.c, sim-memopt.c, + sim-options.c, sim-profile.c, sim-trace.c, sim-utils.c, + sim-watch.c, syscall.c: Delete HAVE_ERRNO_H, HAVE_STDLIB_H, + HAVE_STRING_H, HAVE_STRINGS_H, HAVE_LIMITS_H, HAVE_TIME_H, + and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * sim-basics.h [__CYGWIN32__] (vasprintf, asprintf): Delete. diff --git a/sim/common/acinclude.m4 b/sim/common/acinclude.m4 index b2297df..45ec134 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 5172d97..f9e848f 100644 --- a/sim/common/callback.c +++ b/sim/common/callback.c @@ -26,20 +26,10 @@ #include "ansidecl.h" #include <stdarg.h> #include <stdio.h> -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_LIMITS_H /* For PIPE_BUF. */ #include <limits.h> -#endif #include <errno.h> #include <fcntl.h> #include <time.h> diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c index 42068a3..56df075f 100644 --- a/sim/common/cgen-scache.c +++ b/sim/common/cgen-scache.c @@ -20,9 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define SCACHE_DEFINE_INLINE #include "sim-main.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include "libiberty.h" #include "sim-options.h" #include "sim-io.h" diff --git a/sim/common/dv-glue.c b/sim/common/dv-glue.c index 9319b19..8bda326 100644 --- a/sim/common/dv-glue.c +++ b/sim/common/dv-glue.c @@ -22,13 +22,7 @@ #include "hw-main.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif /* DEVICE diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c index 66a916c..dd4ab4f 100644 --- a/sim/common/dv-pal.c +++ b/sim/common/dv-pal.c @@ -28,20 +28,11 @@ its immediate domain */ #include "hw-tree.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif /* DEVICE diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c index 1b01870..fc552fa 100644 --- a/sim/common/dv-sockser.c +++ b/sim/common/dv-sockser.c @@ -21,17 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "config.h" #include "sim-main.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include <signal.h> -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif diff --git a/sim/common/hw-alloc.c b/sim/common/hw-alloc.c index e504236..141dc21 100644 --- a/sim/common/hw-alloc.c +++ b/sim/common/hw-alloc.c @@ -21,10 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "hw-main.h" #include "hw-base.h" - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif struct hw_alloc_data { diff --git a/sim/common/hw-base.c b/sim/common/hw-base.c index 87ca729..af8b181 100644 --- a/sim/common/hw-base.c +++ b/sim/common/hw-base.c @@ -23,19 +23,8 @@ #include "hw-main.h" #include "hw-base.h" - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#if HAVE_STDLIB_H #include <stdlib.h> -#endif - #include <ctype.h> #include "hw-config.h" diff --git a/sim/common/hw-device.c b/sim/common/hw-device.c index 76e41b4..bc91264 100644 --- a/sim/common/hw-device.c +++ b/sim/common/hw-device.c @@ -23,13 +23,8 @@ #include "hw-main.h" #include "hw-base.h" -#if HAVE_STDLIB_H #include <stdlib.h> -#endif - -#if HAVE_STRING_H #include <string.h> -#endif /* Address methods */ diff --git a/sim/common/hw-events.c b/sim/common/hw-events.c index 917d7bd..1c749dd 100644 --- a/sim/common/hw-events.c +++ b/sim/common/hw-events.c @@ -23,9 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-events.h" -#if HAVE_STRING_H #include <string.h> -#endif /* The hw-events object is implemented using sim-events */ diff --git a/sim/common/hw-handles.c b/sim/common/hw-handles.c index 539be39..bbd08f6 100644 --- a/sim/common/hw-handles.c +++ b/sim/common/hw-handles.c @@ -23,9 +23,7 @@ #include "hw-main.h" #include "hw-base.h" -#if HAVE_STDLIB_H #include <stdlib.h> -#endif struct hw_handle_mapping { diff --git a/sim/common/hw-ports.c b/sim/common/hw-ports.c index 7aefb97..50e2cbc 100644 --- a/sim/common/hw-ports.c +++ b/sim/common/hw-ports.c @@ -21,18 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "hw-main.h" #include "hw-base.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #include <ctype.h> diff --git a/sim/common/hw-properties.c b/sim/common/hw-properties.c index fe29ff4..11a371c 100644 --- a/sim/common/hw-properties.c +++ b/sim/common/hw-properties.c @@ -25,13 +25,7 @@ #include "sim-io.h" #include "sim-assert.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif /* property entries */ diff --git a/sim/common/hw-tree.c b/sim/common/hw-tree.c index 9182233..4d50ec6 100644 --- a/sim/common/hw-tree.c +++ b/sim/common/hw-tree.c @@ -27,18 +27,8 @@ #include "sim-io.h" #include "sim-assert.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #include <ctype.h> /* manipulate/lookup device names */ diff --git a/sim/common/nrun.c b/sim/common/nrun.c index 134dec8..0caa820 100644 --- a/sim/common/nrun.c +++ b/sim/common/nrun.c @@ -21,15 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <signal.h> #include <stdlib.h> - /* For strsignal. */ -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include "sim-main.h" diff --git a/sim/common/sim-arange.c b/sim/common/sim-arange.c index 90203a9..a40dabb 100644 --- a/sim/common/sim-arange.c +++ b/sim/common/sim-arange.c @@ -24,13 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-basics.h" #include "sim-arange.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#endif /* Insert a range. */ diff --git a/sim/common/sim-events.c b/sim/common/sim-events.c index e175576..db05caf 100644 --- a/sim/common/sim-events.c +++ b/sim/common/sim-events.c @@ -27,18 +27,8 @@ #include "sim-assert.h" #include "libiberty.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - #include <signal.h> /* For SIGPROCMASK et al. */ typedef enum { diff --git a/sim/common/sim-fpu.c b/sim/common/sim-fpu.c index 30147a8..bff5b08 100644 --- a/sim/common/sim-fpu.c +++ b/sim/common/sim-fpu.c @@ -41,9 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-io.h" #include "sim-assert.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif /* Debugging support. If digits is -1, then print all digits. */ diff --git a/sim/common/sim-hw.c b/sim/common/sim-hw.c index 979a467..81b4f64 100644 --- a/sim/common/sim-hw.c +++ b/sim/common/sim-hw.c @@ -28,17 +28,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "hw-main.h" #include "hw-base.h" - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include <ctype.h> #include <errno.h> diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c index d998be8..e0aab1e 100644 --- a/sim/common/sim-load.c +++ b/sim/common/sim-load.c @@ -24,9 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "ansidecl.h" #include <stdio.h> /* for NULL */ #include <stdarg.h> -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include <time.h> #include "sim-basics.h" diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c index 77a48df..a102d74 100644 --- a/sim/common/sim-memopt.c +++ b/sim/common/sim-memopt.c @@ -23,19 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-assert.h" #include "sim-options.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif -#ifdef HAVE_ERRNO_H #include <errno.h> -#endif #ifdef HAVE_FCNTL_H #include <fcntl.h> #endif diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index e0de39a..d4434cf 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -19,16 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "config.h" #include "sim-main.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include <ctype.h> #include <stdio.h> #include "libiberty.h" diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c index a886013..f4ce89f 100644 --- a/sim/common/sim-profile.c +++ b/sim/common/sim-profile.c @@ -22,17 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-options.h" #include "sim-assert.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include <ctype.h> #if !WITH_PROFILE_PC_P diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c index 29b793c..5f161da 100644 --- a/sim/common/sim-trace.c +++ b/sim/common/sim-trace.c @@ -29,16 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-assert.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #ifndef SIZE_PHASE #define SIZE_PHASE 8 diff --git a/sim/common/sim-utils.c b/sim/common/sim-utils.c index 122e7f2..69949aa 100644 --- a/sim/common/sim-utils.c +++ b/sim/common/sim-utils.c @@ -20,14 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-main.h" #include "sim-assert.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_TIME_H #include <time.h> -#endif - #ifdef HAVE_SYS_TIME_H #include <sys/time.h> /* needed by sys/resource.h */ #endif @@ -35,14 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h> #endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include "libiberty.h" #include "bfd.h" diff --git a/sim/common/sim-watch.c b/sim/common/sim-watch.c index 9c929a1..bbd5be4 100644 --- a/sim/common/sim-watch.c +++ b/sim/common/sim-watch.c @@ -26,18 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <ctype.h> #include <stdio.h> - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif enum { OPTION_WATCH_DELETE = OPTION_START, diff --git a/sim/common/syscall.c b/sim/common/syscall.c index 8a8c81f..fbe8021 100644 --- a/sim/common/syscall.c +++ b/sim/common/syscall.c @@ -30,14 +30,8 @@ #include "libiberty.h" #include <stdarg.h> #include <stdio.h> -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif -#ifdef HAVE_STRING_H #include <string.h> -#elif defined (HAVE_STRINGS_H) -#include <strings.h> -#endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index 14edee2..7ec3786 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * simops.c: Delete HAVE_STRING_H & HAVE_TIME_H. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * cr16_sim.h (State): Change to an extern. diff --git a/sim/cr16/config.in b/sim/cr16/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/cr16/config.in +++ b/sim/cr16/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/cr16/configure b/sim/cr16/configure index f33e5d5..8a1f386 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 c7139eb..f523762 100644 --- a/sim/cr16/simops.c +++ b/sim/cr16/simops.c @@ -27,12 +27,8 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef HAVE_STRING_H #include <string.h> -#endif -#ifdef HAVE_TIME_H #include <time.h> -#endif #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog index 2af85ec..df6db41 100644 --- a/sim/cris/ChangeLog +++ b/sim/cris/ChangeLog @@ -1,3 +1,10 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * dv-rv.c, rvdummy.c, sim-if.c, traps.c: Delete HAVE_ERRNO_H, + HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H, and strings.h + include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/cris/config.in b/sim/cris/config.in index 789d412..aa4d649 100644 --- a/sim/cris/config.in +++ b/sim/cris/config.in @@ -16,9 +16,6 @@ /* Define if dv-sockser is usable. */ #undef HAVE_DV_SOCKSER -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -43,9 +40,6 @@ /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET -/* Define to 1 if you have the <limits.h> header file. */ -#undef HAVE_LIMITS_H - /* Define to 1 if you have the `lstat' function. */ #undef HAVE_LSTAT @@ -148,9 +142,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/cris/configure b/sim/cris/configure index 267e9d3..b40c756 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 12e0023..a2b08a9 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 d22bf06..612eff4 100644 --- a/sim/cris/dv-rv.c +++ b/sim/cris/dv-rv.c @@ -25,26 +25,12 @@ #include "hw-tree.h" #include <ctype.h> - -#ifdef HAVE_ERRNO_H #include <errno.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/sim/cris/rvdummy.c b/sim/cris/rvdummy.c index cb16410..f147ea9 100644 --- a/sim/cris/rvdummy.c +++ b/sim/cris/rvdummy.c @@ -41,13 +41,8 @@ main (int argc, char *argv[]) #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif -#ifdef HAVE_STRING_H #include <string.h> -#endif - #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif @@ -60,9 +55,7 @@ main (int argc, char *argv[]) #include <sys/select.h> #endif -#ifdef HAVE_ERRNO_H #include <errno.h> -#endif /* Not guarded in dv-sockser.c, so why here. */ #include <netinet/in.h> diff --git a/sim/cris/sim-if.c b/sim/cris/sim-if.c index b8c7cb2..787896c 100644 --- a/sim/cris/sim-if.c +++ b/sim/cris/sim-if.c @@ -26,9 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "elf-bfd.h" #include "sim-main.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include <errno.h> #include "sim-options.h" #include "dis-asm.h" diff --git a/sim/cris/traps.c b/sim/cris/traps.c index 03429e1..2aaa1f4 100644 --- a/sim/cris/traps.c +++ b/sim/cris/traps.c @@ -24,9 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* FIXME: get rid of targ-vals.h usage everywhere else. */ #include <stdarg.h> -#ifdef HAVE_ERRNO_H #include <errno.h> -#endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index 13abbb8..b5b45d2 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, + HAVE_STDLIB_H, and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * d10v_sim.h (State): Change to an extern. diff --git a/sim/d10v/config.in b/sim/d10v/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/d10v/config.in +++ b/sim/d10v/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/d10v/configure b/sim/d10v/configure index d522be2..e781129 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 5c70b38..276c76b 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -11,17 +11,8 @@ #include "gdb/sim-d10v.h" #include "gdb/signals.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif /* HAVE_STRING_H */ -#endif /* HAVE_STRINGS_H */ - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif enum _leftright { LEFT_FIRST, RIGHT_FIRST }; diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c index 92fd827..ed0c8a3 100644 --- a/sim/d10v/simops.c +++ b/sim/d10v/simops.c @@ -7,9 +7,7 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef HAVE_STRING_H #include <string.h> -#endif #include "sim-main.h" #include "simops.h" diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index d296ab3..d169de8 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * sis.c: Delete HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/erc32/config.in b/sim/erc32/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/erc32/config.in +++ b/sim/erc32/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/erc32/configure b/sim/erc32/configure index af8261e..360cffb 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 26f3ed9..858bcbb 100644 --- a/sim/erc32/sis.c +++ b/sim/erc32/sis.c @@ -19,9 +19,7 @@ #include "config.h" #include <signal.h> #include <string.h> -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include <stdio.h> #include <sys/fcntl.h> #include "sis.h" diff --git a/sim/frv/ChangeLog b/sim/frv/ChangeLog index c021f1c..9022879 100644 --- a/sim/frv/ChangeLog +++ b/sim/frv/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * options.c, sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, + HAVE_STDLIB_H, and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/frv/config.in b/sim/frv/config.in index ea6c08c..c60f7d8 100644 --- a/sim/frv/config.in +++ b/sim/frv/config.in @@ -16,9 +16,6 @@ /* Define if dv-sockser is usable. */ #undef HAVE_DV_SOCKSER -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -136,9 +133,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/frv/configure b/sim/frv/configure index fb752cf..d10ca4b 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 d90984a..b5cc8de 100644 --- a/sim/frv/options.c +++ b/sim/frv/options.c @@ -24,16 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-assert.h" #include "sim-options.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif /* FRV specific command line options. */ diff --git a/sim/frv/sim-if.c b/sim/frv/sim-if.c index 2eb6e6d..636890b 100644 --- a/sim/frv/sim-if.c +++ b/sim/frv/sim-if.c @@ -20,9 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define WANT_CPU #define WANT_CPU_FRVBF #include "sim-main.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include "sim-options.h" #include "libiberty.h" #include "bfd.h" diff --git a/sim/ft32/ChangeLog b/sim/ft32/ChangeLog index ad31e24..68aaf94 100644 --- a/sim/ft32/ChangeLog +++ b/sim/ft32/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/ft32/config.in b/sim/ft32/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/ft32/config.in +++ b/sim/ft32/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/ft32/configure b/sim/ft32/configure index 6eeb19f..cea6a42 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 4bab9c5..f6dd484 100644 --- a/sim/h8300/ChangeLog +++ b/sim/h8300/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * compile.c: Delete HAVE_TIME_H & HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c index 3a3b2e7..a0e8bbb 100644 --- a/sim/h8300/compile.c +++ b/sim/h8300/compile.c @@ -19,12 +19,8 @@ #include "config.h" #include <signal.h> -#ifdef HAVE_TIME_H #include <time.h> -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif diff --git a/sim/h8300/config.in b/sim/h8300/config.in index a05c962..8150226 100644 --- a/sim/h8300/config.in +++ b/sim/h8300/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -133,9 +130,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/h8300/configure b/sim/h8300/configure index 2585927..34c63bf 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 7f9e87a..25a2c33 100644 --- a/sim/igen/ChangeLog +++ b/sim/igen/ChangeLog @@ -1,3 +1,14 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * configure.ac (AC_CHECK_HEADERS): Delete stdlib.h, string.h, and + strings.h. + * configure, configure.ac: Regenerate. + +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * filter.c, if.c, misc.c, misc.h, table.c: Delete HAVE_STRING_H, + HAVE_STRINGS_H, HAVE_STDLIB_H, and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/igen/configure b/sim/igen/configure index a6df60c..877a23d 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 f03d8b7..12536c2 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 8059e00..e37d680 100644 --- a/sim/igen/filter.c +++ b/sim/igen/filter.c @@ -24,13 +24,7 @@ #include "config.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include "misc.h" #include "lf.h" diff --git a/sim/igen/lf.c b/sim/igen/lf.c index e8bf75c..4a7978e 100644 --- a/sim/igen/lf.c +++ b/sim/igen/lf.c @@ -29,17 +29,8 @@ #include "misc.h" #include "lf.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif struct _lf { diff --git a/sim/igen/misc.c b/sim/igen/misc.c index 1678bfc..d74f74e 100644 --- a/sim/igen/misc.c +++ b/sim/igen/misc.c @@ -28,17 +28,8 @@ #include "config.h" #include "misc.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif /* NB: Because warning and error can be interchanged, neither append a trailing '\n' */ diff --git a/sim/igen/misc.h b/sim/igen/misc.h index 7634816..40e9cd0 100644 --- a/sim/igen/misc.h +++ b/sim/igen/misc.h @@ -54,18 +54,8 @@ typedef unsigned __int64 unsigned64; #include <stdio.h> #include <ctype.h> - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)) #define __attribute__(arg) diff --git a/sim/igen/table.c b/sim/igen/table.c index 5b0d07e..d21b282 100644 --- a/sim/igen/table.c +++ b/sim/igen/table.c @@ -35,10 +35,7 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif typedef struct _open_table open_table; struct _open_table diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog index 79a1dd2..7346cbd 100644 --- a/sim/iq2000/ChangeLog +++ b/sim/iq2000/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * sim-if.c: Delete HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/iq2000/config.in b/sim/iq2000/config.in index ea6c08c..c60f7d8 100644 --- a/sim/iq2000/config.in +++ b/sim/iq2000/config.in @@ -16,9 +16,6 @@ /* Define if dv-sockser is usable. */ #undef HAVE_DV_SOCKSER -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -136,9 +133,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/iq2000/configure b/sim/iq2000/configure index a0cd1a1..d16aeee 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 238ec97..0716940 100644 --- a/sim/iq2000/sim-if.c +++ b/sim/iq2000/sim-if.c @@ -18,9 +18,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "sim-main.h" -#ifdef HAVE_STDLIB_H + #include <stdlib.h> -#endif + #include "sim-options.h" #include "libiberty.h" #include "bfd.h" diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog index f4c1a3b..4796212 100644 --- a/sim/lm32/ChangeLog +++ b/sim/lm32/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * sim-if.c: Delete HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/lm32/config.in b/sim/lm32/config.in index ea6c08c..c60f7d8 100644 --- a/sim/lm32/config.in +++ b/sim/lm32/config.in @@ -16,9 +16,6 @@ /* Define if dv-sockser is usable. */ #undef HAVE_DV_SOCKSER -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -136,9 +133,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/lm32/configure b/sim/lm32/configure index 6c0fc08..fa59d92 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 cbe9751..176456e 100644 --- a/sim/lm32/sim-if.c +++ b/sim/lm32/sim-if.c @@ -23,9 +23,7 @@ #include "libiberty.h" #include "bfd.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif /* Cover function of sim_state_free to free the cpu buffers as well. */ diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog index 8a5c8d1..1d609ca 100644 --- a/sim/m32c/ChangeLog +++ b/sim/m32c/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/m32c/config.in b/sim/m32c/config.in index b5791d7..cae7660 100644 --- a/sim/m32c/config.in +++ b/sim/m32c/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -145,9 +142,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/m32c/configure b/sim/m32c/configure index c2b72d7..407dd1f 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 ed284ea..dd4bba9 100644 --- a/sim/m32r/ChangeLog +++ b/sim/m32r/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H, + and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/m32r/config.in b/sim/m32r/config.in index ea6c08c..c60f7d8 100644 --- a/sim/m32r/config.in +++ b/sim/m32r/config.in @@ -16,9 +16,6 @@ /* Define if dv-sockser is usable. */ #undef HAVE_DV_SOCKSER -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -136,9 +133,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/m32r/configure b/sim/m32r/configure index ceb542c..5b73aa5 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 c25d9a8..08003b5 100644 --- a/sim/m32r/sim-if.c +++ b/sim/m32r/sim-if.c @@ -22,16 +22,8 @@ #include "libiberty.h" #include "bfd.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #include "dv-m32r_uart.h" diff --git a/sim/m68hc11/ChangeLog b/sim/m68hc11/ChangeLog index 7545c76..d8d031d 100644 --- a/sim/m68hc11/ChangeLog +++ b/sim/m68hc11/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/m68hc11/config.in b/sim/m68hc11/config.in index ea6c08c..c60f7d8 100644 --- a/sim/m68hc11/config.in +++ b/sim/m68hc11/config.in @@ -16,9 +16,6 @@ /* Define if dv-sockser is usable. */ #undef HAVE_DV_SOCKSER -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -136,9 +133,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/m68hc11/configure b/sim/m68hc11/configure index 546e571..909a4e3 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 de32036..041bd51 100644 --- a/sim/mcore/ChangeLog +++ b/sim/mcore/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/mcore/config.in b/sim/mcore/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/mcore/config.in +++ b/sim/mcore/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/mcore/configure b/sim/mcore/configure index d522be2..e781129 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 523971c..db8307d 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/microblaze/config.in b/sim/microblaze/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/microblaze/config.in +++ b/sim/microblaze/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/microblaze/configure b/sim/microblaze/configure index 43607d8..51dcea1 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 6197dd6..94827d5 100644 --- a/sim/mips/ChangeLog +++ b/sim/mips/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * interp.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H, + and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/mips/config.in b/sim/mips/config.in index a146301..09537fe 100644 --- a/sim/mips/config.in +++ b/sim/mips/config.in @@ -22,9 +22,6 @@ /* Define if dv-sockser is usable. */ #undef HAVE_DV_SOCKSER -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -145,9 +142,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/mips/configure b/sim/mips/configure index 5692eea..4558001 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 9dbac8c..49e5f71 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -41,16 +41,8 @@ code on the hardware. #include <ctype.h> #include <limits.h> #include <math.h> -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include "getopt.h" #include "libiberty.h" diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog index 2f93d99..3932e81 100644 --- a/sim/mn10300/ChangeLog +++ b/sim/mn10300/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * interp.c, op_utils.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, + HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/mn10300/config.in b/sim/mn10300/config.in index 716d2bc..c9fb022 100644 --- a/sim/mn10300/config.in +++ b/sim/mn10300/config.in @@ -22,9 +22,6 @@ /* Define if dv-sockser is usable. */ #undef HAVE_DV_SOCKSER -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the `execv' function. */ #undef HAVE_EXECV @@ -151,9 +148,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/mn10300/configure b/sim/mn10300/configure index b8c4ab0..6604a3a 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 7f0655f..418f3f0 100644 --- a/sim/mn10300/interp.c +++ b/sim/mn10300/interp.c @@ -8,18 +8,8 @@ #include "bfd.h" #include "sim-assert.h" - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include "bfd.h" diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c index 67bf9a3..a696cdb 100644 --- a/sim/mn10300/op_utils.c +++ b/sim/mn10300/op_utils.c @@ -5,22 +5,11 @@ #ifdef HAVE_UTIME_H #include <utime.h> #endif - -#ifdef HAVE_TIME_H #include <time.h> -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include <sys/stat.h> #include <sys/times.h> #include <sys/time.h> diff --git a/sim/moxie/ChangeLog b/sim/moxie/ChangeLog index 00ad7a7..c01b323 100644 --- a/sim/moxie/ChangeLog +++ b/sim/moxie/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/moxie/config.in b/sim/moxie/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/moxie/config.in +++ b/sim/moxie/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/moxie/configure b/sim/moxie/configure index 7cf3c12..d500eef 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 1f1a0c4..974e59e 100644 --- a/sim/msp430/ChangeLog +++ b/sim/msp430/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/msp430/config.in b/sim/msp430/config.in index 2be193d..e4894c4 100644 --- a/sim/msp430/config.in +++ b/sim/msp430/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -133,9 +130,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/msp430/configure b/sim/msp430/configure index 683c79f..654492c 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 83f9817..89cf42a 100644 --- a/sim/or1k/ChangeLog +++ b/sim/or1k/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * sim-if.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, HAVE_STDLIB_H, + and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/or1k/config.in b/sim/or1k/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/or1k/config.in +++ b/sim/or1k/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/or1k/configure b/sim/or1k/configure index 8fc5d62..538011c 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 18f7038..b5258a8 100644 --- a/sim/or1k/sim-if.c +++ b/sim/or1k/sim-if.c @@ -21,16 +21,8 @@ #include "libiberty.h" #include "bfd.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif static void free_state (SIM_DESC); diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 625afec..6906cc2 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,21 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * configure.ac: Delete checks for stdlib.h, string.h, + strings.h, and time.h. + * config.in, configure: Regenerate. + * cpu.c, debug.c, device.c, device_table.c, device_table.h, + dgen.c, emul_bugapi.c, emul_chirp.c, emul_netbsd.c, emul_unix.c, + filter.c, hw_com.c, hw_eeprom.c, hw_nvram.c, hw_opic.c, hw_pal.c, + hw_phb.c, hw_sem.c, hw_shm.c, lf.c, main.c, misc.c, misc.h, + mon.c, pk_disklabel.c, psim.c, registers.c, sim_calls.c, table.c, + tree.c: Delete HAVE_ERRNO_H, HAVE_STDLIB_H, HAVE_STRING_H, + HAVE_STRINGS_H, HAVE_LIMITS_H, HAVE_TIME_H, and strings.h include. + * hw_nvram.c: Likewise. + (_hw_nvram_device): Always define host_time as time_t. + (hw_nvram_update_clock): Delete error fallback. + * gen-model.c (gen_model_c): Delete HAVE_STDLIB_H output. + + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/ppc/config.in b/sim/ppc/config.in index e157e9f..1a256d9 100644 --- a/sim/ppc/config.in +++ b/sim/ppc/config.in @@ -261,9 +261,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ #undef HAVE_TM_ZONE diff --git a/sim/ppc/configure b/sim/ppc/configure index 9934d2a..108c92a 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 ee52bba..9bc1057 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 c7e8bdf..3169553 100644 --- a/sim/ppc/cpu.c +++ b/sim/ppc/cpu.c @@ -26,13 +26,7 @@ #include "cpu.h" #include "idecode.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif struct _cpu { diff --git a/sim/ppc/debug.c b/sim/ppc/debug.c index 1ec279b..dba1425 100644 --- a/sim/ppc/debug.c +++ b/sim/ppc/debug.c @@ -24,12 +24,8 @@ #include "config.h" #include "basics.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif -#ifdef HAVE_STRING_H #include <string.h> -#endif int ppc_trace[nr_trace_options]; diff --git a/sim/ppc/device.c b/sim/ppc/device.c index d5093bb..6a0209e 100644 --- a/sim/ppc/device.c +++ b/sim/ppc/device.c @@ -29,18 +29,8 @@ #include "events.h" #include "psim.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #include <ctype.h> STATIC_INLINE_DEVICE (void) clean_device_properties(device *); diff --git a/sim/ppc/device_table.c b/sim/ppc/device_table.c index d2c6195..7d8fabd 100644 --- a/sim/ppc/device_table.c +++ b/sim/ppc/device_table.c @@ -23,10 +23,7 @@ #include "device_table.h" -#if HAVE_STDLIB_H #include <stdlib.h> -#endif - #include <ctype.h> diff --git a/sim/ppc/device_table.h b/sim/ppc/device_table.h index 654ecad..b61f4bd 100644 --- a/sim/ppc/device_table.h +++ b/sim/ppc/device_table.h @@ -25,13 +25,7 @@ #include "device.h" #include "tree.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif typedef struct _device_callbacks device_callbacks; diff --git a/sim/ppc/dgen.c b/sim/ppc/dgen.c index 8e8f5fb..9437944 100644 --- a/sim/ppc/dgen.c +++ b/sim/ppc/dgen.c @@ -34,18 +34,8 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif /****************************************************************/ diff --git a/sim/ppc/emul_bugapi.c b/sim/ppc/emul_bugapi.c index 8481b6f..c3c607b 100644 --- a/sim/ppc/emul_bugapi.c +++ b/sim/ppc/emul_bugapi.c @@ -30,18 +30,8 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif /* EMULATION diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c index f326410..d4214f5 100644 --- a/sim/ppc/emul_chirp.c +++ b/sim/ppc/emul_chirp.c @@ -27,14 +27,7 @@ #include "emul_generic.h" #include "emul_chirp.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c index 0bda20e..0135a93 100644 --- a/sim/ppc/emul_netbsd.c +++ b/sim/ppc/emul_netbsd.c @@ -28,14 +28,7 @@ #include "emul_generic.h" #include "emul_netbsd.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> @@ -82,9 +75,7 @@ int getrusage(); #include <unistd.h> #endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #define WITH_NetBSD_HOST (NetBSD >= 199306) #if WITH_NetBSD_HOST /* here NetBSD as that is what we're emulating */ diff --git a/sim/ppc/emul_unix.c b/sim/ppc/emul_unix.c index 3a1c245..92c3c1e 100644 --- a/sim/ppc/emul_unix.c +++ b/sim/ppc/emul_unix.c @@ -28,14 +28,7 @@ #include "emul_generic.h" #include "emul_unix.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif @@ -130,9 +123,7 @@ int getrusage(); #include <unistd.h> #endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #if defined(BSD) && !defined(errno) && (BSD < 199306) /* here BSD as just a bug */ extern int errno; diff --git a/sim/ppc/filter.c b/sim/ppc/filter.c index 7aa6a55..a202427 100644 --- a/sim/ppc/filter.c +++ b/sim/ppc/filter.c @@ -22,13 +22,7 @@ #include "build-config.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include "misc.h" #include "filter.h" diff --git a/sim/ppc/gen-model.c b/sim/ppc/gen-model.c index 00f2b02..a591d31 100644 --- a/sim/ppc/gen-model.c +++ b/sim/ppc/gen-model.c @@ -244,9 +244,7 @@ gen_model_c(insn_table *table, lf *file) lf_printf(file, "#include \"cpu.h\"\n"); lf_printf(file, "#include \"mon.h\"\n"); lf_printf(file, "\n"); - lf_printf(file, "#ifdef HAVE_STDLIB_H\n"); lf_printf(file, "#include <stdlib.h>\n"); - lf_printf(file, "#endif\n"); lf_printf(file, "\n"); for(insn_ptr = model_data; insn_ptr; insn_ptr = insn_ptr->next) { diff --git a/sim/ppc/hw_com.c b/sim/ppc/hw_com.c index 38d6d85..4ffd732 100644 --- a/sim/ppc/hw_com.c +++ b/sim/ppc/hw_com.c @@ -27,20 +27,11 @@ #include "device_table.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif /* DEVICE diff --git a/sim/ppc/hw_eeprom.c b/sim/ppc/hw_eeprom.c index 3406be9..b0a3ac6 100644 --- a/sim/ppc/hw_eeprom.c +++ b/sim/ppc/hw_eeprom.c @@ -23,13 +23,7 @@ #include "device_table.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif /* DEVICE diff --git a/sim/ppc/hw_nvram.c b/sim/ppc/hw_nvram.c index f8caaa8..0580dcc 100644 --- a/sim/ppc/hw_nvram.c +++ b/sim/ppc/hw_nvram.c @@ -27,17 +27,8 @@ #include "device_table.h" -#ifdef HAVE_TIME_H #include <time.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif /* DEVICE @@ -73,11 +64,7 @@ typedef struct _hw_nvram_device { unsigned8 *memory; unsigned sizeof_memory; -#ifdef HAVE_TIME_H time_t host_time; -#else - long host_time; -#endif unsigned timezone; /* useful */ unsigned addr_year; @@ -177,7 +164,6 @@ static void hw_nvram_update_clock(hw_nvram_device *nvram, cpu *processor) { -#ifdef HAVE_TIME_H if (!(nvram->memory[nvram->addr_control] & 0xc0)) { time_t host_time = time(NULL); if (nvram->host_time != host_time) { @@ -193,9 +179,6 @@ hw_nvram_update_clock(hw_nvram_device *nvram, nvram->memory[nvram->addr_seconds] = hw_nvram_bcd(clock->tm_sec); } } -#else - error("fixme - where do I find out GMT\n"); -#endif } static void diff --git a/sim/ppc/hw_opic.c b/sim/ppc/hw_opic.c index 69d956b..8afe312 100644 --- a/sim/ppc/hw_opic.c +++ b/sim/ppc/hw_opic.c @@ -23,13 +23,7 @@ #include "device_table.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif /* DEVICE diff --git a/sim/ppc/hw_pal.c b/sim/ppc/hw_pal.c index 0789929..8b07709 100644 --- a/sim/ppc/hw_pal.c +++ b/sim/ppc/hw_pal.c @@ -29,20 +29,11 @@ #include "cpu.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif /* DEVICE diff --git a/sim/ppc/hw_phb.c b/sim/ppc/hw_phb.c index 8e3fb17..08defc2 100644 --- a/sim/ppc/hw_phb.c +++ b/sim/ppc/hw_phb.c @@ -27,10 +27,7 @@ #include "corefile.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - #include <ctype.h> diff --git a/sim/ppc/hw_sem.c b/sim/ppc/hw_sem.c index f1c3295..5f35952 100644 --- a/sim/ppc/hw_sem.c +++ b/sim/ppc/hw_sem.c @@ -23,14 +23,7 @@ #include "device_table.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #include <sys/ipc.h> #include <sys/sem.h> diff --git a/sim/ppc/hw_shm.c b/sim/ppc/hw_shm.c index 3128871..f2fa144 100644 --- a/sim/ppc/hw_shm.c +++ b/sim/ppc/hw_shm.c @@ -23,14 +23,7 @@ #include "device_table.h" -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #include <sys/ipc.h> #include <sys/shm.h> diff --git a/sim/ppc/lf.c b/sim/ppc/lf.c index 1794a27..a3815a8 100644 --- a/sim/ppc/lf.c +++ b/sim/ppc/lf.c @@ -26,17 +26,8 @@ #include "misc.h" #include "lf.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif struct _lf { FILE *stream; diff --git a/sim/ppc/main.c b/sim/ppc/main.c index 667c02f..1e73444 100644 --- a/sim/ppc/main.c +++ b/sim/ppc/main.c @@ -33,22 +33,11 @@ #include "gdb/callback.h" #include "gdb/remote-sim.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #include <errno.h> #if !defined(O_NDELAY) || !defined(F_GETFL) || !defined(F_SETFL) diff --git a/sim/ppc/misc.c b/sim/ppc/misc.c index 8c21bd3..6de3cf9 100644 --- a/sim/ppc/misc.c +++ b/sim/ppc/misc.c @@ -25,17 +25,8 @@ #include "build-config.h" #include "misc.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif void error (char *msg, ...) diff --git a/sim/ppc/misc.h b/sim/ppc/misc.h index 232f2ea..c080ae2 100644 --- a/sim/ppc/misc.h +++ b/sim/ppc/misc.h @@ -24,18 +24,8 @@ #include <stdio.h> #include <ctype.h> - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #if !defined (__attribute__) && (!defined(__GNUC__) || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)) #define __attribute__(arg) diff --git a/sim/ppc/mon.c b/sim/ppc/mon.c index 8235b66..452cd19 100644 --- a/sim/ppc/mon.c +++ b/sim/ppc/mon.c @@ -26,30 +26,15 @@ #include "mon.h" #include <stdio.h> -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif - -#ifdef HAVE_TIME_H #include <time.h> -#endif - #ifdef HAVE_SYS_TIMES_H #include <sys/times.h> #endif diff --git a/sim/ppc/pk_disklabel.c b/sim/ppc/pk_disklabel.c index fb820fd..d424c04 100644 --- a/sim/ppc/pk_disklabel.c +++ b/sim/ppc/pk_disklabel.c @@ -29,11 +29,7 @@ #include "pk.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - - /* PACKAGE diff --git a/sim/ppc/psim.c b/sim/ppc/psim.c index 3e322e3..ebb9cb4 100644 --- a/sim/ppc/psim.c +++ b/sim/ppc/psim.c @@ -31,21 +31,9 @@ #include <stdio.h> #include <ctype.h> - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - #include <setjmp.h> - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #include "bfd.h" #include "libiberty.h" diff --git a/sim/ppc/registers.c b/sim/ppc/registers.c index b672f99..2bab55a 100644 --- a/sim/ppc/registers.c +++ b/sim/ppc/registers.c @@ -26,18 +26,8 @@ #include "basics.h" #include "registers.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - INLINE_REGISTERS\ (void) diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index 0a209bf..c8364f0 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -27,17 +27,8 @@ #undef printf_filtered /* blow away the mapping */ -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include "libiberty.h" #include "bfd.h" diff --git a/sim/ppc/table.c b/sim/ppc/table.c index 43c7462..3c7e446 100644 --- a/sim/ppc/table.c +++ b/sim/ppc/table.c @@ -32,10 +32,7 @@ #ifdef HAVE_UNISTD_H #include <unistd.h> #endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif typedef struct _open_table open_table; struct _open_table { diff --git a/sim/ppc/tree.c b/sim/ppc/tree.c index 5d20bf4..a0e0820 100644 --- a/sim/ppc/tree.c +++ b/sim/ppc/tree.c @@ -29,19 +29,8 @@ #include "device.h" #include "tree.h" - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - #include <ctype.h> #include "libiberty.h" diff --git a/sim/pru/ChangeLog b/sim/pru/ChangeLog index 620b50f..ce8ca2a 100644 --- a/sim/pru/ChangeLog +++ b/sim/pru/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure.ac (AC_PREREQ): Delete. diff --git a/sim/pru/config.in b/sim/pru/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/pru/config.in +++ b/sim/pru/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/pru/configure b/sim/pru/configure index 1bcb7b4..3eb9c87 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 936e7b7..8944ad4 100644 --- a/sim/rl78/ChangeLog +++ b/sim/rl78/ChangeLog @@ -1,3 +1,7 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/rl78/config.in b/sim/rl78/config.in index 2be193d..e4894c4 100644 --- a/sim/rl78/config.in +++ b/sim/rl78/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -133,9 +130,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/rl78/configure b/sim/rl78/configure index e9fe113..24de7d6 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 e5896c2..79b4e99 100644 --- a/sim/rx/ChangeLog +++ b/sim/rx/ChangeLog @@ -1,3 +1,8 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * main.c: Delete HAVE_STDLIB_H. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/rx/config.in b/sim/rx/config.in index c66cab2..97caf8d 100644 --- a/sim/rx/config.in +++ b/sim/rx/config.in @@ -19,9 +19,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -139,9 +136,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/rx/configure b/sim/rx/configure index 964f9f2..447a252 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 1eac603..4a9d3ec 100644 --- a/sim/rx/main.c +++ b/sim/rx/main.c @@ -22,9 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "config.h" #include <stdio.h> #include <string.h> -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/sim/sh/ChangeLog b/sim/sh/ChangeLog index 214c45e..c3a103a 100644 --- a/sim/sh/ChangeLog +++ b/sim/sh/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, + HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/sh/config.in b/sim/sh/config.in index 7c667a1..cb5ea1b 100644 --- a/sim/sh/config.in +++ b/sim/sh/config.in @@ -13,9 +13,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the <fcntl.h> header file. */ #undef HAVE_FCNTL_H @@ -130,9 +127,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/sh/configure b/sim/sh/configure index d522be2..e781129 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 c77cf3b..872bfe2 100644 --- a/sim/sh/interp.c +++ b/sim/sh/interp.c @@ -37,24 +37,12 @@ # endif #endif -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif - -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - #ifdef HAVE_SYS_STAT_H #include <sys/stat.h> #endif -#ifdef HAVE_TIME_H #include <time.h> -#endif #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 865a288..4f2ccc7 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -1,3 +1,9 @@ +2021-01-11 Mike Frysinger <vapier@gentoo.org> + + * config.in, configure: Regenerate. + * interp.c, simops.c: Delete HAVE_STRING_H, HAVE_STRINGS_H, + HAVE_STDLIB_H, HAVE_TIME_H, and strings.h include. + 2021-01-09 Mike Frysinger <vapier@gentoo.org> * configure: Regenerate. diff --git a/sim/v850/config.in b/sim/v850/config.in index 3b86818..830d22e 100644 --- a/sim/v850/config.in +++ b/sim/v850/config.in @@ -19,9 +19,6 @@ /* Define to 1 if you have the <dlfcn.h> header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the <errno.h> header file. */ -#undef HAVE_ERRNO_H - /* Define to 1 if you have the `execv' function. */ #undef HAVE_EXECV @@ -145,9 +142,6 @@ /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME -/* Define to 1 if you have the <time.h> header file. */ -#undef HAVE_TIME_H - /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE diff --git a/sim/v850/configure b/sim/v850/configure index d2e3879..a8a5aa3 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 daf9618..10d8a67 100644 --- a/sim/v850/interp.c +++ b/sim/v850/interp.c @@ -4,17 +4,8 @@ #include "sim-assert.h" #include "itable.h" -#ifdef HAVE_STDLIB_H #include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include "bfd.h" diff --git a/sim/v850/simops.c b/sim/v850/simops.c index 40d578e..93185b6 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -7,22 +7,11 @@ #ifdef HAVE_UTIME_H #include <utime.h> #endif - -#ifdef HAVE_TIME_H #include <time.h> -#endif - #ifdef HAVE_UNISTD_H #include <unistd.h> #endif - -#ifdef HAVE_STRING_H #include <string.h> -#else -#ifdef HAVE_STRINGS_H -#include <strings.h> -#endif -#endif #include "targ-vals.h" |