bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

binutils-2.14 fails to build using GCC V4.0.2


From: reid.madsen
Subject: binutils-2.14 fails to build using GCC V4.0.2
Date: Thu, 27 Jul 2006 23:08:21 -0500

Maintainers,

I'm trying to build binutils-2.14 on Fedora Linux using the GCC V4.0.2
compiler.
General information follows:

UNAME:
        Linux platinum 2.6.16-1.2108_FC4smp #1 SMP Fri May 5 00:20:42
EDT 2006 i686 i686 i386 GNU/Linux

COMPILER VERSION
        address@hidden gas]# gcc --version
        Using built-in specs.
        Target: i386-redhat-linux
        Configured with: ../configure --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info --enable-shared
--enable-threads=posix --enable-checking=release --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions
--enable-libgcj-multifile --enable-languages=c,c++,objc,java,f95,ada
--enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre
--host=i386-redhat-linux
        Thread model: posix
        gcc version 4.0.2 20051125 (Red Hat 4.0.2-8)

When building gas, the compilation fails with:

        gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I../bfd
-I./config -I./../include -I./.. -I./../bfd -I./../intl -I../intl
-DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall -Wstrict-prototypes
-Wmissing-prototypes -g -O2 -c app.c
        In file included from ./targ-cpu.h:1,
                         from ./config/obj-elf.h:42,
                         from ./obj-format.h:1,
                         from ./config/te-linux.h:4,
                         from targ-env.h:1,
                         from as.h:616,
                         from app.c:30:
        ./config/tc-i386.h:516: error: array type has incomplete element
type

I investigated and found the following at that line:

        extern const struct relax_type md_relax_table[];

Examining further I discover that "relax_type" is defined in "tc.h"
which is included from "as.h" at line 635 -- about 20 lines after the
include of "targ-env.h" which eventually include "targ-cpu.h".

Looks like newer versions of GCC do not allow the declaration of an
array type without the full declaration of that type being visible.  In
this case "relax_type" is only forward declared.

When can this be fixed?
------------------------------------------------------------------------
---------
Reid Madsen | Principal Engineer | NM Sys. Eng. & Arch. | Tektronix Inc.
| 469-330-4018 | address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]