1.1 --- a/scripts/build/companion_libs/100-gmp.sh Fri Nov 16 14:59:27 2012 +0100
1.2 +++ b/scripts/build/companion_libs/100-gmp.sh Wed Jun 25 23:33:01 2014 +0200
1.3 @@ -37,6 +37,8 @@
1.4
1.5 gmp_opts+=( "host=${CT_BUILD}" )
1.6 gmp_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
1.7 + gmp_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
1.8 + gmp_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
1.9 do_gmp_backend "${gmp_opts[@]}"
1.10
1.11 CT_Popd
1.12 @@ -53,6 +55,7 @@
1.13 gmp_opts+=( "host=${CT_HOST}" )
1.14 gmp_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
1.15 gmp_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
1.16 + gmp_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
1.17 do_gmp_backend "${gmp_opts[@]}"
1.18
1.19 CT_Popd
1.20 @@ -63,11 +66,13 @@
1.21 # Parameter : description : type : default
1.22 # host : machine to run on : tuple : (none)
1.23 # prefix : prefix to install into : dir : (none)
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_gmp_backend() {
1.28 local host
1.29 local prefix
1.30 local cflags
1.31 + local ldflags
1.32 local arg
1.33
1.34 for arg in "$@"; do
1.35 @@ -78,6 +83,7 @@
1.36
1.37 CT_DoExecLog CFG \
1.38 CFLAGS="${cflags} -fexceptions" \
1.39 + LDFLAGS="${ldflags}" \
1.40 "${CT_SRC_DIR}/gmp-${CT_GMP_VERSION}/configure" \
1.41 --build=${CT_BUILD} \
1.42 --host=${host} \