This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[Xtensa] fix GAS build with GCC 4.3
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Date: Fri, 04 Apr 2008 16:26:15 -0700
- Subject: [Xtensa] fix GAS build with GCC 4.3
H.J. forwarded to me a patch from Adrian Bunk to fix a problem building GAS for
Xtensa with GCC 4.3. There was a missing return code check that caused a
warning, which was fatal with -Werror. I simplified the patch slightly and
committed it after verifying that I could build all of binutils for an
xtensa-elf target with GCC 4.3.
Thanks Adrian and H.J.
2008-04-04 Adrian Bunk <bunk@stusta.de>
Bob Wilson <bob.wilson@acm.org>
* config/tc-xtensa.c (xg_apply_fix_value): Check return code from
call to decode_reloc.
Index: config/tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.99
diff -u -p -r1.99 tc-xtensa.c
--- config/tc-xtensa.c 3 Mar 2008 23:23:41 -0000 1.99
+++ config/tc-xtensa.c 4 Apr 2008 23:18:01 -0000
@@ -4969,8 +4969,8 @@ xg_apply_fix_value (fixS *fixP, valueT v
xtensa_opcode opcode;
char *const fixpos = fixP->fx_frag->fr_literal + fixP->fx_where;
- (void) decode_reloc (fixP->fx_r_type, &slot, &alt_reloc);
- if (alt_reloc)
+ if (decode_reloc (fixP->fx_r_type, &slot, &alt_reloc)
+ || alt_reloc)
as_fatal (_("unexpected fix"));
if (!insnbuf)