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(-) --- scripts/build/debug/000-template.sh | 50 +++++++++++++ scripts/build/debug/100-dmalloc.sh | 58 +++++++++++++++ scripts/build/debug/200-duma.sh | 64 ++++++++++++++++ scripts/build/debug/300-gdb.sh | 144 ++++++++++++++++++++++++++++++++++++ scripts/build/debug/400-ltrace.sh | 44 +++++++++++ scripts/build/debug/500-strace.sh | 38 ++++++++++ scripts/build/debug/dmalloc.sh | 58 --------------- scripts/build/debug/duma.sh | 64 ---------------- scripts/build/debug/gdb.sh | 144 ------------------------------------ scripts/build/debug/ltrace.sh | 44 ----------- scripts/build/debug/strace.sh | 38 ---------- scripts/build/debug/template.sh | 50 ------------- 12 files changed, 398 insertions(+), 398 deletions(-) create mode 100644 scripts/build/debug/000-template.sh create mode 100644 scripts/build/debug/100-dmalloc.sh create mode 100644 scripts/build/debug/200-duma.sh create mode 100644 scripts/build/debug/300-gdb.sh create mode 100644 scripts/build/debug/400-ltrace.sh create mode 100644 scripts/build/debug/500-strace.sh delete mode 100644 scripts/build/debug/dmalloc.sh delete mode 100644 scripts/build/debug/duma.sh delete mode 100644 scripts/build/debug/gdb.sh delete mode 100644 scripts/build/debug/ltrace.sh delete mode 100644 scripts/build/debug/strace.sh delete mode 100644 scripts/build/debug/template.sh (limited to 'scripts/build/debug') diff --git a/scripts/build/debug/000-template.sh b/scripts/build/debug/000-template.sh new file mode 100644 index 00000000..8b5c2b08 --- /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 00000000..ff54373d --- /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 00000000..fa3708bb --- /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 00000000..7140a0f3 --- /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 00000000..3c852634 --- /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 00000000..4bfef2ff --- /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 ff54373d..00000000 --- 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 fa3708bb..00000000 --- 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 7140a0f3..00000000 --- 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 3c852634..00000000 --- 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 4bfef2ff..00000000 --- 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 8b5c2b08..00000000 --- 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 - : -} - -- cgit v1.2.3