aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2009-08-10 21:32:26 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2009-08-10 21:32:26 +0000
commit0561d57c86bcec2cb9203d682a636928a6ea1352 (patch)
tree04d2c4487f5201995b320b9ff0591699438c9ba0
parent3aad21cf47cf21a777acc6dbd0853049976eb219 (diff)
downloadgdb-0561d57c86bcec2cb9203d682a636928a6ea1352.zip
gdb-0561d57c86bcec2cb9203d682a636928a6ea1352.tar.gz
gdb-0561d57c86bcec2cb9203d682a636928a6ea1352.tar.bz2
gas/
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 ... * config/tc-i386.h <!i386_target_format>: ... here.
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-i386.c5
-rw-r--r--gas/config/tc-i386.h3
-rw-r--r--gas/config/te-go32.h2
4 files changed, 15 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0ad79fd..32d3562 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2009-08-10 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 ...
+ * config/tc-i386.h <!i386_target_format>: ... here.
+
2009-08-10 Daniel Gutson <dgutson@codesourcery.com>
PR gas/10479
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 4109dd9..86e55bf 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -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
diff --git a/gas/config/tc-i386.h b/gas/config/tc-i386.h
index b51a9f4..3d89a32 100644
--- a/gas/config/tc-i386.h
+++ b/gas/config/tc-i386.h
@@ -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
diff --git a/gas/config/te-go32.h b/gas/config/te-go32.h
index d70cd03..bdfcb4b 100644
--- a/gas/config/te-go32.h
+++ b/gas/config/te-go32.h
@@ -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