Add the first tool facility: sstrip.
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/config/tools/sstrip.in Fri Jun 01 17:00:43 2007 +0000
1.3 @@ -0,0 +1,46 @@
1.4 +# Configuration file for sstrip tool facility
1.5 +
1.6 +menuconfig SSTRIP
1.7 + bool
1.8 + prompt "sstrip"
1.9 + default n
1.10 + help
1.11 + The sstrip utility, to maximise the striping of ELF binaries
1.12 + (executables and libraries).
1.13 +
1.14 +if SSTRIP
1.15 +
1.16 +choice
1.17 + bool
1.18 + prompt "Use sstrip from:"
1.19 +
1.20 +config SSTRIP_ELFKICKERS
1.21 + bool
1.22 + prompt "ELFkickers"
1.23 + help
1.24 + Use the original, ageing version of sstrip from ELFkickers.
1.25 + It seems to be fully functional, but not maintained.
1.26 +
1.27 +config SSTRIP_BUILDROOT
1.28 + bool
1.29 + prompt "buildroot"
1.30 + help
1.31 + Use the version from buildroot. It comes from the original
1.32 + ELFkickers, but is somewhat maintained by the buildroot guys.
1.33 +
1.34 +endchoice
1.35 +
1.36 +config SSTRIP_FROM
1.37 + string
1.38 + default "ELFkickers" if SSTRIP_ELFKICKERS
1.39 + default "buildroot" if SSTRIP_BUILDROOT
1.40 +
1.41 +if SSTRIP_ELFKICKERS
1.42 +
1.43 +config SSTRIP_ELFKICKERS_VERSION
1.44 + string
1.45 + default "2.0a"
1.46 +
1.47 +endif
1.48 +
1.49 +endif
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/patches/ELFkickers/2.0a/100-use_CC_not_gcc.patch Fri Jun 01 17:00:43 2007 +0000
2.3 @@ -0,0 +1,12 @@
2.4 +diff -dur ELFkickers.orig/sstrip/Makefile ELFkickers/sstrip/Makefile
2.5 +--- ELFkickers.orig/sstrip/Makefile 2001-03-24 12:58:27.000000000 +0100
2.6 ++++ ELFkickers/sstrip/Makefile 2007-05-31 21:17:18.000000000 +0200
2.7 +@@ -1,7 +1,7 @@
2.8 + # Makefile for sstrip
2.9 +
2.10 + sstrip: sstrip.c
2.11 +- gcc -ggdb -Wall -W -o sstrip sstrip.c
2.12 ++ $(CC) -Wall -W -o sstrip sstrip.c
2.13 +
2.14 + clean:
2.15 + rm -f sstrip
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/scripts/build/tools/sstrip.sh Fri Jun 01 17:00:43 2007 +0000
3.3 @@ -0,0 +1,71 @@
3.4 +# This will build and install sstrip to run on host and sstrip target files
3.5 +
3.6 +is_enabled="${CT_SSTRIP}"
3.7 +
3.8 +case "${CT_SSTRIP_FROM}" in
3.9 + ELFkickers)
3.10 + do_tools_sstrip_get() {
3.11 + CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}" \
3.12 + http://www.muppetlabs.com/~breadbox/pub/software
3.13 + }
3.14 + do_tools_sstrip_extract() {
3.15 + CT_ExtractAndPatch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
3.16 + }
3.17 + do_tools_sstrip_build() {
3.18 + CT_DoStep INFO "Installing sstrip"
3.19 + mkdir -p "${CT_BUILD_DIR}/build-strip"
3.20 + cd "${CT_BUILD_DIR}/build-strip"
3.21 + ( cd "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip"; tar cf - . ) |tar xf -
3.22 +
3.23 + CT_DoLog EXTRA "Building sstrip"
3.24 + make CC="${CT_CC_NATIVE}" sstrip 2>&1 |CT_DoLog ALL
3.25 +
3.26 + CT_DoLog EXTRA "Installing sstrip"
3.27 + install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip" 2>&1 |CT_DoLog ALL
3.28 +
3.29 + CT_EndStep
3.30 + }
3.31 + ;;
3.32 +
3.33 + buildroot)
3.34 + sstrip_url='http://buildroot.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/sstrip/sstrip.c'
3.35 + do_tools_sstrip_get() {
3.36 + # With this one, we must handle the download by ourselves,
3.37 + # we can't leave the job to the classic CT_GetFile.
3.38 + if [ -f "${CT_SRC_DIR}/sstrip/sstrip.c" ]; then
3.39 + return 0
3.40 + fi
3.41 + CT_Pushd "${CT_SRC_DIR}"
3.42 + CT_DoLog EXTRA "Retrieving sstrip (buildroot)"
3.43 + mkdir -p sstrip
3.44 + cd sstrip
3.45 + http_data=`lynx -dump "${sstrip_url}"`
3.46 + link=`echo -en "${http_data}" \
3.47 + |egrep '\[[[:digit:]]+\]download' \
3.48 + |sed -r -e 's/.*\[([[:digit:]]+)\]download.*/\1/;'`
3.49 + rev_url=`echo -en "${http_data}" \
3.50 + |egrep '^ *8\.' \
3.51 + |sed -r -e 's/^ *'${link}'\. +(.+)$/\1/;'`
3.52 + CT_DoGetFile "${rev_url}" 2>&1 |CT_DoLog ALL
3.53 + mv sstrip.c?* sstrip.c
3.54 + CT_Popd
3.55 + }
3.56 + do_tools_sstrip_extract() {
3.57 + # We'll let buildroot guys take care of sstrip maintenance and patching.
3.58 + :
3.59 + }
3.60 + do_tools_sstrip_build() {
3.61 + CT_DoStep INFO "Installing sstrip"
3.62 + mkdir -p "${CT_BUILD_DIR}/build-sstrip"
3.63 + cd "${CT_BUILD_DIR}/build-sstrip"
3.64 +
3.65 + CT_DoLog EXTRA "Building sstrip"
3.66 + ${CT_CC_NATIVE} -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c" 2>&1 |CT_DoLog ALL
3.67 +
3.68 + CT_DoLog EXTRA "Installing sstrip"
3.69 + install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip" 2>&1 |CT_DoLog ALL
3.70 +
3.71 + CT_EndStep
3.72 + }
3.73 + ;;
3.74 +esac