binutils: introduce the infrastructure to support binutils alternatives
authorYann Diorcet <diorcet.yann@gmail.com>
Mon Nov 19 11:21:31 2012 +0100 (2012-11-19)
changeset 31236a5946fbc728
parent 3122 23fbfabd8a0f
child 3124 e097000b5420
binutils: introduce the infrastructure to support binutils alternatives

Rework binutils in order to provide soon binutils alternative.

Signed-off-by: Yann Diorcet <diorcet.yann@gmail.com>
[yann.morin.1998@free.fr: split up original patch for self-contained changes]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <d3d1d51f399e6d2c1163.1353320546@macbook-smorlat.local>
Patchwork-Id: 199971
config/binutils.in
config/binutils/binutils.in.2
config/binutils/elf2flt.in
config/config.mk
scripts/build/binutils/binutils.sh
scripts/build/binutils/elf2flt.sh
scripts/crosstool-NG.sh.in
steps.mk
     1.1 --- a/config/binutils.in	Mon Nov 19 23:24:49 2012 +0100
     1.2 +++ b/config/binutils.in	Mon Nov 19 11:21:31 2012 +0100
     1.3 @@ -33,7 +33,10 @@
     1.4  
     1.5  endchoice
     1.6  
     1.7 -source "config/binutils/binutils.in"
     1.8 -source "config/binutils/elf2flt.in"
     1.9 +config BINUTILS
    1.10 +    string
    1.11 +
    1.12 +source "config.gen/binutils.in"
    1.13 +source "config.gen/binutils.in.2"
    1.14  
    1.15  endmenu
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/config/binutils/binutils.in.2	Mon Nov 19 11:21:31 2012 +0100
     2.3 @@ -0,0 +1,56 @@
     2.4 +# elf2flt options
     2.5 +
     2.6 +if ARCH_BINFMT_FLAT
     2.7 +
     2.8 +comment "elf2flt"
     2.9 +
    2.10 +choice
    2.11 +    bool
    2.12 +    prompt "elf2flt version"
    2.13 +# Don't remove next line
    2.14 +# CT_INSERT_VERSION_BELOW
    2.15 +
    2.16 +config ELF2FLT_CVSHEAD
    2.17 +    bool
    2.18 +    prompt "CVS Head"
    2.19 +    help
    2.20 +      Grab the latest version of elf2flt from the CVS repository
    2.21 +
    2.22 +config ELF2FLT_CUSTOM
    2.23 +    bool
    2.24 +    prompt "Custom elf2flt"
    2.25 +    depends on EXPERIMENTAL
    2.26 +
    2.27 +endchoice
    2.28 +
    2.29 +if ELF2FLT_CUSTOM
    2.30 +
    2.31 +config ELF2FLT_CUSTOM_LOCATION
    2.32 +    string
    2.33 +    prompt "Full path to custom elf2flt source"
    2.34 +    default ""
    2.35 +    help
    2.36 +      Enter the path to the directory (or tarball) of your source for elf2flt,
    2.37 +      or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/elf2flt
    2.38 +
    2.39 +endif # ELF2FLT_CUSTOM
    2.40 +
    2.41 +config ELF2FLT_VERSION
    2.42 +    string
    2.43 +    default "cvs" if ELF2FLT_CVSHEAD
    2.44 +    default "custom" if ELF2FLT_CUSTOM
    2.45 +# Don't remove next line
    2.46 +# CT_INSERT_VERSION_STRING_BELOW
    2.47 +
    2.48 +config ELF2FLT_EXTRA_CONFIG_ARRAY
    2.49 +    string
    2.50 +    prompt "elf2flt extra config"
    2.51 +    default ""
    2.52 +    help
    2.53 +      Extra flags passed onto ./configure when configuring
    2.54 +      
    2.55 +      You can enter multiple arguments here, and arguments can contain spaces
    2.56 +      if they are properly quoted (or escaped, but prefer quotes). Eg.:
    2.57 +          --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
    2.58 +
    2.59 +endif
     3.1 --- a/config/binutils/elf2flt.in	Mon Nov 19 23:24:49 2012 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,56 +0,0 @@
     3.4 -# elf2flt options
     3.5 -
     3.6 -if ARCH_BINFMT_FLAT
     3.7 -
     3.8 -comment "elf2flt"
     3.9 -
    3.10 -choice
    3.11 -    bool
    3.12 -    prompt "elf2flt version"
    3.13 -# Don't remove next line
    3.14 -# CT_INSERT_VERSION_BELOW
    3.15 -
    3.16 -config ELF2FLT_CVSHEAD
    3.17 -    bool
    3.18 -    prompt "CVS Head"
    3.19 -    help
    3.20 -      Grab the latest version of elf2flt from the CVS repository
    3.21 -
    3.22 -config ELF2FLT_CUSTOM
    3.23 -    bool
    3.24 -    prompt "Custom elf2flt"
    3.25 -    depends on EXPERIMENTAL
    3.26 -
    3.27 -endchoice
    3.28 -
    3.29 -if ELF2FLT_CUSTOM
    3.30 -
    3.31 -config ELF2FLT_CUSTOM_LOCATION
    3.32 -    string
    3.33 -    prompt "Full path to custom elf2flt source"
    3.34 -    default ""
    3.35 -    help
    3.36 -      Enter the path to the directory (or tarball) of your source for elf2flt,
    3.37 -      or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/elf2flt
    3.38 -
    3.39 -endif # ELF2FLT_CUSTOM
    3.40 -
    3.41 -config ELF2FLT_VERSION
    3.42 -    string
    3.43 -    default "cvs" if ELF2FLT_CVSHEAD
    3.44 -    default "custom" if ELF2FLT_CUSTOM
    3.45 -# Don't remove next line
    3.46 -# CT_INSERT_VERSION_STRING_BELOW
    3.47 -
    3.48 -config ELF2FLT_EXTRA_CONFIG_ARRAY
    3.49 -    string
    3.50 -    prompt "elf2flt extra config"
    3.51 -    default ""
    3.52 -    help
    3.53 -      Extra flags passed onto ./configure when configuring
    3.54 -      
    3.55 -      You can enter multiple arguments here, and arguments can contain spaces
    3.56 -      if they are properly quoted (or escaped, but prefer quotes). Eg.:
    3.57 -          --with-foo="1st arg with 4 spaces" --with-bar=2nd-arg-without-space
    3.58 -
    3.59 -endif
     4.1 --- a/config/config.mk	Mon Nov 19 23:24:49 2012 +0100
     4.2 +++ b/config/config.mk	Mon Nov 19 11:21:31 2012 +0100
     4.3 @@ -21,6 +21,8 @@
     4.4  KERNEL_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/kernel/*.in.2))
     4.5  CC_CONFIG_FILES       = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/cc/*.in))
     4.6  CC_CONFIG_FILES_2     = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/cc/*.in.2))
     4.7 +BINUTILS_CONFIG_FILES = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/binutils/*.in))
     4.8 +BINUTILS_CONFIG_FILES_2 = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/binutils/*.in.2))
     4.9  LIBC_CONFIG_FILES     = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/libc/*.in))
    4.10  LIBC_CONFIG_FILES_2   = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/libc/*.in.2))
    4.11  DEBUG_CONFIG_FILES    = $(patsubst $(CT_LIB_DIR)/%,%,$(wildcard $(CT_LIB_DIR)/config/debug/*.in))
    4.12 @@ -29,6 +31,7 @@
    4.13  GEN_CONFIG_FILES = config.gen/arch.in     \
    4.14                     config.gen/kernel.in   \
    4.15                     config.gen/cc.in       \
    4.16 +                   config.gen/binutils.in \
    4.17                     config.gen/libc.in     \
    4.18                     config.gen/debug.in
    4.19  # ... and how to access them:
    4.20 @@ -61,6 +64,7 @@
    4.21  ARCHS   = $(patsubst config/arch/%.in,%,$(ARCH_CONFIG_FILES))
    4.22  KERNELS = $(patsubst config/kernel/%.in,%,$(KERNEL_CONFIG_FILES))
    4.23  CCS     = $(patsubst config/cc/%.in,%,$(CC_CONFIG_FILES))
    4.24 +BINUTILSS = $(patsubst config/binutils/%.in,%,$(BINUTILS_CONFIG_FILES))
    4.25  LIBCS   = $(patsubst config/libc/%.in,%,$(LIBC_CONFIG_FILES))
    4.26  DEBUGS  = $(patsubst config/debug/%.in,%,$(DEBUG_CONFIG_FILES))
    4.27  
    4.28 @@ -81,6 +85,10 @@
    4.29  	@$(ECHO) '  IN    $(@)'
    4.30  	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C compiler" "CC" "config/cc" "N" $(CCS)
    4.31  
    4.32 +config.gen/binutils.in: $(CC_BINUTILS_FILES) $(CC_BINUTILS_FILES_2)
    4.33 +	@$(ECHO) '  IN    $(@)'
    4.34 +	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "Binutils" "BINUTILS" "config/binutils" "N" $(BINUTILSS)
    4.35 +
    4.36  config.gen/libc.in: $(LIBC_CONFIG_FILES) $(LIBC_CONFIG_FILES_2)
    4.37  	@$(ECHO) '  IN    $(@)'
    4.38  	$(SILENT)$(CT_LIB_DIR)/scripts/gen_in_frags.sh choice "$@" "C library" "LIBC" "config/libc" "Y" $(LIBCS)
     5.1 --- a/scripts/build/binutils/binutils.sh	Mon Nov 19 23:24:49 2012 +0100
     5.2 +++ b/scripts/build/binutils/binutils.sh	Mon Nov 19 11:21:31 2012 +0100
     5.3 @@ -12,6 +12,14 @@
     5.4                     {ftp,http}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils   \
     5.5                     ftp://gcc.gnu.org/pub/binutils/{releases,snapshots}
     5.6      fi
     5.7 +
     5.8 +    if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
     5.9 +        CT_GetCVS "elf2flt-${CT_ELF2FLT_VERSION}"               \
    5.10 +                  ":pserver:anonymous@cvs.uclinux.org:/var/cvs" \
    5.11 +                  "elf2flt"                                     \
    5.12 +                  ""                                            \
    5.13 +                  "elf2flt-${CT_ELF2FLT_VERSION}"
    5.14 +    fi
    5.15  }
    5.16  
    5.17  # Extract binutils
    5.18 @@ -24,6 +32,11 @@
    5.19  
    5.20      CT_Extract "binutils-${CT_BINUTILS_VERSION}"
    5.21      CT_Patch "binutils" "${CT_BINUTILS_VERSION}"
    5.22 +
    5.23 +    if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
    5.24 +        CT_Extract "elf2flt-${CT_ELF2FLT_VERSION}"
    5.25 +        CT_Patch "elf2flt" "${CT_ELF2FLT_VERSION}"
    5.26 +    fi
    5.27  }
    5.28  
    5.29  # Build binutils for build -> target
    5.30 @@ -45,6 +58,19 @@
    5.31      do_binutils_backend "${binutils_opts[@]}"
    5.32  
    5.33      CT_Popd
    5.34 +
    5.35 +    if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
    5.36 +        # We re-use binutils' options, plus our owns
    5.37 +        binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" )
    5.38 +        binutils_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-build-${CT_BUILD}" )
    5.39 +
    5.40 +        CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-build-${CT_BUILD}"
    5.41 +
    5.42 +        do_elf2flt_backend "${binutils_opts[@]}"
    5.43 +
    5.44 +        CT_Popd
    5.45 +    fi
    5.46 +
    5.47      CT_EndStep
    5.48  }
    5.49  
    5.50 @@ -65,6 +91,20 @@
    5.51  
    5.52      do_binutils_backend "${binutils_opts[@]}"
    5.53  
    5.54 +    CT_Popd
    5.55 +
    5.56 +    if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
    5.57 +        # We re-use binutils' options, plus our owns
    5.58 +        binutils_opts+=( "binutils_src=${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" )
    5.59 +        binutils_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-host-${CT_HOST}" )
    5.60 +
    5.61 +        CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-host-${CT_HOST}"
    5.62 +
    5.63 +        do_elf2flt_backend "${binutils_opts[@]}"
    5.64 +
    5.65 +        CT_Popd
    5.66 +    fi
    5.67 +
    5.68      # Make those new tools available to the core C compilers to come.
    5.69      # Note: some components want the ${TARGET}-{ar,as,ld,strip} commands as
    5.70      # well. Create that.
    5.71 @@ -73,6 +113,9 @@
    5.72      case "${CT_TOOLCHAIN_TYPE}" in
    5.73          cross|native)
    5.74              binutils_tools=( ar as ld strip )
    5.75 +            if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
    5.76 +                binutils_tools+=( elf2flt flthdr )
    5.77 +            fi
    5.78              case "${CT_BINUTILS_LINKERS_LIST}" in
    5.79                  ld)         binutils_tools+=( ld.bfd ) ;;
    5.80                  gold)       binutils_tools+=( ld.gold ) ;;
    5.81 @@ -93,7 +136,6 @@
    5.82          *)  ;;
    5.83      esac
    5.84  
    5.85 -    CT_Popd
    5.86      CT_EndStep
    5.87  }
    5.88  
    5.89 @@ -218,6 +260,54 @@
    5.90      fi
    5.91  }
    5.92  
    5.93 +# Build elf2flt for X -> target
    5.94 +#     Parameter     : description               : type      : default
    5.95 +#     host          : machine to run on         : tuple     : (none)
    5.96 +#     prefix        : prefix to install into    : dir       : (none)
    5.97 +#     static_build  : build statcially          : bool      : no
    5.98 +#     cflags        : cflags to use             : string    : (empty)
    5.99 +#     ldflags       : ldflags to use            : string    : (empty)
   5.100 +#     binutils_src  : source dir of binutils    : dir       : (none)
   5.101 +#     binutils_bld  : build dir of binutils     : dir       : (none)
   5.102 +#     build_manuals : whether to build manuals  : bool      : no
   5.103 +do_elf2flt_backend() {
   5.104 +    local host
   5.105 +    local prefix
   5.106 +    local static_build
   5.107 +    local cflags
   5.108 +    local ldflags
   5.109 +    local binutils_bld
   5.110 +    local binutils_src
   5.111 +    local build_manuals
   5.112 +    local arg
   5.113 +
   5.114 +    for arg in "$@"; do
   5.115 +        eval "${arg// /\\ }"
   5.116 +    done
   5.117 +
   5.118 +    CT_DoLog EXTRA "Configuring elf2flt"
   5.119 +    CT_DoExecLog CFG                                            \
   5.120 +    CFLAGS="${cflags}"                                          \
   5.121 +    LDFLAGS="${ldflags}"                                        \
   5.122 +    "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure"     \
   5.123 +        --build=${CT_BUILD}                                     \
   5.124 +        --host=${host}                                          \
   5.125 +        --target=${CT_TARGET}                                   \
   5.126 +        --prefix=${prefix}                                      \
   5.127 +        --with-bfd-include-dir=${binutils_bld}/bfd              \
   5.128 +        --with-binutils-include-dir=${binutils_src}/include     \
   5.129 +        --with-libbfd=${binutils_bld}/bfd/libbfd.a              \
   5.130 +        --with-libiberty=${binutils_bld}/libiberty/libiberty.a  \
   5.131 +        ${elf2flt_opts}                                         \
   5.132 +        "${CT_ELF2FLT_EXTRA_CONFIG_ARRAY[@]}"
   5.133 +
   5.134 +    CT_DoLog EXTRA "Building elf2flt"
   5.135 +    CT_DoExecLog ALL make ${JOBSFLAGS}
   5.136 +
   5.137 +    CT_DoLog EXTRA "Installing elf2flt"
   5.138 +    CT_DoExecLog ALL make install
   5.139 +}
   5.140 +
   5.141  # Now on for the target libraries
   5.142  do_binutils_for_target() {
   5.143      local -a extra_config
     6.1 --- a/scripts/build/binutils/elf2flt.sh	Mon Nov 19 23:24:49 2012 +0100
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,149 +0,0 @@
     6.4 -# This file adds functions to build elf2flt
     6.5 -# Copyright 2009 John Williams
     6.6 -# Copyright 2007 Yann E. MORIN
     6.7 -# Licensed under the GPL v2. See COPYING in the root of this package
     6.8 -
     6.9 -# Default: do nothing
    6.10 -do_elf2flt_get()        { :; }
    6.11 -do_elf2flt_extract()    { :; }
    6.12 -do_elf2flt_for_build()  { :; }
    6.13 -do_elf2flt_for_host()   { :; }
    6.14 -
    6.15 -if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then
    6.16 -
    6.17 -# Download elf2flt
    6.18 -do_elf2flt_get() {
    6.19 -    if [ "${CT_ELF2FLT_CUSTOM}" = "y" ]; then
    6.20 -        CT_GetCustom "elf2flt" "${ELF2FLT_VERSION}" \
    6.21 -                     "${CT_ELF2FLT_CUSTOM_LOCATION}"
    6.22 -    else
    6.23 -        CT_GetCVS "elf2flt-${CT_ELF2FLT_VERSION}"               \
    6.24 -                  ":pserver:anonymous@cvs.uclinux.org:/var/cvs" \
    6.25 -                  "elf2flt"                                     \
    6.26 -                  "" \
    6.27 -                  "elf2flt-${CT_ELF2FLT_VERSION}"
    6.28 -    fi
    6.29 -}
    6.30 -
    6.31 -# Extract elf2flt
    6.32 -do_elf2flt_extract() {
    6.33 -    # If using custom directory location, nothing to do
    6.34 -    if [    "${CT_ELF2FLT_CUSTOM}" = "y" \
    6.35 -         -a -d "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}" ]; then
    6.36 -        return 0
    6.37 -    fi
    6.38 -    CT_Extract "elf2flt-${CT_ELF2FLT_VERSION}"
    6.39 -    CT_Patch "elf2flt" "${CT_ELF2FLT_VERSION}"
    6.40 -}
    6.41 -
    6.42 -# Build elf2flt for build -> target
    6.43 -do_elf2flt_for_build() {
    6.44 -    local -a elf2flt_opts
    6.45 -
    6.46 -    case "${CT_TOOLCHAIN_TYPE}" in
    6.47 -        native|cross)   return 0;;
    6.48 -    esac
    6.49 -
    6.50 -    CT_DoStep INFO "Installing elf2flt for build"
    6.51 -    CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-build-${CT_BUILD}"
    6.52 -
    6.53 -    elf2flt_opts+=( "host=${CT_BUILD}" )
    6.54 -    elf2flt_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
    6.55 -    elf2flt_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
    6.56 -    elf2flt_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
    6.57 -    elf2flt_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-build-${CT_HOST}" )
    6.58 -
    6.59 -    do_elf2flt_backend "${elf2flt_opts[@]}"
    6.60 -
    6.61 -    CT_Popd
    6.62 -    CT_EndStep
    6.63 -}
    6.64 -
    6.65 -# Build elf2flt for host -> target
    6.66 -do_elf2flt_for_host() {
    6.67 -    local -a elf2flt_opts
    6.68 -
    6.69 -    CT_DoStep INFO "Installing elf2flt for host"
    6.70 -    CT_mkdir_pushd "${CT_BUILD_DIR}/build-elf2flt-host-${CT_HOST}"
    6.71 -
    6.72 -    elf2flt_opts+=( "host=${CT_HOST}" )
    6.73 -    elf2flt_opts+=( "prefix=${CT_PREFIX_DIR}" )
    6.74 -    elf2flt_opts+=( "static_build=${CT_STATIC_TOOLCHAIN}" )
    6.75 -    elf2flt_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    6.76 -    elf2flt_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
    6.77 -    elf2flt_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-host-${CT_HOST}" )
    6.78 -
    6.79 -    do_elf2flt_backend "${elf2flt_opts[@]}"
    6.80 -
    6.81 -    # Make those new tools available to the core C compilers to come.
    6.82 -    # Note: some components want the ${TARGET}-{ar,as,ld,strip} commands as
    6.83 -    # well. Create that.
    6.84 -    # Don't do it for canadian or cross-native, because the binutils
    6.85 -    # are not executable on the build machine.
    6.86 -    case "${CT_TOOLCHAIN_TYPE}" in
    6.87 -        cross|native)
    6.88 -            mkdir -p "${CT_BUILDTOOLS_PREFIX_DIR}/${CT_TARGET}/bin"
    6.89 -            mkdir -p "${CT_BUILDTOOLS_PREFIX_DIR}/bin"
    6.90 -            for t in elf2flt flthdr; do
    6.91 -                CT_DoExecLog ALL ln -sv                                         \
    6.92 -                                    "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}"    \
    6.93 -                                    "${CT_BUILDTOOLS_PREFIX_DIR}/${CT_TARGET}/bin/${t}"
    6.94 -                CT_DoExecLog ALL ln -sv                                         \
    6.95 -                                    "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${t}"    \
    6.96 -                                    "${CT_BUILDTOOLS_PREFIX_DIR}/bin/${CT_TARGET}-${t}"
    6.97 -            done
    6.98 -            ;;
    6.99 -        *)  ;;
   6.100 -    esac
   6.101 -
   6.102 -    CT_Popd
   6.103 -    CT_EndStep
   6.104 -}
   6.105 -
   6.106 -# Build elf2flt for X -> target
   6.107 -#     Parameter     : description               : type      : default
   6.108 -#     host          : machine to run on         : tuple     : (none)
   6.109 -#     prefix        : prefix to install into    : dir       : (none)
   6.110 -#     static_build  : build statcially          : bool      : no
   6.111 -#     cflags        : cflags to use             : string    : (empty)
   6.112 -#     ldflags       : ldflags to use            : string    : (empty)
   6.113 -do_elf2flt_backend() {
   6.114 -    local host
   6.115 -    local prefix
   6.116 -    local static_build
   6.117 -    local cflags
   6.118 -    local ldflags
   6.119 -    local binutils_bld
   6.120 -    local binutils_src
   6.121 -    local arg
   6.122 -
   6.123 -    for arg in "$@"; do
   6.124 -        eval "${arg// /\\ }"
   6.125 -    done
   6.126 -
   6.127 -    binutils_src="${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}"
   6.128 -
   6.129 -    CT_DoLog EXTRA "Configuring elf2flt"
   6.130 -    CT_DoExecLog CFG                                            \
   6.131 -    CFLAGS="${cflags}"                                          \
   6.132 -    LDFLAGS="${ldflags}"                                        \
   6.133 -    "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure"     \
   6.134 -        --build=${CT_BUILD}                                     \
   6.135 -        --host=${host}                                          \
   6.136 -        --target=${CT_TARGET}                                   \
   6.137 -        --prefix=${prefix}                                      \
   6.138 -        --with-bfd-include-dir=${binutils_bld}/bfd              \
   6.139 -        --with-binutils-include-dir=${binutils_src}/include     \
   6.140 -        --with-libbfd=${binutils_bld}/bfd/libbfd.a              \
   6.141 -        --with-libiberty=${binutils_bld}/libiberty/libiberty.a  \
   6.142 -        ${elf2flt_opts}                                         \
   6.143 -        "${CT_ELF2FLT_EXTRA_CONFIG_ARRAY[@]}"
   6.144 -
   6.145 -    CT_DoLog EXTRA "Building elf2flt"
   6.146 -    CT_DoExecLog ALL make ${JOBSFLAGS}
   6.147 -
   6.148 -    CT_DoLog EXTRA "Installing elf2flt"
   6.149 -    CT_DoExecLog ALL make install
   6.150 -}
   6.151 -
   6.152 -fi # CT_ARCH_BINFMT_FLAT
     7.1 --- a/scripts/crosstool-NG.sh.in	Mon Nov 19 23:24:49 2012 +0100
     7.2 +++ b/scripts/crosstool-NG.sh.in	Mon Nov 19 11:21:31 2012 +0100
     7.3 @@ -127,8 +127,7 @@
     7.4  . "${CT_LIB_DIR}/scripts/build/companion_tools.sh"
     7.5  . "${CT_LIB_DIR}/scripts/build/kernel/${CT_KERNEL}.sh"
     7.6  . "${CT_LIB_DIR}/scripts/build/companion_libs.sh"
     7.7 -. "${CT_LIB_DIR}/scripts/build/binutils/binutils.sh"
     7.8 -. "${CT_LIB_DIR}/scripts/build/binutils/elf2flt.sh"
     7.9 +. "${CT_LIB_DIR}/scripts/build/binutils/${CT_BINUTILS}.sh"
    7.10  . "${CT_LIB_DIR}/scripts/build/libc/${CT_LIBC}.sh"
    7.11  . "${CT_LIB_DIR}/scripts/build/cc/${CT_CC}.sh"
    7.12  . "${CT_LIB_DIR}/scripts/build/debug.sh"
    7.13 @@ -545,7 +544,6 @@
    7.14      do_kernel_get
    7.15      do_companion_libs_get
    7.16      do_binutils_get
    7.17 -    do_elf2flt_get
    7.18      do_cc_get
    7.19      do_libc_get
    7.20      do_debug_get
    7.21 @@ -569,7 +567,6 @@
    7.22          do_kernel_extract
    7.23          do_companion_libs_extract
    7.24          do_binutils_extract
    7.25 -        do_elf2flt_extract
    7.26          do_cc_extract
    7.27          do_libc_extract
    7.28          do_debug_extract
     8.1 --- a/steps.mk	Mon Nov 19 23:24:49 2012 +0100
     8.2 +++ b/steps.mk	Mon Nov 19 11:21:31 2012 +0100
     8.3 @@ -21,10 +21,8 @@
     8.4  CT_STEPS := libc_check_config        \
     8.5              companion_libs_for_build \
     8.6              binutils_for_build       \
     8.7 -            elf2flt_for_build        \
     8.8              companion_libs_for_host  \
     8.9              binutils_for_host        \
    8.10 -            elf2flt_for_host         \
    8.11              cc_core_pass_1           \
    8.12              kernel_headers           \
    8.13              libc_start_files         \