public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] PR 25611, PR 25614: GAS: Remove a double inclusion of "bignum.h"
@ 2020-03-31 15:17 Maciej W. Rozycki
  2020-03-31 21:44 ` Alan Modra
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej W. Rozycki @ 2020-03-31 15:17 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils

Correct an issue with commit 5496f3c635dc ("Add support for generating 
DWARF-5 format directory and file name tables from the assembler.") and
remove a duplicate direct inclusion of "bignum.h" from dwarf2dbg.c that 
causes a GAS compilation error:

In file included from .../gas/dwarf2dbg.c:33:
.../gas/bignum.h:42: error: redefinition of typedef 'LITTLENUM_TYPE'
.../gas/bignum.h:42: error: previous declaration of 'LITTLENUM_TYPE' was here
make[4]: *** [dwarf2dbg.o] Error 1

with some GCC versions, as this header has been already included via 
"as.h" and then "flonum.h".

	gas/
	PR 25611
	PR 25614
	* dwarf2dbg.c: Do not include "bignum.h".
---
On Wed, 11 Mar 2020, Nick Clifton via Binutils wrote:

>   I am applying the attached patch to add support for DWARF-5
>   .debug_line sections.  DWARF v5 changes the format of the
>   section's header so that the layout of the directory table and the
>   file table are explicitly specified.  This allow for extra fields
>   and also the possibility of reducing the size of the tables by not
>   storing unneeded fields.

 This change broke GAS compilation across all targets in my configuration, 
due to this error:

In file included from .../gas/dwarf2dbg.c:33:
.../gas/bignum.h:42: error: redefinition of typedef 'LITTLENUM_TYPE'
.../gas/bignum.h:42: error: previous declaration of 'LITTLENUM_TYPE' was here
make[4]: *** [dwarf2dbg.o] Error 1

This is due to a double inclusion of "bignum.h", which is not prepared for 
such use, once via "as.h" and then "flonum.h", and again directly.

 OK to apply this hopefully obvious fix?

  Maciej
---
 gas/dwarf2dbg.c |    1 -
 1 file changed, 1 deletion(-)

binutils-gas-dwarf2dbg-bignum.diff
Index: binutils/gas/dwarf2dbg.c
===================================================================
--- binutils.orig/gas/dwarf2dbg.c
+++ binutils/gas/dwarf2dbg.c
@@ -30,7 +30,6 @@
 
 #include "as.h"
 #include "safe-ctype.h"
-#include "bignum.h"
 
 #ifdef HAVE_LIMITS_H
 #include <limits.h>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PR 25611, PR 25614: GAS: Remove a double inclusion of "bignum.h"
  2020-03-31 15:17 [PATCH] PR 25611, PR 25614: GAS: Remove a double inclusion of "bignum.h" Maciej W. Rozycki
@ 2020-03-31 21:44 ` Alan Modra
  2020-03-31 22:03   ` Maciej W. Rozycki
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Modra @ 2020-03-31 21:44 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: Nick Clifton, binutils

On Tue, Mar 31, 2020 at 04:17:37PM +0100, Maciej W. Rozycki wrote:
> This is due to a double inclusion of "bignum.h", which is not prepared for 
> such use, once via "as.h" and then "flonum.h", and again directly.
> 
>  OK to apply this hopefully obvious fix?

Yes, of course.

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PR 25611, PR 25614: GAS: Remove a double inclusion of "bignum.h"
  2020-03-31 21:44 ` Alan Modra
@ 2020-03-31 22:03   ` Maciej W. Rozycki
  0 siblings, 0 replies; 3+ messages in thread
From: Maciej W. Rozycki @ 2020-03-31 22:03 UTC (permalink / raw)
  To: Alan Modra; +Cc: Nick Clifton, binutils

On Wed, 1 Apr 2020, Alan Modra wrote:

> > This is due to a double inclusion of "bignum.h", which is not prepared for 
> > such use, once via "as.h" and then "flonum.h", and again directly.
> > 
> >  OK to apply this hopefully obvious fix?
> 
> Yes, of course.

 Committed then, thanks for your review.

  Maciej

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-31 22:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 15:17 [PATCH] PR 25611, PR 25614: GAS: Remove a double inclusion of "bignum.h" Maciej W. Rozycki
2020-03-31 21:44 ` Alan Modra
2020-03-31 22:03   ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).