Re: [uClinux-dev] Building m68k-elf

From: Andrew Kohlsmith (akohlsmith@benshaw.com)
Date: Fri Jan 19 2001 - 12:21:40 EST


I decided I was too anxious to wait...  I reconfigured binutils to use
standard prefixes and installed.  Then I built gcc.  according to the
directions you outlined with the exception that I only built the C compiler
(no objc or c++, the c++ compile gives errors trying to compile the streams
class).

After fixing one problem it worked!  (I think)

I had to create a symlink in /usr/local/m68k-elf/sys-include:
# ln -s /opt/uClinux/linux/include/asm-m68k asm-m68k

or else the build would fail because it couldn't find
asm-m68k/posix-types.h.  (asm/posix-types.h just says to include
asm-m68k/posix-types.h)

After that change it compiles but with a lot of __FD_* redefinition warnings
(__FD_ISSET, __FD_SET, __FD_CLR, __FD_ZERO, etc.).  I installed it and all
seems okay.

I must execute /opt/uClinux/gcc-2.95.2/m68k-elf/gcc/xgcc since my system
compiler is of a different version (2.91.66) and looks for its own version
of the cross compiler (which it obviously doesn't find) but using that I can
compile a simple test program into m68k assembly.  Linking complains of
undefined references to exit in __start and undefined references to atexit
in libgcc2.

I am hoping to be able to figure out a good plan to build this so I can put
together a decent HOWTO.  As it sits right now there isn't one (that I can
find) and the directions you give get you off to a great start but aren't
complete, or at least assume I know more than I do.  :-)

Something else I have noticed: uC-libc is looking for the m68k-pic-coff
compiler and assembler tools.  Is it just a matter of sedding the Makefiles
to use the m68k-elf or do I have an ancient copy of uC-libc?

Regards,
Andrew


This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/


This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:19:26 EDT