diff options
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-sparc.c | 6 | ||||
-rw-r--r-- | gas/config/tc-sparc.h | 13 |
2 files changed, 16 insertions, 3 deletions
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c index d84c273..d6a1a15 100644 --- a/gas/config/tc-sparc.c +++ b/gas/config/tc-sparc.c @@ -337,7 +337,7 @@ sparc_target_format () #endif #ifdef OBJ_ELF - return sparc_arch_size == 64 ? "elf64-sparc" : "elf32-sparc"; + return sparc_arch_size == 64 ? ELF64_TARGET_FORMAT : ELF_TARGET_FORMAT; #endif abort (); @@ -545,12 +545,12 @@ md_parse_option (c, arg) { if (sparc_arch_size == 32) { - if (strcmp (*l, "elf32-sparc") == 0) + if (CONST_STRNEQ (*l, "elf32-sparc")) break; } else { - if (strcmp (*l, "elf64-sparc") == 0) + if (CONST_STRNEQ (*l, "elf64-sparc")) break; } } diff --git a/gas/config/tc-sparc.h b/gas/config/tc-sparc.h index 3feac4f..3318ddd 100644 --- a/gas/config/tc-sparc.h +++ b/gas/config/tc-sparc.h @@ -31,6 +31,19 @@ struct frag; #define TARGET_ARCH bfd_arch_sparc +#ifdef TE_FreeBSD +#define ELF_TARGET_FORMAT "elf32-sparc-freebsd" +#define ELF64_TARGET_FORMAT "elf64-sparc-freebsd" +#endif + +#ifndef ELF_TARGET_FORMAT +#define ELF_TARGET_FORMAT "elf32-sparc" +#endif + +#ifndef ELF64_TARGET_FORMAT +#define ELF64_TARGET_FORMAT "elf64-sparc" +#endif + extern const char *sparc_target_format PARAMS ((void)); #define TARGET_FORMAT sparc_target_format () |