building a new (nios2) toolchain starting with uclibc

Robert P. J. Day rpjday at crashcourse.ca
Thu Oct 18 12:32:46 UTC 2007


  as an experiment, i want to create an updated version of a Nios II
toolchain, and i thought i'd start with testing whether i could just
compile the latest version of uclibc with the older toolchain, and
take it from there.

  first, i already have a nios2 cross-compiler toolchain from here:

http://nioswiki.jot.com/WikiHome/OperatingSystems/%C2%B5Clinux/BinaryToolchain

that toolchain is based on gcc-3.4.6 so, as a first exercise, i
thought it would be educational to see if i could cross-compile the
latest svn checkout of uclibc with it.

  the toolchain has the following contents in "lib":

-rw-r--r-- 1 rpjday rpjday   1508 2006-05-07 09:54 crt1.o
-rw-r--r-- 1 rpjday rpjday   1069 2006-05-07 09:54 crti.o
-rw-r--r-- 1 rpjday rpjday   1075 2006-05-07 09:54 crtn.o
-rw-r--r-- 1 rpjday rpjday   5544 2006-05-07 09:57 elf2flt.ld
drwxr-xr-x 3 rpjday rpjday   4096 2006-05-07 09:53 gcc
drwxr-xr-x 2 rpjday rpjday   4096 2006-05-07 09:50 ldscripts
-rw-r--r-- 1 rpjday rpjday 994734 2006-05-07 09:54 libc.a
-rw-r--r-- 1 rpjday rpjday  13038 2006-05-07 09:54 libcrypt.a
-rw-r--r-- 1 rpjday rpjday 796072 2006-05-07 09:57 libiberty.a
-rw-r--r-- 1 rpjday rpjday 204618 2006-05-07 09:54 libm.a
-rw-r--r-- 1 rpjday rpjday    772 2006-05-07 09:54 libnsl.a
-rw-r--r-- 1 rpjday rpjday 100344 2006-05-07 09:54 libpthread.a
-rw-r--r-- 1 rpjday rpjday    778 2006-05-07 09:54 libresolv.a
-rw-r--r-- 1 rpjday rpjday   9964 2006-05-07 09:54 librt.a
-rw-r--r-- 1 rpjday rpjday  35600 2006-05-07 09:54 libthread_db.a
-rw-r--r-- 1 rpjday rpjday   5592 2006-05-07 09:54 libutil.a

  now, if i configure uclibc fairly minimally (static flat target file
format, no POSIX threading, no math lib, etc.), i can in fact get a
successful build, with the following contents in the new "lib"
directory:

-rw-rw-r-- 1 rpjday rpjday   1564 2007-10-18 08:29 crt1.o
-rw-rw-r-- 1 rpjday rpjday    956 2007-10-18 08:29 crti.o
-rw-rw-r-- 1 rpjday rpjday    920 2007-10-18 08:29 crtn.o
-rw-rw-r-- 1 rpjday rpjday 746674 2007-10-18 08:29 libc.a
-rw-rw-r-- 1 rpjday rpjday  12602 2007-10-18 08:27 libcrypt.a
-rw-rw-r-- 1 rpjday rpjday  79142 2007-10-18 08:28 libm.a
-rw-rw-r-- 1 rpjday rpjday    772 2007-10-18 08:28 libnsl.a
-rw-rw-r-- 1 rpjday rpjday    778 2007-10-18 08:28 libresolv.a
-rw-rw-r-- 1 rpjday rpjday   9744 2007-10-18 08:28 librt.a
-rw-rw-r-- 1 rpjday rpjday   5688 2007-10-18 08:28 libutil.a

  so it's a subset of the above, but it at least built.  at this
point, my plan would be to start adding features to the configuration,
seeing which ones break and seeing if i could fix them.

  is this a sane way to start the process -- just to see where the
older toolchain has problems building the current version of uclibc,
and seeing if there's an obvious fix?  thanks.

rday

-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================



More information about the uClibc mailing list