You are here: LinuxReference Web>CSTips (11 Sep 2009)

Some notes regarding the CodeSourcery toolchain

  • Ensure you build on a machine compatible with your eventual host
    e.g. If the toolchain will eventually be wrapped for scratchbox and used on a 32-bit VMWare image,
    don't build it on a 64-bit machine....
The notes below are for the 2007q1-21 release - they may apply to later versions.

Building glibc 2.7.

  • If satisfying the headers requirement with those of the compiler we need to link in the fixed includes
    - the include-next extension misses them.
    • cd /lib/gcc/arm-none-linux-gnueabi/4.2.0/include
    • ln -s ../include-fixed/limits.h
  • As of 2.7 glibc still uses syscalls deprecated for EABI.
    Possible work rounds include:
    • Comment out some, or all, the undefs in /arm-none-linux-gnueabi/libc/usr/include/asm/unistd.h
      then do one of
      • Accept the problems arising when the syscalls are made
      • Satisfy the likely calls in the kernel
      • Satisfy all the calls in the kernel
    • Amend the glibc code to call EABI supported syscalls

Mistakes I made you can avoid

  • The glibc-ports-2.7/sysdeps goes in glibc-2.7/ports, not glibc-2.7/sysdeps i.e.
    cp -r glibc-port-2.7/sysdeps glibc-2.7/ports/
    is correct.

Rebuild toolchain from source

Adapt the supplied arm-2007q1-21-arm-none-linux-gnueabi.sh script as follows
  • Comment out tasks for any hosts you dont want e.g. mingw32
  • Comment out any tasks for packages not supplied e.g. gdil
  • If necessary change the CC, CXX host lines throughout to use your host gcc.
  • Change the mkdir commands to mkdir -p so you can rerun the script. [Later scripts have this done]
  • Replace the directory names as required
    - Use absolute paths. I found this easier than fiddling to get the shell variable substitution correct.
-- PeterPearse - 09 Nov 2007
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
zenweb1 : 0.06 secs More Info