This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

m68k cross-compiler



  I (a new-be to compiling compilers and cross-compilers) have been working
on compiling a cross-compiler to run on a linux x86 machine and to compile
m68k code which can be loaded into embedded 680xx cpus running  vxWorks.
My goal is to replace the wind-river supplied compiler (gcc version
2.6-95q2) than runs on a SunOS 5.4 host with a more up-to-date
cross-compiler (e.g. gcc-2.95.2) that will run on linux machines
and create obj code for 68040 and 68060 cpus.


I successfully compiled 
gcc-2.95.2 as a native compiler under linux 
(Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/specs
gcc version 2.95.2 19991024 (release)).

I then compiled gcc as a cross-compiler for a.out object 
code for m68k. My steps to create the cross-compiler were:

1.)The gcc source was already in: /usr/local/gcc-2.95.2

2.) in usr/local/gcc-2.95.2 i Untarred binutils-2.9.5.0.22.tar and
    newlib-1.8.2 into gcc-2.95.2

3.) made dir /usr/local/m68k-aout

4.) in gcc-2.95.2 i made the link: ln -s newlib-1.8.2/newlib newlib

5.) from newlib: cp -d -p -r -v newlib/libc/include /usr/local/m68k-aout

6.) mkdir /usr/local/m68k-aout-builddir

7.) vi envStuff to read:
    host=i686-pc-linux-gnu
	target=m68k-aout
	prefix=/usr/local

8.) source envStuff

9.) in -builddir:
    ../gcc-2.95.2/binutils-2.9.5.0.22/configure --target=$target
    --prefix=$prefix --enable-languages=c++ -v

	make all
	make install

10.) in -builddir:
    ../gcc-2.95.2/configure --target=$target
    --prefix=$prefix --enable-languages=c++ --with-newlib -v

        make all
        make install

11.) in -builddir:
    ../gcc-2.95.2/newlib-1.8.2/configure --target=$target
    --prefix=$prefix --enable-languages=c++  -v

        make all
        make install

These steps resulted in success in the sense that i could compile
a "hello world" toy, load it (via the vxWorks dynamic linker...ld <
test.o) into the m68k running vxWorks and upon typing the function
into the vxWorks shell prompt...get the expected results.

However, after successfully compiling a real world application and
loading it via: ld < real.o 
(where real.o is obtained via: m68k-aout-ld -o real.o -r app1.o app2.o
...) i received the following errors from the vxWorks host prompt:

undefined symbol: ___rtti_user
undefined symbol: ___rtti_si
undefined symbol: _terminate__Fv

Of course the code compiles and links (on the vxWorks m68k embedded cpu)
fine on solaris host with the wind-river supplied compiler.

A search of the gcc mail archives for rtti_user revealed 1 partially
useful message dated 19-oct 1999 having to do with ___rtti_user showing up
under nm of s***as "U" (as it does in my case) rather than and "T" as it
is stated as it should.  I could not find the complete resolution of the
problem in the archives. 


My question is: 

Do any of you cross-compiler wizards out there have
and advice to offer me concerning why i am getting these errors and how i
might go about resolving then?

Any comments/help is greatly appreciated!

Sincerely,

jim



















------
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]