This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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

Re: Cross compile error question: i686 to powerpc--linux-gnu



I've stumbled across a problem with the 68k compiler in determined
which crt0.o, libgcc.a to link with if more than one '-m' selector is
specified.  I put together a 2.95.3 compiler with a target of m68k-elf.

If I take the empty program:

void foo()
{
}

and compile it with:

m68k-elf-gcc -o test test.c

Yes, I know that this won't link, but it does tell me which directory
gcc chose to extract crt0.o, libgcc.a from.  From the output:

/usr/local/wave/cross-test-tools/m68k-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 80000074
/usr/local/wave/cross-test-tools/m68k-elf/lib/crt0.o: In function `start':
/usr/local/wave/cross-test-tools/m68k-elf/lib/crt0.o(.text+0x2): undefined reference to `__stack'

I see that it is trying to extract the crt0.o and libgcc.a from
lib/crt0.o which I'd expect. If I compile it with:

m68k-elf-gcc -o test test.c -m5200

The results are:

/usr/local/wave/cross-test-tools/m68k-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 80000074
/usr/local/wave/cross-test-tools/m68k-elf/lib/m5200/crt0.o: In function `start':
/usr/local/wave/cross-test-tools/m68k-elf/lib/m5200/crt0.o(.text+0x2): undefined reference to `__stack'

So I see that its trying to extract crt0.o and libgcc.a from
lib/m5200/crto.o which I'd expect.  If I compile with:

m68k-elf-gcc -o test test.c -msoft-float

The results are:

/usr/local/wave/cross-test-tools/m68k-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 80000074
/usr/local/wave/cross-test-tools/m68k-elf/lib/msoft-float/crt0.o: In function `start':
/usr/local/wave/cross-test-tools/m68k-elf/lib/msoft-float/crt0.o(.text+0x2): undefined reference to `__stack'

Again I'd expect this.

If I specify both -msoft-float *and* -m5200:

m68k-elf-gcc -o test test.c -msoft-float -m5200

The results are:

/usr/local/wave/cross-test-tools/m68k-elf/bin/ld: warning: cannot find entry symbol _start; defaulting to 80000074
/usr/local/wave/cross-test-tools/m68k-elf/lib/crt0.o: In function `start':
/usr/local/wave/cross-test-tools/m68k-elf/lib/crt0.o(.text+0x2): undefined reference to `__stack'

Ten I see that it is trying to find crt0.o, libgcc.a from lib/crt0.o
which is *NOT* what I'd expect.  Is there anyway to specify more than
one '-m' selector to gcc?

I ask this because I'm trying to put together a toolchain for a new
ColdFire core that has more functional units(such as an FPU or an
MMU), and I want to have one chain that supports this new coldfire as
well as *all* of the 68k variants, its easier to specify what parts
are in the architecture than picking a part number.

See http://e-www.motorola.com/news_center/press_releases/PR001011C.html
for more info on the latest coldfire core.

Anybody have any suggestions?

-- 
Peter Barada                                   Peter.Barada@motorola.com
Wizard                                         781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola)   781-270-0193 (fax)

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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