This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: binutils breaks on x64-pc-mingw32
- From: "H.J. Lu" <hjl at lucon dot org>
- To: NightStrike <nightstrike at gmail dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 29 Aug 2007 21:07:47 -0700
- Subject: PATCH: binutils breaks on x64-pc-mingw32
- References: <b609cb3b0708291653l20f8eec9s3285fd9a6f44b009@mail.gmail.com>
On Wed, Aug 29, 2007 at 07:53:25PM -0400, NightStrike wrote:
> H. J. Lu,
>
> I noticed that you checked in a number of patches recently that make
> changes in i386-dis.c. The current version of binutils from cvs no
> longer builds with the following error:
>
> $ ../src/configure --target=x86_64-pc-mingw32 --prefix=/cygdrive/m
> --with-sysroot=/cygdrive/m --disable-nls > /dev/null
> $ make > /dev/null
> libtool: link: warning: undefined symbols not allowed in
> i686-pc-cygwin shared libraries
> ../../src/opcodes/i386-dis.c: In function `print_insn':
> ../../src/opcodes/i386-dis.c:3934: warning: implicit declaration of
> function `stpcpy'
> make[4]: *** [i386-dis.lo] Error 1
> make[3]: *** [all-recursive] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-opcodes] Error 2
> make: *** [all] Error 2
>
Can you try this patch?
H.J.
---
2007-08-29 H.J. Lu <hongjiu.lu@intel.com>
* configure.in (AC_GNU_SOURCE): Added.
(AC_CHECK_DECLS): Add stpcpy.
* config.in: Regenerated.
* configure: Likewise.
--- opcodes/config.in.str 2007-07-02 06:54:31.000000000 -0700
+++ opcodes/config.in 2007-08-29 18:24:36.000000000 -0700
@@ -8,6 +8,10 @@
don't. */
#undef HAVE_DECL_BASENAME
+/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't.
+ */
+#undef HAVE_DECL_STPCPY
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
--- opcodes/configure.in.str 2007-06-30 09:28:12.000000000 -0700
+++ opcodes/configure.in 2007-08-29 19:27:42.000000000 -0700
@@ -17,6 +17,8 @@ changequote([,])dnl
AM_INIT_AUTOMAKE(opcodes, ${BFD_VERSION})
+AC_GNU_SOURCE
+
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
AC_CHECK_TOOL(AR, ar)
@@ -73,7 +75,7 @@ AC_PROG_INSTALL
AC_CHECK_HEADERS(string.h strings.h stdlib.h)
-AC_CHECK_DECLS(basename)
+AC_CHECK_DECLS([basename, stpcpy])
cgen_maint=no
cgendir='$(srcdir)/../cgen'