diff -r 1c68438f44f7 -r 1c56c03b7ed5 scripts/build/companion_libs/100-gmp.sh --- a/scripts/build/companion_libs/100-gmp.sh Fri Nov 16 14:59:27 2012 +0100 +++ b/scripts/build/companion_libs/100-gmp.sh Fri Nov 16 15:25:57 2012 +0100 @@ -37,6 +37,8 @@ gmp_opts+=( "host=${CT_BUILD}" ) gmp_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + gmp_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + gmp_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) do_gmp_backend "${gmp_opts[@]}" CT_Popd @@ -53,6 +55,7 @@ gmp_opts+=( "host=${CT_HOST}" ) gmp_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) gmp_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) + gmp_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) do_gmp_backend "${gmp_opts[@]}" CT_Popd @@ -63,11 +66,13 @@ # Parameter : description : type : default # host : machine to run on : tuple : (none) # prefix : prefix to install into : dir : (none) -# cflags : host cflags to use : string : (empty) +# cflags : cflags to use : string : (empty) +# ldflags : ldflags to use : string : (empty) do_gmp_backend() { local host local prefix local cflags + local ldflags local arg for arg in "$@"; do @@ -78,6 +83,7 @@ CT_DoExecLog CFG \ CFLAGS="${cflags} -fexceptions" \ + LDFLAGS="${ldflags}" \ "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${host} \