From 0561d57c86bcec2cb9203d682a636928a6ea1352 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Mon, 10 Aug 2009 21:32:26 +0000 Subject: [PATCH] gas/ Fix compilation of i386-*-go32. * config/tc-i386.c (i386_target_format ): New. (i386_target_format ): Compile only if !TE_GO32. * config/te-go32.h (TARGET_FORMAT): Move the definition ... * config/tc-i386.h : ... here. --- gas/ChangeLog | 8 ++++++++ gas/config/tc-i386.c | 5 ++++- gas/config/tc-i386.h | 3 +++ gas/config/te-go32.h | 2 -- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 0ad79fda556..32d3562ad48 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2009-08-10 Jan Kratochvil + + Fix compilation of i386-*-go32. + * config/tc-i386.c (i386_target_format ): New. + (i386_target_format ): Compile only if !TE_GO32. + * config/te-go32.h (TARGET_FORMAT): Move the definition ... + * config/tc-i386.h : ... here. + 2009-08-10 Daniel Gutson PR gas/10479 diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 4109dd9e02c..86e55bf9991 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 b51a9f480e8..3d89a32c190 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 d70cd03afa8..bdfcb4bb908 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 -- 2.30.2