public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@linux-mips.org>
To: Nick Clifton <nickc@redhat.com>
Cc: binutils@sourceware.org
Subject: [PATCH] PR 25611, PR 25614: GAS: Remove a double inclusion of "bignum.h"
Date: Tue, 31 Mar 2020 16:17:37 +0100 (BST)	[thread overview]
Message-ID: <alpine.LFD.2.21.2003301913300.2689954@eddie.linux-mips.org> (raw)

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>

             reply	other threads:[~2020-03-31 15:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 15:17 Maciej W. Rozycki [this message]
2020-03-31 21:44 ` Alan Modra
2020-03-31 22:03   ` Maciej W. Rozycki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.21.2003301913300.2689954@eddie.linux-mips.org \
    --to=macro@linux-mips.org \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).