scripts/build/binutils/binutils.sh
changeset 3119 1c56c03b7ed5
parent 3089 3662412ddd59
child 3123 6a5946fbc728
     1.1 --- a/scripts/build/binutils/binutils.sh	Thu Oct 11 14:39:41 2012 +1000
     1.2 +++ b/scripts/build/binutils/binutils.sh	Fri Nov 16 15:25:57 2012 +0100
     1.3 @@ -39,6 +39,8 @@
     1.4  
     1.5      binutils_opts+=( "host=${CT_BUILD}" )
     1.6      binutils_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
     1.7 +    binutils_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
     1.8 +    binutils_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
     1.9  
    1.10      do_binutils_backend "${binutils_opts[@]}"
    1.11  
    1.12 @@ -58,6 +60,7 @@
    1.13      binutils_opts+=( "prefix=${CT_PREFIX_DIR}" )
    1.14      binutils_opts+=( "static_build=${CT_STATIC_TOOLCHAIN}" )
    1.15      binutils_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    1.16 +    binutils_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
    1.17      binutils_opts+=( "build_manuals=${CT_BUILD_MANUALS}" )
    1.18  
    1.19      do_binutils_backend "${binutils_opts[@]}"
    1.20 @@ -99,13 +102,15 @@
    1.21  #     host          : machine to run on         : tuple     : (none)
    1.22  #     prefix        : prefix to install into    : dir       : (none)
    1.23  #     static_build  : build statcially          : bool      : no
    1.24 -#     cflags        : host cflags to use        : string    : (empty)
    1.25 +#     cflags        : cflags to use             : string    : (empty)
    1.26 +#     ldflags       : ldflags to use            : string    : (empty)
    1.27  #     build_manuals : whether to build manuals  : bool      : no
    1.28  do_binutils_backend() {
    1.29      local host
    1.30      local prefix
    1.31      local static_build
    1.32      local cflags
    1.33 +    local ldflags
    1.34      local build_manuals=no
    1.35      local -a extra_config
    1.36      local -a extra_make_flags
    1.37 @@ -158,6 +163,7 @@
    1.38      CT_DoExecLog CFG                                            \
    1.39      CFLAGS="${cflags}"                                          \
    1.40      CXXFLAGS="${cflags}"                                        \
    1.41 +    LDFLAGS="${ldflags}"                                        \
    1.42      "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure"   \
    1.43          --build=${CT_BUILD}                                     \
    1.44          --host=${host}                                          \