This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Two fixes for opcodes/i386-gen on cygwin.
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 24 Aug 2009 23:09:43 +0100
- Subject: Re: [PATCH] Two fixes for opcodes/i386-gen on cygwin.
- References: <4A9200DC.1060401@gmail.com> <4A92B4B6.50600@redhat.com>
Nick Clifton wrote:
> Hi Dave,
>
>> opcodes/ChangeLog:
>>
>> * configure.in (for a known getopt prototype in unistd.h): Add test.
>> * Makefile.am (i386-gen): Add $(LIBINTL).
>> (ia64-gen): Likewise.
>> * Makefile.in: Regenerate.
>> * config.in: Likewise.
>> * configure: Likewise.
>>
>> Built and tested on i686-pc-cygwin, no regressions. OK?
>
> Probably, but where is that actual patch ?
>
> Cheers
> Nick
:) See timestamp of previous post for explanation of why I forgot it.
Attached.
However as Ralf and Alan are discussing elsewhere, this is probably the
wrong approach, as these should be compiled with build rather than host tools,
so we should put this on hold while we figure out what to do there.
cheers,
DaveK
Index: opcodes/Makefile.am
===================================================================
RCS file: /cvs/src/src/opcodes/Makefile.am,v
retrieving revision 1.143
diff -p -u -r1.143 Makefile.am
--- opcodes/Makefile.am 22 Aug 2009 19:02:57 -0000 1.143
+++ opcodes/Makefile.am 24 Aug 2009 02:33:40 -0000
@@ -578,7 +578,7 @@ stamp-xc16x: $(CGENDEPS) $(CPUDIR)/xc16x
archfile=$(CPUDIR)/xc16x.cpu opcfile=$(CPUDIR)/xc16x.opc extrafiles=
i386-gen: i386-gen.o
- $(LINK) i386-gen.o $(LIBIBERTY)
+ $(LINK) i386-gen.o $(LIBIBERTY) $(LIBINTL)
$(srcdir)/i386-tbl.h: $(srcdir)/i386-init.h
@echo $@
@@ -587,7 +587,7 @@ $(srcdir)/i386-init.h: @MAINT@ i386-gen
./i386-gen --srcdir $(srcdir)
ia64-gen: ia64-gen.o
- $(LINK) ia64-gen.o $(LIBIBERTY)
+ $(LINK) ia64-gen.o $(LIBIBERTY) $(LIBINTL)
# Don't wrap the line below, as @MAINT@ can be expanded to '#'.
# Some make versions don't handle line continuations in comments.
Index: opcodes/configure.in
===================================================================
RCS file: /cvs/src/src/opcodes/configure.in,v
retrieving revision 1.92
diff -p -u -r1.92 configure.in
--- opcodes/configure.in 6 Aug 2009 17:38:04 -0000 1.92
+++ opcodes/configure.in 24 Aug 2009 02:33:42 -0000
@@ -68,6 +68,16 @@ AC_PROG_INSTALL
AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h)
+AC_MSG_CHECKING(for a known getopt prototype in unistd.h)
+AC_CACHE_VAL(ld_cv_decl_getopt_unistd_h,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>], [extern int getopt (int, char *const*, const char *);])],
+ld_cv_decl_getopt_unistd_h=yes, ld_cv_decl_getopt_unistd_h=no)])
+AC_MSG_RESULT($ld_cv_decl_getopt_unistd_h)
+if test $ld_cv_decl_getopt_unistd_h = yes; then
+ AC_DEFINE([HAVE_DECL_GETOPT], 1,
+ [Is the prototype for getopt in <unistd.h> in the expected format?])
+fi
+
AC_CHECK_DECLS([basename, stpcpy])
cgen_maint=no