1.1 --- a/scripts/build/binutils/elf2flt.sh Thu Oct 11 14:39:42 2012 +1000
1.2 +++ b/scripts/build/binutils/elf2flt.sh Fri Nov 16 15:25:57 2012 +0100
1.3 @@ -49,6 +49,8 @@
1.4
1.5 elf2flt_opts+=( "host=${CT_BUILD}" )
1.6 elf2flt_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
1.7 + elf2flt_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
1.8 + elf2flt_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
1.9 elf2flt_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-build-${CT_HOST}" )
1.10
1.11 do_elf2flt_backend "${elf2flt_opts[@]}"
1.12 @@ -68,6 +70,7 @@
1.13 elf2flt_opts+=( "prefix=${CT_PREFIX_DIR}" )
1.14 elf2flt_opts+=( "static_build=${CT_STATIC_TOOLCHAIN}" )
1.15 elf2flt_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
1.16 + elf2flt_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
1.17 elf2flt_opts+=( "binutils_bld=${CT_BUILD_DIR}/build-binutils-host-${CT_HOST}" )
1.18
1.19 do_elf2flt_backend "${elf2flt_opts[@]}"
1.20 @@ -102,12 +105,14 @@
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 do_elf2flt_backend() {
1.28 local host
1.29 local prefix
1.30 local static_build
1.31 local cflags
1.32 + local ldflags
1.33 local binutils_bld
1.34 local binutils_src
1.35 local arg
1.36 @@ -120,7 +125,8 @@
1.37
1.38 CT_DoLog EXTRA "Configuring elf2flt"
1.39 CT_DoExecLog CFG \
1.40 - CFLAGS="${host_cflags}" \
1.41 + CFLAGS="${cflags}" \
1.42 + LDFLAGS="${ldflags}" \
1.43 "${CT_SRC_DIR}/elf2flt-${CT_ELF2FLT_VERSION}/configure" \
1.44 --build=${CT_BUILD} \
1.45 --host=${host} \