diff -r 3662412ddd59 -r 1c56c03b7ed5 scripts/build/binutils/binutils.sh --- a/scripts/build/binutils/binutils.sh Thu Oct 11 14:39:41 2012 +1000 +++ b/scripts/build/binutils/binutils.sh Fri Nov 16 15:25:57 2012 +0100 @@ -39,6 +39,8 @@ binutils_opts+=( "host=${CT_BUILD}" ) binutils_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + binutils_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + binutils_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) do_binutils_backend "${binutils_opts[@]}" @@ -58,6 +60,7 @@ binutils_opts+=( "prefix=${CT_PREFIX_DIR}" ) binutils_opts+=( "static_build=${CT_STATIC_TOOLCHAIN}" ) binutils_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) + binutils_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) binutils_opts+=( "build_manuals=${CT_BUILD_MANUALS}" ) do_binutils_backend "${binutils_opts[@]}" @@ -99,13 +102,15 @@ # host : machine to run on : tuple : (none) # prefix : prefix to install into : dir : (none) # static_build : build statcially : bool : no -# cflags : host cflags to use : string : (empty) +# cflags : cflags to use : string : (empty) +# ldflags : ldflags to use : string : (empty) # build_manuals : whether to build manuals : bool : no do_binutils_backend() { local host local prefix local static_build local cflags + local ldflags local build_manuals=no local -a extra_config local -a extra_make_flags @@ -158,6 +163,7 @@ CT_DoExecLog CFG \ CFLAGS="${cflags}" \ CXXFLAGS="${cflags}" \ + LDFLAGS="${ldflags}" \ "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${host} \