This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fix target/10331: [x86 -> SH] can't compile c++ crosscompilerpart of gcc crosscompiler for sh-elf


Hi Dan,

Dan Kegel <dank@kegel.com> wrote:
> See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10331
> 
> The error
> .../libiberty/hashtab.c:204: error: `free' undeclared (first use in this function)
> when building gcc for sh appears to be caused by fixproto running
> when it shouldn't.  On ppc, gcc/config/t-linux is used, and clears
> STMP_FIXPROTO.  Blindly copying that line to gcc/config/sh/t-linux
> allows the build to complete.  Here's the patch:

AFAIK, fixproto arranges ANSI, POSIX and C++ compatible header files
with adding appropriate prototypes from given soruce directories
including standard header files and it's for the system with broken
header files. So linux usually doesn't need to run it. I can't
reproduce the problem on my systems, but since we (sh-linux folks)
used several different set of header files, fixproto could cause
the problem on some systems.
Your change seems to be safe and 3.4 already uses gcc/config/t-linux
which nullifies STMP_FIXPROTO, so the patch is OK for 3.3 as an
regression fix on sh-linux target. Thanks.

Regards,
	kaz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]