[superh-gnu-discuss] problem with gcc-4.3.3 on sh2a target
Fabio Giovagnini
fabio.giovagnini at aurion-tech.com
Tue Jun 23 07:01:32 UTC 2009
Alle 10:32, lunedì 22 giugno 2009, Andrew Stubbs ha scritto:
> Hi Fabio,
>
> On 20/06/09 12:11, Fabio Giovagnini wrote:
> > Hi all,
> > This is what I have discovered working around the gcc-4.3.3 form Code
>
> Surgery.
>
> We're a little confused about which CodeSourcery toolchain you have. We
> have never released an sh-elf toolchain, and have never made an SH2A
> lite release. Did you build it yourself?
RE: Yes I did
>
> How does your compiler identify itself? Please run "sh-elf-gcc -v" and
> post the result.
>
RE: This is the result:
./sh-elf-gcc -v
Using built-in specs.
Target: sh-elf
Configured with: ../../renesas-4.3-143-sh-linux-gnu/gcc-4.3/configure
--prefix=/usr/local/gcc-4.3-codesur/ --target=sh-elf --enable-languages=c,c++
--with-newlib --disable-__cxa_atexit
Thread model: single
gcc version 4.3.3 (GCC)
Thanksa lot for your replay
> > This is the linker path I'm using:
> > /usr/local/gcc-4.3-codesur/bin/sh-elf-ld -Map test-megameter.map
> > -Trom.sh2a.7286.ld -o
> > test-megameter.elf
> > /home/fgiovagnini/acts/megameter3/test-megameter/.obj/crt0.o....
> > -L/usr/local/gcc-4.3-codesur/sh-elf/lib/m2a ------------>
> > m2a -L/usr/local/gcc-4.3-codesur/lib/gcc/sh-elf/4.3.3/m2 -lgcc
> > -lc----> m2 /usr/local/gcc-4.3-codesur/bin/sh-elf-objcopy -I
> > elf32-sh -O srec --remove-section=.comment test-megameter.elf
> > test-megameter.a37
>
> I do not know what the specific problem is, in this case. However, it is
> always important that all modules in a link use the same calling
> conventions, so mixing multilibs is never a good idea.
>
> For this reason it is always recommended that you link with gcc, and
> allow that to call ld with the proper -L options.
>
> You can pass your linker-specific parameters through gcc using -Wl.
>
> E.g.:
> sh-elf-gcc -Wl,-Map,test-megameter.map ....
> ... -Wl,--remove-section=.comment ........
>
> Hope that helps
>
> Andrew
> CodeSourcery
--
Fabio Giovagnini
Aurion s.r.l.
Tel. +39.335.8350919
www.aurion-tech.com
account telefono VoIP skype (www.skype.com):
aurion.giovagnini
More information about the superh-gnu-discuss
mailing list