PR26328, Compilation warning when building ld v2.35 with MinGW
authorAlan Modra <amodra@gmail.com>
Mon, 3 Aug 2020 01:28:11 +0000 (10:58 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 3 Aug 2020 01:28:39 +0000 (10:58 +0930)
PR 26328
* configure.ac: AC_CHECK_DECLS asprintf.
* configure: Regenerate.
* config.in: Regenerate.

ld/ChangeLog
ld/config.in
ld/configure
ld/configure.ac

index edde902940c4d7e186b3f0a2e053e309eb519c10..eeee6d08a6cfbf1008bc149a9ebb22e55e06664c 100644 (file)
@@ -1,3 +1,10 @@
+2020-08-03  Alan Modra  <amodra@gmail.com>
+
+       PR 26328
+       * configure.ac: AC_CHECK_DECLS asprintf.
+       * configure: Regenerate.
+       * config.in: Regenerate.
+
 2020-08-03  Alan Modra  <amodra@gmail.com>
 
        * testsuite/ld-elfvers/vers.exp (objdump_symstuff): Remove unused
index f17121073679759f95d38720c5fee9cdddebef68..2f4e5ea33e36b8f9d3bdde991d637ee5e1b76cb7 100644 (file)
 /* Define to 1 if you have the `close' function. */
 #undef HAVE_CLOSE
 
+/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
+   don't. */
+#undef HAVE_DECL_ASPRINTF
+
 /* Define to 1 if you have the declaration of `environ', and to 0 if you
    don't. */
 #undef HAVE_DECL_ENVIRON
index d2df419414e24bfb8918a14ad67c2418a783bfb5..b0b92a3cbfb6b20e4c79b41fa5e4314481dd8a88 100755 (executable)
@@ -17416,35 +17416,35 @@ $as_echo "#define USE_BINARY_FOPEN 1" >>confdefs.h
  ;;
 esac
 
-ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
-if test "x$ac_cv_have_decl_strstr" = xyes; then :
+ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_asprintf" = xyes; then :
   ac_have_decl=1
 else
   ac_have_decl=0
 fi
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRSTR $ac_have_decl
+#define HAVE_DECL_ASPRINTF $ac_have_decl
 _ACEOF
-ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
-if test "x$ac_cv_have_decl_free" = xyes; then :
+ac_fn_c_check_decl "$LINENO" "environ" "ac_cv_have_decl_environ" "$ac_includes_default"
+if test "x$ac_cv_have_decl_environ" = xyes; then :
   ac_have_decl=1
 else
   ac_have_decl=0
 fi
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FREE $ac_have_decl
+#define HAVE_DECL_ENVIRON $ac_have_decl
 _ACEOF
-ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default"
-if test "x$ac_cv_have_decl_sbrk" = xyes; then :
+ac_fn_c_check_decl "$LINENO" "free" "ac_cv_have_decl_free" "$ac_includes_default"
+if test "x$ac_cv_have_decl_free" = xyes; then :
   ac_have_decl=1
 else
   ac_have_decl=0
 fi
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SBRK $ac_have_decl
+#define HAVE_DECL_FREE $ac_have_decl
 _ACEOF
 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
 if test "x$ac_cv_have_decl_getenv" = xyes; then :
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_GETENV $ac_have_decl
 _ACEOF
-ac_fn_c_check_decl "$LINENO" "environ" "ac_cv_have_decl_environ" "$ac_includes_default"
-if test "x$ac_cv_have_decl_environ" = xyes; then :
+ac_fn_c_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default"
+if test "x$ac_cv_have_decl_sbrk" = xyes; then :
   ac_have_decl=1
 else
   ac_have_decl=0
 fi
 
 cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_ENVIRON $ac_have_decl
+#define HAVE_DECL_SBRK $ac_have_decl
+_ACEOF
+ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strstr" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSTR $ac_have_decl
 _ACEOF
 
 
index 5ef25e3eb88aba0e55e6cbb60c9789f031063e19..74bcdfec36dbc4a02747e5b52c4a0cd1925bc1af 100644 (file)
@@ -306,7 +306,7 @@ fi
 
 BFD_BINARY_FOPEN
 
-AC_CHECK_DECLS([strstr, free, sbrk, getenv, environ])
+AC_CHECK_DECLS([asprintf, environ, free, getenv, sbrk, strstr])
 
 # Link in zlib if we can.  This allows us to read and write
 # compressed CTF sections.