Build problem with gas/dw2gencfi.c
Alan Modra
amodra@bigpond.net.au
Tue May 20 11:39:00 GMT 2003
On Tue, May 20, 2003 at 12:54:20PM +0200, Hans-Peter Nilsson wrote:
> My autobuilder complains, starting 2003-05-20 07:43:31 UTC.
> It's likely that you don't see this if you use gcc >= 3.0,
Yeah, but I did see that I managed to break powerpc-linux with
tc_regname_to_dw2regnum not available. Fixed with the following.
* dw2gencfi.c (cfi_parse_arg): Only use tc_regname_to_dw2regnum if
defined.
(dot_cfi_endproc): Avoid C99 construct.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
Index: gas/dw2gencfi.c
===================================================================
RCS file: /cvs/src/src/gas/dw2gencfi.c,v
retrieving revision 1.1
diff -u -p -r1.1 dw2gencfi.c
--- gas/dw2gencfi.c 20 May 2003 07:58:06 -0000 1.1
+++ gas/dw2gencfi.c 20 May 2003 11:34:06 -0000
@@ -125,7 +125,6 @@ alloc_cfi_info (void)
static int
cfi_parse_arg (long *param, int resolvereg)
{
- char *name, c, *p;
long value;
int retval = -1;
int nchars;
@@ -138,8 +137,11 @@ cfi_parse_arg (long *param, int resolver
input_line_pointer += nchars;
retval = 1;
}
+#ifdef tc_regname_to_dw2regnum
else if (resolvereg && (is_name_beginner (*input_line_pointer)))
{
+ char *name, c, *p;
+
name = input_line_pointer;
c = get_symbol_end ();
p = input_line_pointer;
@@ -149,6 +151,7 @@ cfi_parse_arg (long *param, int resolver
*p = c;
}
+#endif
else
as_bad (resolvereg ?
_("can't convert argument to a register number") :
@@ -539,6 +542,7 @@ dot_cfi_endproc (void)
unsigned long buf_size, cie_size, fde_size, last_cie_offset;
unsigned long fde_initloc_offset, fde_len_offset;
void *saved_seg, *cfi_seg;
+ expressionS exp;
if (! cfi_info)
{
@@ -653,7 +657,6 @@ dot_cfi_endproc (void)
/* Set relocation for initial address. */
buf_size = current_config.addr_length;
- expressionS exp;
memset (&exp, 0, sizeof (exp));
exp.X_op = O_symbol;
exp.X_add_symbol = symbol_find (cfi_info->labelname);
More information about the Binutils
mailing list