From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by sourceware.org (Postfix) with ESMTP id 95C88385DC13 for ; Tue, 31 Mar 2020 15:17:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 95C88385DC13 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-mips.org Authentication-Results: sourceware.org; spf=none smtp.mailfrom=macro@linux-mips.org Received: (from localhost user: 'macro', uid#1010) by eddie.linux-mips.org with ESMTP id S23990413AbgCaPRh2YfA- (ORCPT ); Tue, 31 Mar 2020 17:17:37 +0200 Date: Tue, 31 Mar 2020 16:17:37 +0100 (BST) Sender: "Maciej W. Rozycki" From: "Maciej W. Rozycki" To: Nick Clifton cc: binutils@sourceware.org Subject: [PATCH] PR 25611, PR 25614: GAS: Remove a double inclusion of "bignum.h" Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2020 15:17:41 -0000 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