Apply patch from Peter Targett to fix building arc-elf32 target.

This commit is contained in:
Nick Clifton
2000-11-08 00:06:34 +00:00
parent 604d524f12
commit 4a314ec807
3 changed files with 34 additions and 21 deletions

View File

@ -1,3 +1,10 @@
2000-11-07 Peter Targett <peter.targett@arccores.com>
* gas/config/tc-arc.h: Avoid warnings for LITTLE_ENDIAN and
BIG_ENDIAN macros.
* gas/config/tc-arc.c: Use S_IS_LOCAL to test local symbols.
Fix compile time warning messages.
2000-11-07 Nick Clifton <nickc@redhat.com> 2000-11-07 Nick Clifton <nickc@redhat.com>
* stabs.c (generate_asm_file): Increase length of xmalloc'ed * stabs.c (generate_asm_file): Increase length of xmalloc'ed

View File

@ -113,7 +113,7 @@ size_t md_longopts_size = sizeof (md_longopts);
int int
md_parse_option (c, arg) md_parse_option (c, arg)
int c; int c;
char *arg; char *arg ATTRIBUTE_UNUSED;
{ {
switch (c) switch (c)
{ {
@ -169,7 +169,7 @@ static void
init_opcode_tables (mach) init_opcode_tables (mach)
int mach; int mach;
{ {
register unsigned int i; int i;
char *last; char *last;
if ((arc_suffix_hash = hash_new ()) == NULL) if ((arc_suffix_hash = hash_new ()) == NULL)
@ -380,12 +380,12 @@ md_assemble (str)
/* We have an operand. Pick out any modifiers. */ /* We have an operand. Pick out any modifiers. */
mods = 0; mods = 0;
while (ARC_MOD_P (arc_operands[arc_operand_map[*syn]].flags)) while (ARC_MOD_P (arc_operands[arc_operand_map[(int) *syn]].flags))
{ {
mods |= arc_operands[arc_operand_map[*syn]].flags & ARC_MOD_BITS; mods |= arc_operands[arc_operand_map[(int) *syn]].flags & ARC_MOD_BITS;
++syn; ++syn;
} }
operand = arc_operands + arc_operand_map[*syn]; operand = arc_operands + arc_operand_map[(int) *syn];
if (operand->fmt == 0) if (operand->fmt == 0)
as_fatal (_("unknown syntax format character `%c'"), *syn); as_fatal (_("unknown syntax format character `%c'"), *syn);
@ -494,7 +494,6 @@ md_assemble (str)
else else
/* This is either a register or an expression of some kind. */ /* This is either a register or an expression of some kind. */
{ {
char c;
char *hold; char *hold;
const struct arc_operand_value *reg = NULL; const struct arc_operand_value *reg = NULL;
long value = 0; long value = 0;
@ -570,7 +569,7 @@ md_assemble (str)
(insn, operand, mods, reg, 0L, &junk); (insn, operand, mods, reg, 0L, &junk);
} }
else else
fixups[fc].opindex = arc_operand_map[*syn]; fixups[fc].opindex = arc_operand_map[(int) *syn];
++fc; ++fc;
value = 0; value = 0;
} }
@ -636,7 +635,6 @@ md_assemble (str)
int cc_set_p = 0; int cc_set_p = 0;
/* 1 if conditional branch, including `b' "branch always" */ /* 1 if conditional branch, including `b' "branch always" */
int cond_branch_p = opcode->flags & ARC_OPCODE_COND_BRANCH; int cond_branch_p = opcode->flags & ARC_OPCODE_COND_BRANCH;
int need_cc_nop_p = 0;
for (i = 0; i < num_suffixes; ++i) for (i = 0; i < num_suffixes; ++i)
{ {
@ -754,12 +752,13 @@ md_assemble (str)
static void static void
arc_common (ignore) arc_common (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
char *name; char *name;
char c; char c;
char *p; char *p;
int temp, size; int temp;
unsigned int size;
symbolS *symbolP; symbolS *symbolP;
name = input_line_pointer; name = input_line_pointer;
@ -816,14 +815,13 @@ arc_common (ignore)
temp = 0; temp = 0;
as_warn (_("Common alignment negative; 0 assumed")); as_warn (_("Common alignment negative; 0 assumed"));
} }
if (symbolP->local) if (S_IS_LOCAL(symbolP))
{ {
segT old_sec; segT old_sec;
int old_subsec; int old_subsec;
char *p; char *p;
int align; int align;
allocate_bss:
old_sec = now_seg; old_sec = now_seg;
old_subsec = now_subseg; old_subsec = now_subseg;
align = temp; align = temp;
@ -886,7 +884,7 @@ arc_common (ignore)
static void static void
arc_cpu (ignore) arc_cpu (ignore)
int ignore; int ignore ATTRIBUTE_UNUSED;
{ {
int mach; int mach;
char c; char c;
@ -1055,8 +1053,8 @@ md_section_align (segment, size)
int int
md_estimate_size_before_relax (fragp, seg) md_estimate_size_before_relax (fragp, seg)
fragS *fragp; fragS *fragp ATTRIBUTE_UNUSED;
asection *seg; asection *seg ATTRIBUTE_UNUSED;
{ {
abort (); abort ();
} }
@ -1065,9 +1063,9 @@ md_estimate_size_before_relax (fragp, seg)
void void
md_convert_frag (abfd, sec, fragp) md_convert_frag (abfd, sec, fragp)
bfd *abfd; bfd *abfd ATTRIBUTE_UNUSED;
asection *sec; asection *sec ATTRIBUTE_UNUSED;
fragS *fragp; fragS *fragp ATTRIBUTE_UNUSED;
{ {
abort (); abort ();
} }
@ -1141,7 +1139,7 @@ md_operand (expressionP)
symbolS * symbolS *
md_undefined_symbol (name) md_undefined_symbol (name)
char *name; char *name ATTRIBUTE_UNUSED;
{ {
return 0; return 0;
} }
@ -1156,7 +1154,7 @@ md_undefined_symbol (name)
void void
arc_parse_cons_expression (exp, nbytes) arc_parse_cons_expression (exp, nbytes)
expressionS *exp; expressionS *exp;
int nbytes; int nbytes ATTRIBUTE_UNUSED;
{ {
expr (0, exp); expr (0, exp);
} }
@ -1441,7 +1439,7 @@ md_apply_fix3 (fixP, valueP, seg)
arelent * arelent *
tc_gen_reloc (section, fixP) tc_gen_reloc (section, fixP)
asection *section; asection *section ATTRIBUTE_UNUSED;
fixS *fixP; fixS *fixP;
{ {
arelent *reloc; arelent *reloc;

View File

@ -27,6 +27,14 @@
#define TARGET_ARCH bfd_arch_arc #define TARGET_ARCH bfd_arch_arc
#ifdef LITTLE_ENDIAN
#undef LITTLE_ENDIAN
#endif
#ifdef BIG_ENDIAN
#undef BIG_ENDIAN
#endif
#define LITTLE_ENDIAN 1234 #define LITTLE_ENDIAN 1234
#define BIG_ENDIAN 4321 #define BIG_ENDIAN 4321