diff -r 1c68438f44f7 -r 1c56c03b7ed5 scripts/build/companion_libs/200-libelf.sh --- a/scripts/build/companion_libs/200-libelf.sh Fri Nov 16 14:59:27 2012 +0100 +++ b/scripts/build/companion_libs/200-libelf.sh Fri Nov 16 15:25:57 2012 +0100 @@ -38,6 +38,8 @@ libelf_opts+=( "host=${CT_BUILD}" ) libelf_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" ) + libelf_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" ) + libelf_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" ) do_libelf_backend "${libelf_opts[@]}" CT_Popd @@ -54,6 +56,7 @@ libelf_opts+=( "host=${CT_HOST}" ) libelf_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" ) libelf_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" ) + libelf_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" ) do_libelf_backend "${libelf_opts[@]}" CT_Popd @@ -87,13 +90,15 @@ # destdir : out-of-tree install dir : string : / # 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) # shared : also buils shared lib : bool : n do_libelf_backend() { local destdir="/" local host local prefix local cflags + local ldflags local shared local -a extra_config local arg @@ -114,6 +119,7 @@ CC="${host}-gcc" \ RANLIB="${host}-ranlib" \ CFLAGS="${cflags} -fPIC" \ + LDFLAGS="${ldflags}" \ "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ --build=${CT_BUILD} \ --host=${host} \