This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, take 2] Fix i386-gen linking on Cygwin.


    Hi!

  Since Ralf made a start(*) on fixing the i386-gen to use $build tools, and
HJ's follow-up patch(**) to use the build CFLAGS, i386-gen.o is now compiled
with the build CC, which doesn't have all the warning flags etc., that the
target CC has.  This obviates the need (for now, at any rate) for patching the
autoconf test, but the link still fails without -lintl.

  The attached patch follows Ralf's lead in punting for now on the problem of
what to do when cross-compiling.

opcodes/ChangeLog:

	* Makefile.am (BUILD_LIBINTL): New variable.
	(i386-gen$(EXEEXT_FOR_BUILD)): Use it.
	(ia64-gen$(EXEEXT_FOR_BUILD)): And here.
	(z8kgen$(EXEEXT_FOR_BUILD)): And here.
	* Makefile.in: Regenerate.

  OTOH if we're about to fix the larger problem, it would be better for me to
roll something that fits well with whatever we do there; Ralf, is there a
plan?  Otherwise, is this OK to be getting on with?

    cheers,
      DaveK
-- 
(*)  - http://sourceware.org/ml/binutils/2009-08/msg00444.html
(**) - http://sourceware.org/ml/binutils/2009-08/msg00546.html
Index: opcodes/Makefile.am
===================================================================
RCS file: /cvs/src/src/opcodes/Makefile.am,v
retrieving revision 1.147
diff -p -u -r1.147 Makefile.am
--- opcodes/Makefile.am	29 Aug 2009 00:41:25 -0000	1.147
+++ opcodes/Makefile.am	31 Aug 2009 17:06:06 -0000
@@ -40,6 +40,8 @@ BFD_H = ../bfd/bfd.h
 LIBIBERTY = ../libiberty/libiberty.a
 # This is only true when not cross-compiling.
 BUILD_LIBIBERTY = $(LIBIBERTY)
+# And so is this.
+BUILD_LIBINTL = $(LIBINTL)
 
 # Header files.
 HFILES = \
@@ -455,8 +457,8 @@ MOSTLYCLEANFILES = i386-gen$(EXEEXT_FOR_
 MAINTAINERCLEANFILES = $(srcdir)/i386-tbl.h $(srcdir)/i386-init.h \
 	$(srcdir)/ia64-asmtab.c s390-opc.tab $(srcdir)/z8k-opc.h
 
-i386-gen$(EXEEXT_FOR_BUILD): i386-gen.o $(BUILD_LIBIBERTY)
-	$(LINK_FOR_BUILD) i386-gen.o $(BUILD_LIBIBERTY)
+i386-gen$(EXEEXT_FOR_BUILD): i386-gen.o $(BUILD_LIBIBERTY) $(BUILD_LIBINTL)
+	$(LINK_FOR_BUILD) i386-gen.o $(BUILD_LIBIBERTY) $(BUILD_LIBINTL)
 
 i386-gen.o: i386-gen.c i386-opc.h $(srcdir)/../include/opcode/i386.h \
 	$(INCDIR)/ansidecl.h $(INCDIR)/getopt.h $(INCDIR)/hashtab.h \
@@ -472,8 +474,8 @@ $(srcdir)/i386-init.h: @MAINT@ i386-gen$
 
 i386-opc.lo: $(srcdir)/i386-tbl.h
 
-ia64-gen$(EXEEXT_FOR_BUILD): ia64-gen.o $(BUILD_LIBIBERTY)
-	$(LINK_FOR_BUILD) ia64-gen.o $(BUILD_LIBIBERTY)
+ia64-gen$(EXEEXT_FOR_BUILD): ia64-gen.o $(BUILD_LIBIBERTY) $(BUILD_LIBINTL)
+	$(LINK_FOR_BUILD) ia64-gen.o $(BUILD_LIBIBERTY) $(BUILD_LIBINTL)
 
 ia64-gen.o: ia64-gen.c $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/getopt.h \
 	$(INCDIR)/libiberty.h $(INCDIR)/opcode/ia64.h $(INCDIR)/safe-ctype.h \
@@ -499,8 +501,8 @@ s390-opc.tab: s390-mkopc$(EXEEXT_FOR_BUI
 
 s390-opc.lo: s390-opc.tab
 
-z8kgen$(EXEEXT_FOR_BUILD): z8kgen.o $(BUILD_LIBIBERTY)
-	$(LINK_FOR_BUILD) z8kgen.o $(BUILD_LIBIBERTY)
+z8kgen$(EXEEXT_FOR_BUILD): z8kgen.o $(BUILD_LIBIBERTY) $(BUILD_LIBINTL)
+	$(LINK_FOR_BUILD) z8kgen.o $(BUILD_LIBIBERTY) $(BUILD_LIBINTL)
 
 z8kgen.o: z8kgen.c
 	$(COMPILE_FOR_BUILD) -c $(srcdir)/z8kgen.c

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]