1.1 --- a/config/binutils.in Mon Mar 15 22:02:02 2010 +0100
1.2 +++ b/config/binutils.in Wed Mar 17 00:21:57 2010 +0100
1.3 @@ -40,5 +40,6 @@
1.4
1.5 source config/binutils/binutils.in
1.6 source config/binutils/elf2flt.in
1.7 +source config/binutils/sstrip.in
1.8
1.9 endmenu
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
2.2 +++ b/config/binutils/sstrip.in Wed Mar 17 00:21:57 2010 +0100
2.3 @@ -0,0 +1,50 @@
2.4 +# Configuration file for sstrip tool facility
2.5 +# depends on ! BACKEND
2.6 +
2.7 +comment "sstrip"
2.8 +
2.9 +config SSTRIP
2.10 + bool
2.11 + prompt "sstrip"
2.12 + help
2.13 + The sstrip utility, to maximise the striping of ELF binaries
2.14 + (executables and libraries).
2.15 +
2.16 +if SSTRIP
2.17 +
2.18 +choice
2.19 + bool
2.20 + prompt "Use sstrip from:"
2.21 +
2.22 +config SSTRIP_BUILDROOT
2.23 + bool
2.24 + prompt "buildroot"
2.25 + help
2.26 + Buildroot version, forked off the original from ELFkickers. This one
2.27 + is somewhat maintained by the buildroot guys.
2.28 + Supports big-endian systems.
2.29 +
2.30 +config SSTRIP_ELFKICKERS
2.31 + bool
2.32 + prompt "ELFkickers (OBSOLETE)"
2.33 + depends on OBSOLETE
2.34 + help
2.35 + The original, ageing version, of sstrip from ELFkickers.
2.36 + Fully functional, but not maintained anymore.
2.37 +
2.38 +endchoice
2.39 +
2.40 +config SSTRIP_FROM
2.41 + string
2.42 + default "ELFkickers" if SSTRIP_ELFKICKERS
2.43 + default "buildroot" if SSTRIP_BUILDROOT
2.44 +
2.45 +if SSTRIP_ELFKICKERS
2.46 +
2.47 +config SSTRIP_ELFKICKERS_VERSION
2.48 + string
2.49 + default "2.0a"
2.50 +
2.51 +endif
2.52 +
2.53 +endif # SSTRIP
3.1 --- a/config/config.in Mon Mar 15 22:02:02 2010 +0100
3.2 +++ b/config/config.in Wed Mar 17 00:21:57 2010 +0100
3.3 @@ -6,6 +6,5 @@
3.4 source config/cc.in
3.5 source config/libc.in
3.6 source config/debug.in
3.7 -source config/tools.in
3.8 source config/companion_libs.in
3.9 source config/companion_tools.in
4.1 --- a/config/config.mk Mon Mar 15 22:02:02 2010 +0100
4.2 +++ b/config/config.mk Wed Mar 17 00:21:57 2010 +0100
4.3 @@ -19,14 +19,12 @@
4.4 CC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/cc/*.in))
4.5 LIBC_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/libc/*.in))
4.6 DEBUG_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/debug/*.in))
4.7 -TOOL_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/tools/*.in))
4.8
4.9 # Build the list of generated config files
4.10 GEN_CONFIG_FILES = config.gen/arch.in \
4.11 config.gen/kernel.in \
4.12 config.gen/cc.in \
4.13 config.gen/libc.in \
4.14 - config.gen/tools.in \
4.15 config.gen/debug.in
4.16 # ... and how to access them:
4.17 # Generated files depends on config.mk (this file) because it has the
4.18 @@ -57,7 +55,6 @@
4.19 CCS = $(patsubst config/cc/%.in,%,$(CC_CONFIG_FILES))
4.20 LIBCS = $(patsubst config/libc/%.in,%,$(LIBC_CONFIG_FILES))
4.21 DEBUGS = $(patsubst config/debug/%.in,%,$(DEBUG_CONFIG_FILES))
4.22 -TOOLS = $(patsubst config/tools/%.in,%,$(TOOL_CONFIG_FILES))
4.23
4.24 #-----------------------------------------------------------
4.25 # Helper functions to ease building generated config files
4.26 @@ -116,12 +113,11 @@
4.27 # the given list, source-ing the associated files conditionnaly:
4.28 # $1 : destination file
4.29 # $2 : name of entries family (eg. Tools, Debug...)
4.30 -# $3 : prefix for the menu entries (eg. TOOL, DEBUG)
4.31 +# $3 : prefix for the menu entries (eg. DEBUG)
4.32 # $4 : base directory containing config files
4.33 -# $5 : list of config entries (eg. for tools: "libelf sstrip"..., and for
4.34 -# debug: "dmalloc duma gdb"...)
4.35 -# Example to build the tools generated config file:
4.36 -# $(call build_gen_menu_in,config.gen/tools.in,Tools,TOOL,config/tools,$(TOOLS))
4.37 +# $5 : list of config entries (eg. for debug: "dmalloc duma gdb"...)
4.38 +# Example to build the generated debug config file:
4.39 +# $(call build_gen_menu_in,config.gen/debug.in,Debug,DEBUG,config/debug,$(DEBUGS))
4.40 define build_gen_menu_in
4.41 @$(ECHO) ' IN $(1)'
4.42 $(SILENT)(echo "# $(2) facilities menu"; \
4.43 @@ -160,9 +156,6 @@
4.44 config.gen/libc.in: $(LIBC_CONFIG_FILES)
4.45 $(call build_gen_choice_in,$@,C library,LIBC,config/libc,$(LIBCS))
4.46
4.47 -config.gen/tools.in: $(TOOL_CONFIG_FILES)
4.48 - $(call build_gen_menu_in,$@,Tools,TOOL,config/tools,$(TOOLS))
4.49 -
4.50 config.gen/debug.in: $(DEBUG_CONFIG_FILES)
4.51 $(call build_gen_menu_in,$@,Debug,DEBUG,config/debug,$(DEBUGS))
4.52
5.1 --- a/config/tools.in Mon Mar 15 22:02:02 2010 +0100
5.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
5.3 @@ -1,3 +0,0 @@
5.4 -menu "Tools facilities"
5.5 -source config.gen/tools.in
5.6 -endmenu
6.1 --- a/config/tools/sstrip.in Mon Mar 15 22:02:02 2010 +0100
6.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
6.3 @@ -1,42 +0,0 @@
6.4 -# Configuration file for sstrip tool facility
6.5 -# depends on ! BACKEND
6.6 -
6.7 -config TOOL_sstrip
6.8 - help
6.9 - The sstrip utility, to maximise the striping of ELF binaries
6.10 - (executables and libraries).
6.11 -
6.12 -choice
6.13 - bool
6.14 - prompt "Use sstrip from:"
6.15 -
6.16 -config SSTRIP_BUILDROOT
6.17 - bool
6.18 - prompt "buildroot"
6.19 - help
6.20 - Buildroot version, forked off the original from ELFkickers. This one
6.21 - is somewhat maintained by the buildroot guys.
6.22 - Supports big-endian systems.
6.23 -
6.24 -config SSTRIP_ELFKICKERS
6.25 - bool
6.26 - prompt "ELFkickers (OBSOLETE)"
6.27 - depends on OBSOLETE
6.28 - help
6.29 - The original, ageing version, of sstrip from ELFkickers.
6.30 - Fully functional, but not maintained anymore.
6.31 -
6.32 -endchoice
6.33 -
6.34 -config SSTRIP_FROM
6.35 - string
6.36 - default "ELFkickers" if SSTRIP_ELFKICKERS
6.37 - default "buildroot" if SSTRIP_BUILDROOT
6.38 -
6.39 -if SSTRIP_ELFKICKERS
6.40 -
6.41 -config SSTRIP_ELFKICKERS_VERSION
6.42 - string
6.43 - default "2.0a"
6.44 -
6.45 -endif
7.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2 +++ b/scripts/build/binutils/sstrip.sh Wed Mar 17 00:21:57 2010 +0100
7.3 @@ -0,0 +1,60 @@
7.4 +# This will build and install sstrip to run on host and sstrip target files
7.5 +
7.6 +do_tools_sstrip_get() { :; }
7.7 +do_tools_sstrip_extract() { :; }
7.8 +do_tools_sstrip() { :; }
7.9 +
7.10 +case "${CT_SSTRIP_FROM}" in
7.11 + ELFkickers)
7.12 + do_sstrip_get() {
7.13 + CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}" \
7.14 + http://www.muppetlabs.com/~breadbox/pub/software
7.15 + }
7.16 + do_sstrip_extract() {
7.17 + CT_Extract "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
7.18 + CT_Patch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
7.19 + }
7.20 + do_sstrip() {
7.21 + CT_DoStep INFO "Installing sstrip"
7.22 + CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip" \
7.23 + "${CT_BUILD_DIR}/build-strip"
7.24 + cd "${CT_BUILD_DIR}/build-strip"
7.25 +
7.26 + CT_DoLog EXTRA "Building sstrip"
7.27 + CT_DoExecLog ALL make CC="${CT_HOST}-gcc" sstrip
7.28 +
7.29 + CT_DoLog EXTRA "Installing sstrip"
7.30 + CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
7.31 +
7.32 + CT_EndStep
7.33 + }
7.34 + ;;
7.35 +
7.36 + buildroot)
7.37 + do_sstrip_get() {
7.38 + CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip
7.39 + }
7.40 + do_sstrip_extract() {
7.41 + # We leave the sstrip maintenance to the buildroot people:
7.42 + # -> any fix-up goes directly there
7.43 + # -> we don't have patches for it
7.44 + # -> we don't need to patch it
7.45 + # -> just create a directory in src/, and copy it there.
7.46 + CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip"
7.47 + CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
7.48 + }
7.49 + do_sstrip() {
7.50 + CT_DoStep INFO "Installing sstrip"
7.51 + mkdir -p "${CT_BUILD_DIR}/build-sstrip"
7.52 + cd "${CT_BUILD_DIR}/build-sstrip"
7.53 +
7.54 + CT_DoLog EXTRA "Building sstrip"
7.55 + CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
7.56 +
7.57 + CT_DoLog EXTRA "Installing sstrip"
7.58 + CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
7.59 +
7.60 + CT_EndStep
7.61 + }
7.62 + ;;
7.63 +esac
8.1 --- a/scripts/build/tools.sh Mon Mar 15 22:02:02 2010 +0100
8.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
8.3 @@ -1,38 +0,0 @@
8.4 -# Wrapper to build the tools facilities
8.5 -
8.6 -# List all tools facilities, and parse their scripts
8.7 -CT_TOOLS_FACILITY_LIST=
8.8 -for f in "${CT_LIB_DIR}/scripts/build/tools/"*.sh; do
8.9 - _f="$(basename "${f}" .sh)"
8.10 - _f="${_f#???-}"
8.11 - __f="CT_TOOL_${_f}"
8.12 - if [ "${!__f}" = "y" ]; then
8.13 - CT_DoLog DEBUG "Enabling tool '${_f}'"
8.14 - . "${f}"
8.15 - CT_TOOLS_FACILITY_LIST="${CT_TOOLS_FACILITY_LIST} ${_f}"
8.16 - else
8.17 - CT_DoLog DEBUG "Disabling tool '${_f}'"
8.18 - fi
8.19 -done
8.20 -
8.21 -# Download the tools facilities
8.22 -do_tools_get() {
8.23 - for f in ${CT_TOOLS_FACILITY_LIST}; do
8.24 - do_tools_${f}_get
8.25 - done
8.26 -}
8.27 -
8.28 -# Extract and patch the tools facilities
8.29 -do_tools_extract() {
8.30 - for f in ${CT_TOOLS_FACILITY_LIST}; do
8.31 - do_tools_${f}_extract
8.32 - done
8.33 -}
8.34 -
8.35 -# Build the tools facilities
8.36 -do_tools() {
8.37 - for f in ${CT_TOOLS_FACILITY_LIST}; do
8.38 - do_tools_${f}_build
8.39 - done
8.40 -}
8.41 -
9.1 --- a/scripts/build/tools/000-template.sh Mon Mar 15 22:02:02 2010 +0100
9.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
9.3 @@ -1,34 +0,0 @@
9.4 -# Template file for a tool utility
9.5 -
9.6 -# Put your download code here
9.7 -do_tools_foobar_get() {
9.8 - # For example:
9.9 - # CT_GetFile "foobar-${CT_FOOBAR_VERSION}" http://foobar.com/releases/
9.10 - :
9.11 -}
9.12 -
9.13 -# Put your extract code here
9.14 -do_tools_foobar_extract() {
9.15 - # For example:
9.16 - # CT_Extract "foobar-${CT_FOOBAR_VERSION}"
9.17 - # CT_Patch "foobar-${CT_FOOBAR_VERSION}"
9.18 - :
9.19 -}
9.20 -
9.21 -# Put your build code here
9.22 -do_tools_foobar_build() {
9.23 - # For example:
9.24 - # mkdir -p "${CT_BUILD_DIR}/build-foobar"
9.25 - # CT_Pushd "${CT_BUILD_DIR}/build-foobar"
9.26 - # CT_DoExecLog ALL \
9.27 - # "${CT_SRC_DIR}/foobar-${CT_FOOBAR_VERSION}/configure" \
9.28 - # --build=${CT_BUILD} \
9.29 - # --host=${CT_TARGET} \
9.30 - # --prefix=/usr \
9.31 - # --foobar-options
9.32 - # CT_DoExecLog ALL make
9.33 - # CT_DoExecLog ALL make DESTDIR="${CT_SYSROOT_DIR}" install
9.34 - # CT_Popd
9.35 - :
9.36 -}
9.37 -
10.1 --- a/scripts/build/tools/200-sstrip.sh Mon Mar 15 22:02:02 2010 +0100
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,67 +0,0 @@
10.4 -# This will build and install sstrip to run on host and sstrip target files
10.5 -
10.6 -case "${CT_SSTRIP_FROM}" in
10.7 - ELFkickers)
10.8 - do_tools_sstrip_get() {
10.9 - CT_GetFile "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}" \
10.10 - http://www.muppetlabs.com/~breadbox/pub/software
10.11 - }
10.12 - do_tools_sstrip_extract() {
10.13 - CT_Extract "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
10.14 - CT_Patch "ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}"
10.15 - }
10.16 - do_tools_sstrip_build() {
10.17 - CT_DoStep INFO "Installing sstrip"
10.18 - CT_DoExecLog ALL cp -av "${CT_SRC_DIR}/ELFkickers-${CT_SSTRIP_ELFKICKERS_VERSION}/sstrip" \
10.19 - "${CT_BUILD_DIR}/build-strip"
10.20 - cd "${CT_BUILD_DIR}/build-strip"
10.21 -
10.22 - CT_DoLog EXTRA "Building sstrip"
10.23 - CT_DoExecLog ALL make CC="${CT_HOST}-gcc" sstrip
10.24 -
10.25 - CT_DoLog EXTRA "Installing sstrip"
10.26 - CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
10.27 -
10.28 - CT_EndStep
10.29 - }
10.30 - ;;
10.31 -
10.32 - buildroot)
10.33 - do_tools_sstrip_get() {
10.34 - CT_GetFile sstrip .c http://git.buildroot.net/buildroot/plain/toolchain/sstrip
10.35 - }
10.36 - do_tools_sstrip_extract() {
10.37 - # We leave the sstrip maintenance to the buildroot people:
10.38 - # -> any fix-up goes directly there
10.39 - # -> we don't have patches for it
10.40 - # -> we don't need to patch it
10.41 - # -> just create a directory in src/, and copy it there.
10.42 - CT_DoExecLog DEBUG mkdir -p "${CT_SRC_DIR}/sstrip"
10.43 - CT_DoExecLog DEBUG cp -v "${CT_TARBALLS_DIR}/sstrip.c" "${CT_SRC_DIR}/sstrip"
10.44 - }
10.45 - do_tools_sstrip_build() {
10.46 - CT_DoStep INFO "Installing sstrip"
10.47 - mkdir -p "${CT_BUILD_DIR}/build-sstrip"
10.48 - cd "${CT_BUILD_DIR}/build-sstrip"
10.49 -
10.50 - CT_DoLog EXTRA "Building sstrip"
10.51 - CT_DoExecLog ALL "${CT_HOST}-gcc" -Wall -o sstrip "${CT_SRC_DIR}/sstrip/sstrip.c"
10.52 -
10.53 - CT_DoLog EXTRA "Installing sstrip"
10.54 - CT_DoExecLog ALL install -m 755 sstrip "${CT_PREFIX_DIR}/bin/${CT_TARGET}-sstrip"
10.55 -
10.56 - CT_EndStep
10.57 - }
10.58 - ;;
10.59 -
10.60 - *) do_tools_sstrip_get() {
10.61 - :
10.62 - }
10.63 - do_tools_sstrip_extract() {
10.64 - :
10.65 - }
10.66 - do_tools_sstrip_build() {
10.67 - :
10.68 - }
10.69 - ;;
10.70 -esac
11.1 --- a/scripts/crosstool-NG.sh.in Mon Mar 15 22:02:02 2010 +0100
11.2 +++ b/scripts/crosstool-NG.sh.in Wed Mar 17 00:21:57 2010 +0100
11.3 @@ -121,9 +121,9 @@
11.4 . "${CT_LIB_DIR}/scripts/build/companion_libs/libelf.sh"
11.5 . "${CT_LIB_DIR}/scripts/build/binutils/binutils.sh"
11.6 . "${CT_LIB_DIR}/scripts/build/binutils/elf2flt.sh"
11.7 +. "${CT_LIB_DIR}/scripts/build/binutils/sstrip.sh"
11.8 . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
11.9 . "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh"
11.10 -. "${CT_LIB_DIR}/scripts/build/tools.sh"
11.11 . "${CT_LIB_DIR}/scripts/build/debug.sh"
11.12
11.13 # Target tuple: CT_TARGET needs a little love:
11.14 @@ -504,9 +504,9 @@
11.15 do_libelf_get
11.16 do_binutils_get
11.17 do_elf2flt_get
11.18 + do_sstrip_get
11.19 do_cc_get
11.20 do_libc_get
11.21 - do_tools_get
11.22 do_debug_get
11.23 CT_EndStep
11.24 fi
11.25 @@ -534,9 +534,9 @@
11.26 do_libelf_extract
11.27 do_binutils_extract
11.28 do_elf2flt_extract
11.29 + do_sstrip_extract
11.30 do_cc_extract
11.31 do_libc_extract
11.32 - do_tools_extract
11.33 do_debug_extract
11.34 CT_EndStep
11.35 fi
12.1 --- a/steps.mk Mon Mar 15 22:02:02 2010 +0100
12.2 +++ b/steps.mk Wed Mar 17 00:21:57 2010 +0100
12.3 @@ -26,6 +26,7 @@
12.4 libelf \
12.5 binutils \
12.6 elf2flt \
12.7 + sstrip \
12.8 cc_core_pass_1 \
12.9 libc_headers \
12.10 libc_start_files \
12.11 @@ -37,7 +38,6 @@
12.12 mpfr_target \
12.13 libelf_target \
12.14 binutils_target \
12.15 - tools \
12.16 debug \
12.17 finish \
12.18