Hitachi SH-1 Build of GCC
Kai Ruottu
karuottu@freenet.hut.fi
Wed May 23 00:30:00 GMT 2001
John Lowen wrote:
>
> Has anyone attempted to build the sh-coff or sh-hms targets for BINUTILS-2.11 and
> GCC-2.95.3. I am having a really hard time with getting this to build properly. It
> fails when building libgcc2. The failure is that when libgcc2 is being compiled
> by xgcc, an error is issued indicating that DWARF2 is not supported for this
> object file format. Did XGCC not get built right for this target?
No, the 'sh-coff' target compiler shouldn't generate DWARF with '-g' or
'-g1'...
> I have tried a variety of configure options to enable/disable dwarf2 and to perhaps
> use stabs. THese configure options made no difference when it came to compiling the
> libgcc2.a with xgcc. The command line for xgcc uses -g -g1 which use the default
> debugging format which I am assuming based on the error is trying to be DWARF2
> which is wrong for this target. Any ideas?
You must have done something weird to enable the DWARF... Did you
really use the plain vanilla gcc-2.95.3 sources, not some special ones,
for instance from the Cygwin-releases, some Linux-ones or anything
'fixed'
for something (like for 'sh-linux-gnu') ?
My 'gcc/config/sh/sh.h' defines SDB_DEBUGGING_INFO on line 33 as the
default, but it has a (disabled) possibility to do something with this
'feature' when using ELF, you can see it as :
if (0)
<set the flag_omit_frame_pointer if using DWARF>
else
<don't do it>
in the OVERRIDE_OPTIONS in lines 245-248
Maybe the native 'as' is used and this takes something as 'DWARF'...
Using the normal checks like the:
./xgcc -print-prog-name=as
will tell which 'as' will be used, and the :
./xgcc -print-search-dirs
tells where 'xgcc' searches the 'programs'... If you didn't know
about options of this kind, please learn the most important option
with all the GNU-tools, it is the '--help'... So using the :
./xgcc --help
would suggest using these 'debug the GCC installation'-options when
having problems and needing help for the problems...
The main reason for 'xgcc' not finding the target 'as' is that the
values given for $prefix and $target differ for binutils and GCC
configures. Of course they should be always the same, so using a
'--target=sh-hms' for binutils and '--target=sh-coff' for GCC is a
sure way to get into this kind of problem --- binutils installs into
'$prefix/sh-hms/bin' and 'xgcc' searches from '$prefix/sh-coff/bin'...
Sometimes it is not possible to use the same target name, but then
one must know the '$prefix/$target/bin' as the right place and copy
the binutils there before starting to build GCC using the $prefix
and $target...
Cheers, Kai
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list