Update all samples to the latest set of options.
Update some samples to use newer features.
Add patches for the uClibc-20080801 snapshot to be able to build with gcc-4.3.
Add a patch against glibc-2.7 to allow building PPC with latest kernel headers.
Add a patch to gcc to use an alternate unwinding when built against uClibc (after a private explanation/request by Daniel Egger <daniel@eggers-club.de>)
/trunk/patches/glibc/2.7/230-powerpc-private_futex.patch | 15 15 0 0 +
/trunk/patches/uClibc/20080801/300-fix-asm.patch | 175 175 0 0 +++++++++
/trunk/patches/uClibc/20080801/100-ifaddrs.patch | 190 190 0 0 +++++++++
/trunk/patches/uClibc/20080801/200-mips-typeof.patch | 112 112 0 0 ++++++
/trunk/patches/gcc/4.3.1/330-unwind-for-uClibc.patch | 25 25 0 0 +
/trunk/samples/x86_64-unknown-linux-gnu/crosstool.config | 17 10 7 0 +
/trunk/samples/armeb-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/arm-unknown-linux-gnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/ia64-unknown-linux-gnu/crosstool.config | 14 11 3 0 +
/trunk/samples/x86_64-unknown-linux-uclibc/uClibc-20080801.config | 232 232 0 0 ++++++++++++
/trunk/samples/x86_64-unknown-linux-uclibc/crosstool.config | 34 21 13 0 +-
/trunk/samples/i686-nptl-linux-gnu/crosstool.config | 10 7 3 0 +
/trunk/samples/powerpc-unknown-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/mips-unknown-linux-uclibc/uClibc-20080801.config | 249 249 0 0 ++++++++++++
/trunk/samples/mips-unknown-linux-uclibc/crosstool.config | 38 23 15 0 +-
/trunk/samples/arm-unknown-linux-uclibcgnueabi/crosstool.config | 14 10 4 0 +
/trunk/samples/armeb-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/powerpc-unknown_nofpu-linux-gnu/crosstool.config | 12 9 3 0 +
/trunk/samples/arm-unknown-linux-uclibc/crosstool.config | 7 5 2 0 +
/trunk/samples/i586-geode-linux-uclibc/uClibc-20080801.config | 261 261 0 0 +++++++++++++
/trunk/samples/i586-geode-linux-uclibc/crosstool.config | 32 20 12 0 ++
/trunk/samples/powerpc-unknown-linux-uclibc/crosstool.config | 12 9 3 0 +
/trunk/samples/mipsel-unknown-linux-gnu/crosstool.config | 7 5 2 0 +
/trunk/samples/armeb-unknown-linux-uclibcgnueabi/crosstool.config | 7 5 2 0 +
/trunk/samples/alphaev56-unknown-linux-gnu/crosstool.config | 16 10 6 0 +
25 files changed, 1428 insertions(+), 84 deletions(-)
3 # This script will populate the root directory with libs from the sysroot.
4 # (C) 2007 Yann E. MORIN
5 # Licensed under the GPL v2
7 # Detect where the toolchain is:
8 BIN_DIR="$(cd "$(dirname "$(readlink -fn "$0")")"; pwd)"
9 CT_READELF="${BIN_DIR}/@@CT_TARGET@@-readelf"
10 CT_SYSROOT_DIR="${BIN_DIR}/../@@CT_TARGET@@/sys-root"
12 myname=$(basename "$0")
16 $myname [-f] [-v] -s source_root -d destination_root
19 use 'dir' as the un-populated (source) root directory
22 use 'dir' as the place to put the populated root directory
24 -f force execution: if destination directory already exists,
25 it will be removed first.
35 while getopts ":s:d:fvh" CT_OPT; do
37 s) CT_ROOT_SRC_DIR="${OPTARG}";;
38 d) CT_ROOT_DST_DIR="${OPTARG}";;
44 :) echo "$myname: '-${OPTARG}' takes exactly one argument."
47 ?) echo "$myname: unknown option '-${OPTARG}'."
54 if [ -z "${CT_ROOT_SRC_DIR}" -o -z "${CT_ROOT_DST_DIR}" ]; then
58 if [ ! -d "${CT_ROOT_SRC_DIR}" ]; then
59 echo "$myname: '${CT_ROOT_SRC_DIR}': no such file or directory"
62 if [ -d "${CT_ROOT_DST_DIR}" -a "${CT_FORCE}" != "y" ]; then
63 echo "$myname: '${CT_ROOT_DST_DIR}': already exists"
66 src_inode=$(ls -di "${CT_ROOT_SRC_DIR}")
67 dst_inode=$(ls -di "${CT_ROOT_DST_DIR}" 2>/dev/null)
68 if [ "${src_inode}" = "${dst_inode}" ]; then
69 echo "$myname: source and destination are the same!"
73 # Get rid of potentially older destination directory
74 if [ -d "${CT_ROOT_DST_DIR}" ]; then
75 mv "${CT_ROOT_DST_DIR}" "${CT_ROOT_DST_DIR}.$$"
76 setsid nohup rm -rf "${CT_ROOT_DST_DIR}.$$" >/dev/null 2>&1 &
79 # Create the working copy
80 mkdir -p "${CT_ROOT_DST_DIR}"
82 # Make all path absolute
83 CT_ROOT_SRC_DIR=$(cd "${CT_ROOT_SRC_DIR}"; pwd)
84 CT_ROOT_DST_DIR=$(cd "${CT_ROOT_DST_DIR}"; pwd)
86 cd "${CT_ROOT_SRC_DIR}"
87 tar cf - . |(cd "${CT_ROOT_DST_DIR}"; tar xf -)
89 # Parse the working copy for executables and libraries
90 cd "${CT_ROOT_DST_DIR}"
92 while [ ${still_needed} -eq 1 ]; do
93 ${CT_ECHO} "Looping..."
95 for f in $(find . -type f -exec file {} \; |egrep ': ELF [[:digit:]]+-bit .SB (executable|shared object),' |cut -d ":" -f 1); do
96 ${CT_ECHO} "Scanning '${f}'"
97 for libname in $("${CT_READELF}" -d "${f}" |egrep '(NEEDED)' |sed -r -e 's,.+\[(.+)\] *$,\1,;'); do
98 ${CT_ECHO} " searching for '${libname}'"
99 if [ -e "lib/${libname}" \
100 -o -e "usr/lib/${libname}" ]; then
101 ${CT_ECHO} " already present"
105 ${CT_ECHO} -n " trying in '${dir}'"
106 libfile="${CT_SYSROOT_DIR}/${dir}/lib/${libname}"
107 ${CT_ECHO} ": '${libfile}'"
108 if [ -e "${libfile}" ]; then
109 mkdir -p "${dir}/lib"
110 ${CT_ECHO} " installing '${dir}/lib/${libname}'"
111 cp "${libfile}" "${dir}/lib/${libname}"