This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why gcc 3.0.1 fails for sh target (coff,hms)
- From: Andris Pavenis <pavenis at latnet dot lv>
- To: gnuteam at kpit dot com, crossgcc at sources dot redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 21 Nov 2001 09:19:47 +0200
- Subject: Re: Why gcc 3.0.1 fails for sh target (coff,hms)
- References: <48256B0B.001B8403.00@TWALINS3>
I'm not sure but it seems very similar to PR#2606 I had a rather long time
ago for i586-pc-msdosdjgpp (also with COFF debugging information, worked
with stabs debugging information).
See
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2606&database=gcc
for more info.
Please check whether patch Mark Elbrecht suggested helps:
http://gcc.gnu.org/ml/gcc-bugs/2001-04/msg00520.html
Andris
On Wednesday 21 November 2001 06:53, GNUTeam wrote:
> Hi!
> The built for GCC 3.0.1 fails for targets sh-hms and sh-coff with the
> Error : Rest of line ignored. First character ignored is '<' while
> compiling basic_file.cc file present under directory /libstdc++-v3/src/.
>
> The source code I am using is binutils 2.11.2, gcc 3.0.1 and newlib 1.9.0.
> The build with same source code for sh-elf target has been successful.
>
> I tried to troubleshoot the problem for coff and hms targets and following
> are my observations. It will be very useful if somebody comments on my
> observations.
>
> I compared the /libstdc++-v3/src build directories for sh-elf and sh-coff
> and I observed that the sh-coff's 'src' directory only configures this
> directory to have two files basic_file.cc and c++locale.cc. Whereas, the
> sh-elf is configured for all the 20 .cc files.
> Q: Why all the src .cc files are not taken for built in case of target
> coff?
>
> The basic_file.cc has a template class, which, when compiled with -g
> option fails to compile on sh-coff (It is successful on sh-elf). When
> compiled
> without -g option or with -gstabs option the program compiles properly.
> For -gdwarf it displays unsupported -g option.
> Q: Why the -gdwarf is not supported for coff-gcc? Are -gcoff and -gstabs
> debug format only supported for coff target?
>
> Another observation was that in the symbol name formation (read.c and
> read.h in gas) the value for character '<' and '>' is 0 in lex_type array.
> and so I think the assembler is unable to recognize the '<' character in
> symbol name. The stabs and dwarf debug format information for a template
> class
> can be recognized by the assembler but not coff debug format for the same
> template class.
>
> Q: If this is the case should it mean that the coff debug format is not
> recommended for C++-template programs?
>
> When removed the -g from the compilation I have a successful build on GCC
> 3.0.1 for sh-coff and sh-hms targets.
> Q: But if I want to successfully build the tool chain with '-g' what
> should I do?
>
> Please guide me on this.
> Thanks & regards
> Rekha