This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch 1/4] Fix compilation for i386-unknown-go32 with secondary as elf
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: binutils at sourceware dot org
- Date: Sun, 9 Aug 2009 23:39:55 +0200
- Subject: [patch 1/4] Fix compilation for i386-unknown-go32 with secondary as elf
Hi,
CFLAGS=-g ./configure --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=i386-unknown-go32 --enable-targets=i386-unknown-linux-gnu
make
gas/
In file included from ./targ-cpu.h:1,
from .././gas/config/obj-multi.h:30,
from ./obj-format.h:1,
from .././gas/config/te-go32.h:33,
from targ-env.h:1,
from as.h:563,
from app.c:29:
.././gas/config/tc-i386.h:82:1: error: "TARGET_FORMAT" redefined
In file included from targ-env.h:1,
from as.h:563,
from app.c:29:
.././gas/config/te-go32.h:25:1: error: this is the location of the previous definition
This patch is probably not required for the GDB regression. Still it breaks
the binutils regression testsuite runs of mine.
Also the result of this patch was not well checked as gas looks to build fine
even without TARGET_FORMAT defined.
Thanks,
Jan
gas/
2009-08-09 Jan Kratochvil <jan.kratochvil@redhat.com>
Fix compilation of i386-*-go32.
* config/tc-i386.c (i386_target_format <TE_GO32>): New.
(i386_target_format <OBJ_MAYBE_COFF>): Compile only if !TE_GO32.
* config/te-go32.h (TARGET_FORMAT): Move the definition to ...
* config/tc-i386.h <!i386_target_format>: ... here.
--- gas/config/tc-i386.c 29 Jul 2009 06:22:12 -0000 1.388
+++ gas/config/tc-i386.c 9 Aug 2009 17:22:02 -0000
@@ -8087,7 +8087,10 @@ i386_target_format (void)
case bfd_target_aout_flavour:
return AOUT_TARGET_FORMAT;
#endif
-#ifdef OBJ_MAYBE_COFF
+#ifdef TE_GO32
+ case bfd_target_coff_flavour:
+ return "coff-go32";
+#elif defined (OBJ_MAYBE_COFF)
case bfd_target_coff_flavour:
return "coff-i386";
#endif
--- gas/config/tc-i386.h 29 Jul 2009 06:22:13 -0000 1.108
+++ gas/config/tc-i386.h 9 Aug 2009 17:22:02 -0000
@@ -81,6 +81,9 @@ extern unsigned long i386_mach (void);
extern const char *i386_target_format (void);
#define TARGET_FORMAT i386_target_format ()
#else
+#ifdef TE_GO32
+#define TARGET_FORMAT "coff-go32"
+#endif
#ifdef OBJ_AOUT
#define TARGET_FORMAT AOUT_TARGET_FORMAT
#endif
--- gas/config/te-go32.h 3 Jul 2007 11:01:05 -0000 1.4
+++ gas/config/te-go32.h 9 Aug 2009 17:22:02 -0000
@@ -22,8 +22,6 @@
#define LOCAL_LABELS_DOLLAR 1
#define LOCAL_LABELS_FB 1
-#define TARGET_FORMAT "coff-go32"
-
/* GAS should treat '.align value' as an alignment of 2**value. */
#define USE_ALIGN_PTWO