From ff1d30c4a3c619bf6e451634c35c23ffce835001 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Fri, 2 May 2008 21:59:14 +0000 Subject: For tools/ and debug/ build scripts, annd a numeric prefix, so that they always get built in the same order, in case of library dependencies. /trunk/scripts/build/debug.sh | 2 1 1 0 +- /trunk/scripts/build/tools.sh | 2 1 1 0 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build/debug.sh b/scripts/build/debug.sh index d2cca62..84dbd75 100644 --- a/scripts/build/debug.sh +++ b/scripts/build/debug.sh @@ -5,7 +5,7 @@ CT_DEBUG_FACILITY_LIST= for f in "${CT_LIB_DIR}/scripts/build/debug/"*.sh; do is_enabled= . "${f}" - f=`basename "${f}" .sh` + f=$(basename "${f#???-}" .sh) if [ "${is_enabled}" = "y" ]; then CT_DEBUG_FACILITY_LIST="${CT_DEBUG_FACILITY_LIST} ${f}" fi diff --git a/scripts/build/debug/000-template.sh b/scripts/build/debug/000-template.sh new file mode 100644 index 0000000..8b5c2b0 --- /dev/null +++ b/scripts/build/debug/000-template.sh @@ -0,0 +1,50 @@ +# Template file for a debug utility + +# Check here wether your debug tool is enabled or not. +# This will get redefined over and over again for each tool, so don't +# count on it in the functions below. +is_enabled="${CT_FOOBAR}" + +# Small function to print the filename +# Note that this function gets redefined over and over for each tool +# It's of no use when building the toolchain proper, but shows all its +# usefullness when saving the toolchain and building the tarball. +# You shall not echo anything if you're not enabled! +# Echo the name of the file, without the extension, below. +do_print_filename() { + # For example: + # [ "${CT_FOOBAR}" = "y" ] || return 0 + # echo "foobar-${CT_FOOBAR_VERSION}" + : +} + +# Put your download code here +do_debug_foobar_get() { + # For example: + # CT_GetFile "foobar-${CT_FOOBAR_VERSION}" http://foobar.com/releases/ + : +} + +# Put your extract code here +do_debug_foobar_extract() { + # For example: + # CT_ExtractAndPatch "foobar-${CT_FOOBAR_VERSION}" + : +} + +# Put your build code here +do_debug_foobar_build() { + # For example: + # mkdir -p "${CT_BUILD_DIR}/build-foobar" + # CT_Pushd "${CT_BUILD_DIR}/build-foobar" + # "${CT_SRC_DIR}/foobar-${CT_FOOBAR_VERSION}/configure" \ + # --build=${CT_BUILD} \ + # --host=${CT_TARGET} \ + # --prefix=/usr \ + # --foobar-options + # make + # make DESTDIR="${CT_SYSROOT_DIR}" install + # CT_Popd + : +} + diff --git a/scripts/build/debug/100-dmalloc.sh b/scripts/build/debug/100-dmalloc.sh new file mode 100644 index 0000000..ff54373 --- /dev/null +++ b/scripts/build/debug/100-dmalloc.sh @@ -0,0 +1,58 @@ +# Build script for the dmalloc debug library facility + +is_enabled="${CT_DMALLOC}" + +do_print_filename() { + [ "${CT_DMALLOC}" = "y" ] || return 0 + echo "dmalloc-${CT_DMALLOC_VERSION}" +} + +do_debug_dmalloc_get() { + CT_GetFile "dmalloc-${CT_DMALLOC_VERSION}" http://dmalloc.com/releases/ +} + +do_debug_dmalloc_extract() { + CT_ExtractAndPatch "dmalloc-${CT_DMALLOC_VERSION}" +} + +do_debug_dmalloc_build() { + CT_DoStep INFO "Installing dmalloc" + CT_DoLog EXTRA "Configuring dmalloc" + + mkdir -p "${CT_BUILD_DIR}/build-dmalloc" + cd "${CT_BUILD_DIR}/build-dmalloc" + + extra_config= + case "${CT_CC_LANG_CXX}" in + y) extra_config="${extra_config} --enable-cxx";; + *) extra_config="${extra_config} --disable-cxx";; + esac + case "${CT_THREADS_NONE}" in + y) extra_config="${extra_config} --disable-threads";; + *) extra_config="${extra_config} --enable-threads";; + esac + case "${CT_SHARED_LIBS}" in + y) extra_config="${extra_config} --enable-shlib";; + *) extra_config="${extra_config} --disable-shlib";; + esac + + CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" + + LD="${CT_TARGET}-ld" \ + AR="${CT_TARGET}-ar" \ + "${CT_SRC_DIR}/dmalloc-${CT_DMALLOC_VERSION}/configure" \ + --prefix=/usr \ + --build="${CT_BUILD}" \ + --host="${CT_TARGET}" \ + ${extra_config} 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Building dmalloc" + make 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Installing dmalloc" + make DESTDIR="${CT_SYSROOT_DIR}" installincs \ + installlib 2>&1 |CT_DoLog ALL + make DESTDIR="${CT_DEBUG_INSTALL_DIR}" installutil 2>&1 |CT_DoLog ALL + + CT_EndStep +} diff --git a/scripts/build/debug/200-duma.sh b/scripts/build/debug/200-duma.sh new file mode 100644 index 0000000..fa3708b --- /dev/null +++ b/scripts/build/debug/200-duma.sh @@ -0,0 +1,64 @@ +# Biuld script for D.U.M.A. + +is_enabled="${CT_DUMA}" + +do_print_filename() { + [ "${CT_DUMA}" = "y" ] || return 0 + echo "duma_${CT_DUMA_VERSION}" +} + +do_debug_duma_get() { + CT_GetFile "duma_${CT_DUMA_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/duma/ + # D.U.M.A. doesn't separate its name from its version with a dash, + # but with an underscore. Create a link so that crosstool-NG can + # work correctly: + cd "${CT_TARBALLS_DIR}" + duma_ext=`CT_GetFileExtension "duma_${CT_DUMA_VERSION}"` + rm -f "duma-${CT_DUMA_VERSION}${duma_ext}" + ln -sf "duma_${CT_DUMA_VERSION}${duma_ext}" "duma-${CT_DUMA_VERSION}${duma_ext}" +} + +do_debug_duma_extract() { + CT_ExtractAndPatch "duma-${CT_DUMA_VERSION}" + cd "${CT_SRC_DIR}" + rm -f "duma-${CT_DUMA_VERSION}" + ln -sf "duma_${CT_DUMA_VERSION}" "duma-${CT_DUMA_VERSION}" +} + +do_debug_duma_build() { + CT_DoStep INFO "Installing D.U.M.A." + CT_DoLog EXTRA "Copying sources" + cp -a "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}" "${CT_BUILD_DIR}/build-duma" + CT_Pushd "${CT_BUILD_DIR}/build-duma" + + DUMA_CPP= + [ "${CT_CC_LANG_CXX}" = "y" ] && DUMA_CPP=1 + + libs= + [ "${CT_DUMA_A}" = "y" ] && libs="${libs} libduma.a" + [ "${CT_DUMA_SO}" = "y" ] && libs="${libs} libduma.so.0.0" + for lib in ${libs}; do + CT_DoLog EXTRA "Building library \"${lib}\"" + make HOSTCC="${CT_CC_NATIVE}" \ + HOSTCXX="${CT_CC_NATIVE}" \ + CC="${CT_TARGET}-${CT_CC}" \ + CXX="${CT_TARGET}-${CT_CC}" \ + DUMA_CPP="${DUMA_CPP}" \ + ${libs} 2>&1 |CT_DoLog ALL + CT_DoLog EXTRA "Installing library \"${lib}\"" + install -m 644 "${lib}" "${CT_SYSROOT_DIR}/usr/lib" 2>&1 |CT_DoLog ALL + done + if [ "${CT_DUMA_SO}" = "y" ]; then + CT_DoLog EXTRA "Installing shared library links" + ln -vsf libduma.so.0.0 "${CT_SYSROOT_DIR}/usr/lib/libduma.so.0" 2>&1 |CT_DoLog ALL + ln -vsf libduma.so.0.0 "${CT_SYSROOT_DIR}/usr/lib/libduma.so" 2>&1 |CT_DoLog ALL + fi + CT_DoLog EXTRA "Installing LD_PRELOAD wrapper script" + mkdir -p "${CT_DEBUG_INSTALL_DIR}/usr/bin" + cp -v duma.sh \ + "${CT_DEBUG_INSTALL_DIR}/usr/bin/duma" 2>&1 |CT_DoLog ALL + + CT_EndStep + CT_Popd +} + diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh new file mode 100644 index 0000000..7140a0f --- /dev/null +++ b/scripts/build/debug/300-gdb.sh @@ -0,0 +1,144 @@ +# Build script for the gdb debug facility + +is_enabled="${CT_GDB}" + +do_print_filename() { + [ "${CT_GDB}" = "y" ] || return 0 + echo "gdb`do_debug_gdb_suffix`" +} + +do_debug_gdb_suffix() { + case "${CT_GDB_VERSION}" in + snapshot) ;; + *) echo "-${CT_GDB_VERSION}";; + esac +} + +do_debug_gdb_get() { + CT_GetFile "gdb`do_debug_gdb_suffix`" \ + ftp://ftp.gnu.org/pub/gnu/gdb \ + ftp://sources.redhat.com/pub/gdb/releases \ + ftp://sources.redhat.com/pub/gdb/old-releases \ + ftp://sources.redhat.com/pub/gdb/snapshots/current +} + +do_debug_gdb_extract() { + CT_ExtractAndPatch "gdb`do_debug_gdb_suffix`" +} + +do_debug_gdb_build() { + gdb_src_dir="${CT_SRC_DIR}/gdb`do_debug_gdb_suffix`" + + extra_config= + # Version 6.3 and below behave badly with gdbmi + case "${CT_GDB_VERSION}" in + 6.2*|6.3) extra_config="${extra_config} --disable-gdbmi";; + esac + + if [ "${CT_GDB_CROSS}" = "y" ]; then + CT_DoStep INFO "Installing cross-gdb" + CT_DoLog EXTRA "Configuring cross-gdb" + + mkdir -p "${CT_BUILD_DIR}/build-gdb-cross" + cd "${CT_BUILD_DIR}/build-gdb-cross" + + CC_for_gdb= + LD_for_gdb= + if [ "${CT_GDB_CROSS_STATIC_GDBSERVER}" = "y" ]; then + CC_for_gdb="gcc -static" + LD_for_gdb="ld -static" + fi + + CC="${CC_for_gdb}" \ + LD="${LD_forgdb}" \ + "${gdb_src_dir}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_HOST} \ + --target=${CT_TARGET} \ + --prefix="${CT_PREFIX_DIR}" \ + --with-build-sysroot="${CT_SYSROOT_DIR}" \ + --enable-threads \ + ${extra_config} 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Building cross-gdb" + make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Installing cross-gdb" + make install 2>&1 |CT_DoLog ALL + + CT_EndStep + + CT_DoStep INFO "Installing gdbserver" + CT_DoLog EXTRA "Configuring gdbserver" + + mkdir -p "${CT_BUILD_DIR}/build-gdb-gdbserver" + cd "${CT_BUILD_DIR}/build-gdb-gdbserver" + + # Workaround for bad versions, where the configure + # script for gdbserver is not executable... + # Bah, GNU folks strike again... :-( + chmod +x "${gdb_src_dir}/gdb/gdbserver/configure" + + gdbserver_LDFLAGS= + if [ "${CT_GDB_CROSS_STATIC_GDBSERVER}" = "y" ]; then + gdbserver_LDFLAGS=-static + fi + + LDFLAGS="${gdbserver_LDFLAGS}" \ + "${gdb_src_dir}/gdb/gdbserver/configure" \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --target=${CT_TARGET} \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --includedir="${CT_HEADERS_DIR}" \ + --with-build-sysroot="${CT_SYSROOT_DIR}" \ + --program-prefix= \ + --without-uiout \ + --disable-tui \ + --disable-gdbtk \ + --without-x \ + --without-included-gettext \ + ${extra_config} 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Building gdbserver" + make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Installing gdbserver" + make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install 2>&1 |CT_DoLog ALL + + CT_EndStep + fi + + if [ "${CT_GDB_NATIVE}" = "y" ]; then + CT_DoStep EXTRA "Installing native gdb" + CT_DoLog EXTRA "Configuring native gdb" + + mkdir -p "${CT_BUILD_DIR}/build-gdb-native" + cd "${CT_BUILD_DIR}/build-gdb-native" + + "${gdb_src_dir}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --target=${CT_TARGET} \ + --prefix=/usr \ + --with-build-sysroot="${CT_SYSROOT_DIR}" \ + --without-uiout \ + --disable-tui \ + --disable-gdbtk \ + --without-x \ + --disable-sim \ + --disable-gdbserver \ + --without-included-gettext \ + ${extra_config} 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Building native gdb" + make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Installing native gdb" + make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install 2>&1 |CT_DoLog ALL + + CT_EndStep + fi +} diff --git a/scripts/build/debug/400-ltrace.sh b/scripts/build/debug/400-ltrace.sh new file mode 100644 index 0000000..3c85263 --- /dev/null +++ b/scripts/build/debug/400-ltrace.sh @@ -0,0 +1,44 @@ +# Build script for ltrace + +is_enabled="${CT_LTRACE}" + +do_print_filename() { + [ "${CT_LTRACE}" = "y" ] || return 0 + echo "ltrace-${CT_LTRACE_VERSION}.orig" +} + +do_debug_ltrace_get() { + CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" ftp://ftp.de.debian.org/debian/pool/main/l/ltrace/ + # Create a link so that the following steps are easier to do: + cd "${CT_TARBALLS_DIR}" + ltrace_ext=`CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig"` + ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}" +} + +do_debug_ltrace_extract() { + CT_ExtractAndPatch "ltrace-${CT_LTRACE_VERSION}" +} + +do_debug_ltrace_build() { + CT_DoStep INFO "Installing ltrace" + mkdir -p "${CT_BUILD_DIR}/build-ltrace" + CT_Pushd "${CT_BUILD_DIR}/build-ltrace" + + CT_DoLog EXTRA "Configuring ltrace" +# CFLAGS="-I${CT_SYSROOT_DIR}/usr/include" \ +# LDFLAGS="-L${CT_SYSROOT_DIR}/usr/include" \ + "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --prefix=/usr + + CT_DoLog EXTRA "Building ltrace" + make + + CT_DoLog EXTRA "Installing ltrace" + make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install + + CT_Popd + CT_EndStep +} + diff --git a/scripts/build/debug/500-strace.sh b/scripts/build/debug/500-strace.sh new file mode 100644 index 0000000..4bfef2f --- /dev/null +++ b/scripts/build/debug/500-strace.sh @@ -0,0 +1,38 @@ +# Build script for strace + +is_enabled="${CT_STRACE}" + +do_print_filename() { + [ "${CT_STRACE}" = "y" ] || return 0 + echo "strace-${CT_STRACE_VERSION}" +} + +do_debug_strace_get() { + CT_GetFile "strace-${CT_STRACE_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/strace/ +} + +do_debug_strace_extract() { + CT_ExtractAndPatch "strace-${CT_STRACE_VERSION}" +} + +do_debug_strace_build() { + CT_DoStep INFO "Installing strace" + mkdir -p "${CT_BUILD_DIR}/build-strace" + CT_Pushd "${CT_BUILD_DIR}/build-strace" + + CT_DoLog EXTRA "Configuring strace" + "${CT_SRC_DIR}/strace-${CT_STRACE_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --prefix=/usr 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Building strace" + make 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Installing strace" + make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install 2>&1 |CT_DoLog ALL + + CT_Popd + CT_EndStep +} + diff --git a/scripts/build/debug/dmalloc.sh b/scripts/build/debug/dmalloc.sh deleted file mode 100644 index ff54373..0000000 --- a/scripts/build/debug/dmalloc.sh +++ /dev/null @@ -1,58 +0,0 @@ -# Build script for the dmalloc debug library facility - -is_enabled="${CT_DMALLOC}" - -do_print_filename() { - [ "${CT_DMALLOC}" = "y" ] || return 0 - echo "dmalloc-${CT_DMALLOC_VERSION}" -} - -do_debug_dmalloc_get() { - CT_GetFile "dmalloc-${CT_DMALLOC_VERSION}" http://dmalloc.com/releases/ -} - -do_debug_dmalloc_extract() { - CT_ExtractAndPatch "dmalloc-${CT_DMALLOC_VERSION}" -} - -do_debug_dmalloc_build() { - CT_DoStep INFO "Installing dmalloc" - CT_DoLog EXTRA "Configuring dmalloc" - - mkdir -p "${CT_BUILD_DIR}/build-dmalloc" - cd "${CT_BUILD_DIR}/build-dmalloc" - - extra_config= - case "${CT_CC_LANG_CXX}" in - y) extra_config="${extra_config} --enable-cxx";; - *) extra_config="${extra_config} --disable-cxx";; - esac - case "${CT_THREADS_NONE}" in - y) extra_config="${extra_config} --disable-threads";; - *) extra_config="${extra_config} --enable-threads";; - esac - case "${CT_SHARED_LIBS}" in - y) extra_config="${extra_config} --enable-shlib";; - *) extra_config="${extra_config} --disable-shlib";; - esac - - CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" - - LD="${CT_TARGET}-ld" \ - AR="${CT_TARGET}-ar" \ - "${CT_SRC_DIR}/dmalloc-${CT_DMALLOC_VERSION}/configure" \ - --prefix=/usr \ - --build="${CT_BUILD}" \ - --host="${CT_TARGET}" \ - ${extra_config} 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Building dmalloc" - make 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Installing dmalloc" - make DESTDIR="${CT_SYSROOT_DIR}" installincs \ - installlib 2>&1 |CT_DoLog ALL - make DESTDIR="${CT_DEBUG_INSTALL_DIR}" installutil 2>&1 |CT_DoLog ALL - - CT_EndStep -} diff --git a/scripts/build/debug/duma.sh b/scripts/build/debug/duma.sh deleted file mode 100644 index fa3708b..0000000 --- a/scripts/build/debug/duma.sh +++ /dev/null @@ -1,64 +0,0 @@ -# Biuld script for D.U.M.A. - -is_enabled="${CT_DUMA}" - -do_print_filename() { - [ "${CT_DUMA}" = "y" ] || return 0 - echo "duma_${CT_DUMA_VERSION}" -} - -do_debug_duma_get() { - CT_GetFile "duma_${CT_DUMA_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/duma/ - # D.U.M.A. doesn't separate its name from its version with a dash, - # but with an underscore. Create a link so that crosstool-NG can - # work correctly: - cd "${CT_TARBALLS_DIR}" - duma_ext=`CT_GetFileExtension "duma_${CT_DUMA_VERSION}"` - rm -f "duma-${CT_DUMA_VERSION}${duma_ext}" - ln -sf "duma_${CT_DUMA_VERSION}${duma_ext}" "duma-${CT_DUMA_VERSION}${duma_ext}" -} - -do_debug_duma_extract() { - CT_ExtractAndPatch "duma-${CT_DUMA_VERSION}" - cd "${CT_SRC_DIR}" - rm -f "duma-${CT_DUMA_VERSION}" - ln -sf "duma_${CT_DUMA_VERSION}" "duma-${CT_DUMA_VERSION}" -} - -do_debug_duma_build() { - CT_DoStep INFO "Installing D.U.M.A." - CT_DoLog EXTRA "Copying sources" - cp -a "${CT_SRC_DIR}/duma_${CT_DUMA_VERSION}" "${CT_BUILD_DIR}/build-duma" - CT_Pushd "${CT_BUILD_DIR}/build-duma" - - DUMA_CPP= - [ "${CT_CC_LANG_CXX}" = "y" ] && DUMA_CPP=1 - - libs= - [ "${CT_DUMA_A}" = "y" ] && libs="${libs} libduma.a" - [ "${CT_DUMA_SO}" = "y" ] && libs="${libs} libduma.so.0.0" - for lib in ${libs}; do - CT_DoLog EXTRA "Building library \"${lib}\"" - make HOSTCC="${CT_CC_NATIVE}" \ - HOSTCXX="${CT_CC_NATIVE}" \ - CC="${CT_TARGET}-${CT_CC}" \ - CXX="${CT_TARGET}-${CT_CC}" \ - DUMA_CPP="${DUMA_CPP}" \ - ${libs} 2>&1 |CT_DoLog ALL - CT_DoLog EXTRA "Installing library \"${lib}\"" - install -m 644 "${lib}" "${CT_SYSROOT_DIR}/usr/lib" 2>&1 |CT_DoLog ALL - done - if [ "${CT_DUMA_SO}" = "y" ]; then - CT_DoLog EXTRA "Installing shared library links" - ln -vsf libduma.so.0.0 "${CT_SYSROOT_DIR}/usr/lib/libduma.so.0" 2>&1 |CT_DoLog ALL - ln -vsf libduma.so.0.0 "${CT_SYSROOT_DIR}/usr/lib/libduma.so" 2>&1 |CT_DoLog ALL - fi - CT_DoLog EXTRA "Installing LD_PRELOAD wrapper script" - mkdir -p "${CT_DEBUG_INSTALL_DIR}/usr/bin" - cp -v duma.sh \ - "${CT_DEBUG_INSTALL_DIR}/usr/bin/duma" 2>&1 |CT_DoLog ALL - - CT_EndStep - CT_Popd -} - diff --git a/scripts/build/debug/gdb.sh b/scripts/build/debug/gdb.sh deleted file mode 100644 index 7140a0f..0000000 --- a/scripts/build/debug/gdb.sh +++ /dev/null @@ -1,144 +0,0 @@ -# Build script for the gdb debug facility - -is_enabled="${CT_GDB}" - -do_print_filename() { - [ "${CT_GDB}" = "y" ] || return 0 - echo "gdb`do_debug_gdb_suffix`" -} - -do_debug_gdb_suffix() { - case "${CT_GDB_VERSION}" in - snapshot) ;; - *) echo "-${CT_GDB_VERSION}";; - esac -} - -do_debug_gdb_get() { - CT_GetFile "gdb`do_debug_gdb_suffix`" \ - ftp://ftp.gnu.org/pub/gnu/gdb \ - ftp://sources.redhat.com/pub/gdb/releases \ - ftp://sources.redhat.com/pub/gdb/old-releases \ - ftp://sources.redhat.com/pub/gdb/snapshots/current -} - -do_debug_gdb_extract() { - CT_ExtractAndPatch "gdb`do_debug_gdb_suffix`" -} - -do_debug_gdb_build() { - gdb_src_dir="${CT_SRC_DIR}/gdb`do_debug_gdb_suffix`" - - extra_config= - # Version 6.3 and below behave badly with gdbmi - case "${CT_GDB_VERSION}" in - 6.2*|6.3) extra_config="${extra_config} --disable-gdbmi";; - esac - - if [ "${CT_GDB_CROSS}" = "y" ]; then - CT_DoStep INFO "Installing cross-gdb" - CT_DoLog EXTRA "Configuring cross-gdb" - - mkdir -p "${CT_BUILD_DIR}/build-gdb-cross" - cd "${CT_BUILD_DIR}/build-gdb-cross" - - CC_for_gdb= - LD_for_gdb= - if [ "${CT_GDB_CROSS_STATIC_GDBSERVER}" = "y" ]; then - CC_for_gdb="gcc -static" - LD_for_gdb="ld -static" - fi - - CC="${CC_for_gdb}" \ - LD="${LD_forgdb}" \ - "${gdb_src_dir}/configure" \ - --build=${CT_BUILD} \ - --host=${CT_HOST} \ - --target=${CT_TARGET} \ - --prefix="${CT_PREFIX_DIR}" \ - --with-build-sysroot="${CT_SYSROOT_DIR}" \ - --enable-threads \ - ${extra_config} 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Building cross-gdb" - make ${PARALLELMFLAGS} 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Installing cross-gdb" - make install 2>&1 |CT_DoLog ALL - - CT_EndStep - - CT_DoStep INFO "Installing gdbserver" - CT_DoLog EXTRA "Configuring gdbserver" - - mkdir -p "${CT_BUILD_DIR}/build-gdb-gdbserver" - cd "${CT_BUILD_DIR}/build-gdb-gdbserver" - - # Workaround for bad versions, where the configure - # script for gdbserver is not executable... - # Bah, GNU folks strike again... :-( - chmod +x "${gdb_src_dir}/gdb/gdbserver/configure" - - gdbserver_LDFLAGS= - if [ "${CT_GDB_CROSS_STATIC_GDBSERVER}" = "y" ]; then - gdbserver_LDFLAGS=-static - fi - - LDFLAGS="${gdbserver_LDFLAGS}" \ - "${gdb_src_dir}/gdb/gdbserver/configure" \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --target=${CT_TARGET} \ - --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --includedir="${CT_HEADERS_DIR}" \ - --with-build-sysroot="${CT_SYSROOT_DIR}" \ - --program-prefix= \ - --without-uiout \ - --disable-tui \ - --disable-gdbtk \ - --without-x \ - --without-included-gettext \ - ${extra_config} 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Building gdbserver" - make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Installing gdbserver" - make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install 2>&1 |CT_DoLog ALL - - CT_EndStep - fi - - if [ "${CT_GDB_NATIVE}" = "y" ]; then - CT_DoStep EXTRA "Installing native gdb" - CT_DoLog EXTRA "Configuring native gdb" - - mkdir -p "${CT_BUILD_DIR}/build-gdb-native" - cd "${CT_BUILD_DIR}/build-gdb-native" - - "${gdb_src_dir}/configure" \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --target=${CT_TARGET} \ - --prefix=/usr \ - --with-build-sysroot="${CT_SYSROOT_DIR}" \ - --without-uiout \ - --disable-tui \ - --disable-gdbtk \ - --without-x \ - --disable-sim \ - --disable-gdbserver \ - --without-included-gettext \ - ${extra_config} 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Building native gdb" - make ${PARALLELMFLAGS} CC=${CT_TARGET}-${CT_CC} 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Installing native gdb" - make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install 2>&1 |CT_DoLog ALL - - CT_EndStep - fi -} diff --git a/scripts/build/debug/ltrace.sh b/scripts/build/debug/ltrace.sh deleted file mode 100644 index 3c85263..0000000 --- a/scripts/build/debug/ltrace.sh +++ /dev/null @@ -1,44 +0,0 @@ -# Build script for ltrace - -is_enabled="${CT_LTRACE}" - -do_print_filename() { - [ "${CT_LTRACE}" = "y" ] || return 0 - echo "ltrace-${CT_LTRACE_VERSION}.orig" -} - -do_debug_ltrace_get() { - CT_GetFile "ltrace_${CT_LTRACE_VERSION}.orig" ftp://ftp.de.debian.org/debian/pool/main/l/ltrace/ - # Create a link so that the following steps are easier to do: - cd "${CT_TARBALLS_DIR}" - ltrace_ext=`CT_GetFileExtension "ltrace_${CT_LTRACE_VERSION}.orig"` - ln -sf "ltrace_${CT_LTRACE_VERSION}.orig${ltrace_ext}" "ltrace-${CT_LTRACE_VERSION}${ltrace_ext}" -} - -do_debug_ltrace_extract() { - CT_ExtractAndPatch "ltrace-${CT_LTRACE_VERSION}" -} - -do_debug_ltrace_build() { - CT_DoStep INFO "Installing ltrace" - mkdir -p "${CT_BUILD_DIR}/build-ltrace" - CT_Pushd "${CT_BUILD_DIR}/build-ltrace" - - CT_DoLog EXTRA "Configuring ltrace" -# CFLAGS="-I${CT_SYSROOT_DIR}/usr/include" \ -# LDFLAGS="-L${CT_SYSROOT_DIR}/usr/include" \ - "${CT_SRC_DIR}/ltrace-${CT_LTRACE_VERSION}/configure" \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --prefix=/usr - - CT_DoLog EXTRA "Building ltrace" - make - - CT_DoLog EXTRA "Installing ltrace" - make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install - - CT_Popd - CT_EndStep -} - diff --git a/scripts/build/debug/strace.sh b/scripts/build/debug/strace.sh deleted file mode 100644 index 4bfef2f..0000000 --- a/scripts/build/debug/strace.sh +++ /dev/null @@ -1,38 +0,0 @@ -# Build script for strace - -is_enabled="${CT_STRACE}" - -do_print_filename() { - [ "${CT_STRACE}" = "y" ] || return 0 - echo "strace-${CT_STRACE_VERSION}" -} - -do_debug_strace_get() { - CT_GetFile "strace-${CT_STRACE_VERSION}" http://mesh.dl.sourceforge.net/sourceforge/strace/ -} - -do_debug_strace_extract() { - CT_ExtractAndPatch "strace-${CT_STRACE_VERSION}" -} - -do_debug_strace_build() { - CT_DoStep INFO "Installing strace" - mkdir -p "${CT_BUILD_DIR}/build-strace" - CT_Pushd "${CT_BUILD_DIR}/build-strace" - - CT_DoLog EXTRA "Configuring strace" - "${CT_SRC_DIR}/strace-${CT_STRACE_VERSION}/configure" \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --prefix=/usr 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Building strace" - make 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Installing strace" - make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install 2>&1 |CT_DoLog ALL - - CT_Popd - CT_EndStep -} - diff --git a/scripts/build/debug/template.sh b/scripts/build/debug/template.sh deleted file mode 100644 index 8b5c2b0..0000000 --- a/scripts/build/debug/template.sh +++ /dev/null @@ -1,50 +0,0 @@ -# Template file for a debug utility - -# Check here wether your debug tool is enabled or not. -# This will get redefined over and over again for each tool, so don't -# count on it in the functions below. -is_enabled="${CT_FOOBAR}" - -# Small function to print the filename -# Note that this function gets redefined over and over for each tool -# It's of no use when building the toolchain proper, but shows all its -# usefullness when saving the toolchain and building the tarball. -# You shall not echo anything if you're not enabled! -# Echo the name of the file, without the extension, below. -do_print_filename() { - # For example: - # [ "${CT_FOOBAR}" = "y" ] || return 0 - # echo "foobar-${CT_FOOBAR_VERSION}" - : -} - -# Put your download code here -do_debug_foobar_get() { - # For example: - # CT_GetFile "foobar-${CT_FOOBAR_VERSION}" http://foobar.com/releases/ - : -} - -# Put your extract code here -do_debug_foobar_extract() { - # For example: - # CT_ExtractAndPatch "foobar-${CT_FOOBAR_VERSION}" - : -} - -# Put your build code here -do_debug_foobar_build() { - # For example: - # mkdir -p "${CT_BUILD_DIR}/build-foobar" - # CT_Pushd "${CT_BUILD_DIR}/build-foobar" - # "${CT_SRC_DIR}/foobar-${CT_FOOBAR_VERSION}/configure" \ - # --build=${CT_BUILD} \ - # --host=${CT_TARGET} \ - # --prefix=/usr \ - # --foobar-options - # make - # make DESTDIR="${CT_SYSROOT_DIR}" install - # CT_Popd - : -} - diff --git a/scripts/build/tools.sh b/scripts/build/tools.sh index e61b16f..55869c4 100644 --- a/scripts/build/tools.sh +++ b/scripts/build/tools.sh @@ -5,7 +5,7 @@ CT_TOOLS_FACILITY_LIST= for f in "${CT_LIB_DIR}/scripts/build/tools/"*.sh; do is_enabled= . "${f}" - f=`basename "${f}" .sh` + f=$(basename "${f#???-}" .sh) if [ "${is_enabled}" = "y" ]; then CT_TOOLS_FACILITY_LIST="${CT_TOOLS_FACILITY_LIST} ${f}" fi diff --git a/scripts/build/tools/000-template.sh b/scripts/build/tools/000-template.sh new file mode 100644 index 0000000..7440c1a --- /dev/null +++ b/scripts/build/tools/000-template.sh @@ -0,0 +1,50 @@ +# Template file for a tool utility + +# Check here wether your tool is enabled or not. +# This will get redefined over and over again for each tool, so don't +# count on it in the functions below. +is_enabled="${CT_FOOBAR}" + +# Small function to print the filename +# Note that this function gets redefined over and over again for each tool. +# It's of no use when building the toolchain proper, but shows all its +# usefullness when saving the toolchain and building the tarball. +# You shall not echo anything if you're not enabled! +# Echo the name of the file, without the extension, below. +do_print_filename() { + # For example: + # [ "{CT_FOOBAR}" = "y" ] || return 0 + # echo "foobar-${CT_FOOBAR_VERSION}" + : +} + +# Put your download code here +do_tools_foobar_get() { + # For example: + # CT_GetFile "foobar-${CT_FOOBAR_VERSION}" http://foobar.com/releases/ + : +} + +# Put your extract code here +do_tools_foobar_extract() { + # For example: + # CT_ExtractAndPatch "foobar-${CT_FOOBAR_VERSION}" + : +} + +# Put your build code here +do_tools_foobar_build() { + # For example: + # mkdir -p "${CT_BUILD_DIR}/build-foobar" + # CT_Pushd "${CT_BUILD_DIR}/build-foobar" + # "${CT_SRC_DIR}/foobar-${CT_FOOBAR_VERSION}/configure" \ + # --build=${CT_BUILD} \ + # --host=${CT_TARGET} \ + # --prefix=/usr \ + # --foobar-options + # make + # make DESTDIR="${CT_SYSROOT_DIR}" install + # CT_Popd + : +} + diff --git a/scripts/build/tools/100-libelf.sh b/scripts/build/tools/100-libelf.sh new file mode 100644 index 0000000..5bb1d7b --- /dev/null +++ b/scripts/build/tools/100-libelf.sh @@ -0,0 +1,48 @@ +# Build script for libelf + +is_enabled="${CT_LIBELF}" + +do_print_filename() { + [ "{CT_LIBELF}" = "y" ] || return 0 + echo "libelf-${CT_LIBELF_VERSION}" +} + +do_tools_libelf_get() { + # The server hosting libelf will return an "HTTP 300 : Multiple Choices" + # error code if we try to download a file that does not exists there. + # So we have to request the file with an explicit extension. + CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/ +} + +do_tools_libelf_extract() { + CT_ExtractAndPatch "libelf-${CT_LIBELF_VERSION}" +} + +do_tools_libelf_build() { + CT_DoStep INFO "Installing libelf" + mkdir -p "${CT_BUILD_DIR}/build-libelf" + CT_Pushd "${CT_BUILD_DIR}/build-libelf" + + CT_DoLog EXTRA "Configuring libelf" + CC="${CT_TARGET}-gcc" \ + "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ + --build=${CT_BUILD} \ + --host=${CT_TARGET} \ + --target=${CT_TARGET} \ + --prefix=/usr \ + --enable-compat \ + --enable-elf64 \ + --enable-shared \ + --enable-extended-format \ + --enable-static 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Building libelf" + make 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Installing libelf" + make instroot="${CT_SYSROOT_DIR}" install 2>&1 |CT_DoLog ALL + + CT_Popd + CT_EndStep +} + diff --git a/scripts/build/tools/200-sstrip.sh b/scripts/build/tools/200-sstrip.sh new file mode 100644 index 0000000..5afdcb0 --- /dev/null +++ b/scripts/build/tools/200-sstrip.sh @@ -0,0 +1,100 @@ +# This will build and install sstrip to run on host and sstrip target files + +is_enabled="${CT_SSTRIP}" + +case "${CT_SSTRIP_FROM}" in + ELFkickers) + do_print_filename() { + echo "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}" + } + do_tools_sstrip_get() { + CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}" \ + http://www.muppetlabs.com/~breadbox/pub/software + } + do_tools_sstrip_extract() { + CT_ExtractAndPatch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}" + } + do_tools_sstrip_build() { + CT_DoStep INFO "Installing sstrip" + mkdir -p "${CT_BUILD_DIR}/build-strip" + cd "${CT_BUILD_DIR}/build-strip" + ( cd "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"; tar cf - . ) |tar xf - + + CT_DoLog EXTRA "Building sstrip" + make CC="${CT_CC_NATIVE}" sstrip 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Installing sstrip" + install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip" 2>&1 |CT_DoLog ALL + + CT_EndStep + } + ;; + + buildroot) + sstrip_url='http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/sstrip/sstrip.c' + do_print_filename() { + echo "sstrip.c" + } + do_tools_sstrip_get() { + # With this one, we must handle the download by ourselves, + # we can't leave the job to the classic CT_GetFile. + if [ -f "${CT_TARBALLS_DIR}/sstrip.c" ]; then + return 0 + fi + if [ -f "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" ]; then + CT_DoLog EXTRA "Using \"sstrip\" from local storage" + ln -sf "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" \ + "${CT_TARBALLS_DIR}/sstrip.c" 2>&1 |CT_DoLog ALL + return 0 + fi + CT_Pushd "${CT_TARBALLS_DIR}" + CT_DoLog EXTRA "Retrieving \"sstrip\" from network" + http_data=`lynx -dump "${sstrip_url}"` + link=`echo -en "${http_data}" \ + |egrep '\[[[:digit:]]+\]download' \ + |sed -r -e 's/.*\[([[:digit:]]+)\]download.*/\1/;'` + rev_url=`echo -en "${http_data}" \ + |egrep '^ *8\.' \ + |sed -r -e 's/^ *'${link}'\. +(.+)$/\1/;'` + CT_DoGetFile "${rev_url}" 2>&1 |CT_DoLog ALL + mv -v sstrip.c?* sstrip.c 2>&1 |CT_DoLog DEBUG + if [ "${CT_SAVE_TARBALLS}" = "y" ]; then + CT_DoLog EXTRA "Saving \"sstrip.c\" to local storage" + cp -v sstrip.c "${CT_LOCAL_TARBALLS_DIR}" 2>&1 |CT_DoLog DEBUG + fi + CT_Popd + } + do_tools_sstrip_extract() { + # We'll let buildroot guys take care of sstrip maintenance and patching. + mkdir -p "${CT_SRC_DIR}/sstrip" + cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip" |CT_DoLog ALL + } + do_tools_sstrip_build() { + CT_DoStep INFO "Installing sstrip" + mkdir -p "${CT_BUILD_DIR}/build-sstrip" + cd "${CT_BUILD_DIR}/build-sstrip" + + CT_DoLog EXTRA "Building sstrip" + ${CT_CC_NATIVE} -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c" 2>&1 |CT_DoLog ALL + + CT_DoLog EXTRA "Installing sstrip" + install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip" 2>&1 |CT_DoLog ALL + + CT_EndStep + } + ;; + + *) do_print_filename() { + : + } + do_tools_sstrip_get() { + : + } + do_tools_sstrip_extract() { + : + } + do_tools_sstrip_build() { + : + } + ;; +esac diff --git a/scripts/build/tools/libelf.sh b/scripts/build/tools/libelf.sh deleted file mode 100644 index 5bb1d7b..0000000 --- a/scripts/build/tools/libelf.sh +++ /dev/null @@ -1,48 +0,0 @@ -# Build script for libelf - -is_enabled="${CT_LIBELF}" - -do_print_filename() { - [ "{CT_LIBELF}" = "y" ] || return 0 - echo "libelf-${CT_LIBELF_VERSION}" -} - -do_tools_libelf_get() { - # The server hosting libelf will return an "HTTP 300 : Multiple Choices" - # error code if we try to download a file that does not exists there. - # So we have to request the file with an explicit extension. - CT_GetFile "libelf-${CT_LIBELF_VERSION}" .tar.gz http://www.mr511.de/software/ -} - -do_tools_libelf_extract() { - CT_ExtractAndPatch "libelf-${CT_LIBELF_VERSION}" -} - -do_tools_libelf_build() { - CT_DoStep INFO "Installing libelf" - mkdir -p "${CT_BUILD_DIR}/build-libelf" - CT_Pushd "${CT_BUILD_DIR}/build-libelf" - - CT_DoLog EXTRA "Configuring libelf" - CC="${CT_TARGET}-gcc" \ - "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ - --build=${CT_BUILD} \ - --host=${CT_TARGET} \ - --target=${CT_TARGET} \ - --prefix=/usr \ - --enable-compat \ - --enable-elf64 \ - --enable-shared \ - --enable-extended-format \ - --enable-static 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Building libelf" - make 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Installing libelf" - make instroot="${CT_SYSROOT_DIR}" install 2>&1 |CT_DoLog ALL - - CT_Popd - CT_EndStep -} - diff --git a/scripts/build/tools/sstrip.sh b/scripts/build/tools/sstrip.sh deleted file mode 100644 index 5afdcb0..0000000 --- a/scripts/build/tools/sstrip.sh +++ /dev/null @@ -1,100 +0,0 @@ -# This will build and install sstrip to run on host and sstrip target files - -is_enabled="${CT_SSTRIP}" - -case "${CT_SSTRIP_FROM}" in - ELFkickers) - do_print_filename() { - echo "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}" - } - do_tools_sstrip_get() { - CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}" \ - http://www.muppetlabs.com/~breadbox/pub/software - } - do_tools_sstrip_extract() { - CT_ExtractAndPatch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}" - } - do_tools_sstrip_build() { - CT_DoStep INFO "Installing sstrip" - mkdir -p "${CT_BUILD_DIR}/build-strip" - cd "${CT_BUILD_DIR}/build-strip" - ( cd "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"; tar cf - . ) |tar xf - - - CT_DoLog EXTRA "Building sstrip" - make CC="${CT_CC_NATIVE}" sstrip 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Installing sstrip" - install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip" 2>&1 |CT_DoLog ALL - - CT_EndStep - } - ;; - - buildroot) - sstrip_url='http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/sstrip/sstrip.c' - do_print_filename() { - echo "sstrip.c" - } - do_tools_sstrip_get() { - # With this one, we must handle the download by ourselves, - # we can't leave the job to the classic CT_GetFile. - if [ -f "${CT_TARBALLS_DIR}/sstrip.c" ]; then - return 0 - fi - if [ -f "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" ]; then - CT_DoLog EXTRA "Using \"sstrip\" from local storage" - ln -sf "${CT_LOCAL_TARBALLS_DIR}/sstrip.c" \ - "${CT_TARBALLS_DIR}/sstrip.c" 2>&1 |CT_DoLog ALL - return 0 - fi - CT_Pushd "${CT_TARBALLS_DIR}" - CT_DoLog EXTRA "Retrieving \"sstrip\" from network" - http_data=`lynx -dump "${sstrip_url}"` - link=`echo -en "${http_data}" \ - |egrep '\[[[:digit:]]+\]download' \ - |sed -r -e 's/.*\[([[:digit:]]+)\]download.*/\1/;'` - rev_url=`echo -en "${http_data}" \ - |egrep '^ *8\.' \ - |sed -r -e 's/^ *'${link}'\. +(.+)$/\1/;'` - CT_DoGetFile "${rev_url}" 2>&1 |CT_DoLog ALL - mv -v sstrip.c?* sstrip.c 2>&1 |CT_DoLog DEBUG - if [ "${CT_SAVE_TARBALLS}" = "y" ]; then - CT_DoLog EXTRA "Saving \"sstrip.c\" to local storage" - cp -v sstrip.c "${CT_LOCAL_TARBALLS_DIR}" 2>&1 |CT_DoLog DEBUG - fi - CT_Popd - } - do_tools_sstrip_extract() { - # We'll let buildroot guys take care of sstrip maintenance and patching. - mkdir -p "${CT_SRC_DIR}/sstrip" - cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip" |CT_DoLog ALL - } - do_tools_sstrip_build() { - CT_DoStep INFO "Installing sstrip" - mkdir -p "${CT_BUILD_DIR}/build-sstrip" - cd "${CT_BUILD_DIR}/build-sstrip" - - CT_DoLog EXTRA "Building sstrip" - ${CT_CC_NATIVE} -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c" 2>&1 |CT_DoLog ALL - - CT_DoLog EXTRA "Installing sstrip" - install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip" 2>&1 |CT_DoLog ALL - - CT_EndStep - } - ;; - - *) do_print_filename() { - : - } - do_tools_sstrip_get() { - : - } - do_tools_sstrip_extract() { - : - } - do_tools_sstrip_build() { - : - } - ;; -esac diff --git a/scripts/build/tools/template.sh b/scripts/build/tools/template.sh deleted file mode 100644 index 7440c1a..0000000 --- a/scripts/build/tools/template.sh +++ /dev/null @@ -1,50 +0,0 @@ -# Template file for a tool utility - -# Check here wether your tool is enabled or not. -# This will get redefined over and over again for each tool, so don't -# count on it in the functions below. -is_enabled="${CT_FOOBAR}" - -# Small function to print the filename -# Note that this function gets redefined over and over again for each tool. -# It's of no use when building the toolchain proper, but shows all its -# usefullness when saving the toolchain and building the tarball. -# You shall not echo anything if you're not enabled! -# Echo the name of the file, without the extension, below. -do_print_filename() { - # For example: - # [ "{CT_FOOBAR}" = "y" ] || return 0 - # echo "foobar-${CT_FOOBAR_VERSION}" - : -} - -# Put your download code here -do_tools_foobar_get() { - # For example: - # CT_GetFile "foobar-${CT_FOOBAR_VERSION}" http://foobar.com/releases/ - : -} - -# Put your extract code here -do_tools_foobar_extract() { - # For example: - # CT_ExtractAndPatch "foobar-${CT_FOOBAR_VERSION}" - : -} - -# Put your build code here -do_tools_foobar_build() { - # For example: - # mkdir -p "${CT_BUILD_DIR}/build-foobar" - # CT_Pushd "${CT_BUILD_DIR}/build-foobar" - # "${CT_SRC_DIR}/foobar-${CT_FOOBAR_VERSION}/configure" \ - # --build=${CT_BUILD} \ - # --host=${CT_TARGET} \ - # --prefix=/usr \ - # --foobar-options - # make - # make DESTDIR="${CT_SYSROOT_DIR}" install - # CT_Popd - : -} - -- cgit v0.10.2-6-g49f6