You are here: TWiki > Main Web > CSTips r2 - 12 Aug 2008 - 09:27 - PeterPearse


Start of topic | Skip to actions

Some notes regarding the CodeSourcery toolchain

These notes 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

Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Use of this site is governed by these TermsAndConditions
Ideas, requests, problems regarding TWiki? Send feedback