scripts/build/companion_libs/200-libelf.sh
changeset 3119 1c56c03b7ed5
parent 3115 1c68438f44f7
     1.1 --- a/scripts/build/companion_libs/200-libelf.sh	Fri Nov 16 14:59:27 2012 +0100
     1.2 +++ b/scripts/build/companion_libs/200-libelf.sh	Fri Nov 16 15:25:57 2012 +0100
     1.3 @@ -38,6 +38,8 @@
     1.4  
     1.5      libelf_opts+=( "host=${CT_BUILD}" )
     1.6      libelf_opts+=( "prefix=${CT_BUILDTOOLS_PREFIX_DIR}" )
     1.7 +    libelf_opts+=( "cflags=${CT_CFLAGS_FOR_BUILD}" )
     1.8 +    libelf_opts+=( "ldflags=${CT_LDFLAGS_FOR_BUILD}" )
     1.9      do_libelf_backend "${libelf_opts[@]}"
    1.10  
    1.11      CT_Popd
    1.12 @@ -54,6 +56,7 @@
    1.13      libelf_opts+=( "host=${CT_HOST}" )
    1.14      libelf_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
    1.15      libelf_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
    1.16 +    libelf_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
    1.17      do_libelf_backend "${libelf_opts[@]}"
    1.18  
    1.19      CT_Popd
    1.20 @@ -87,13 +90,15 @@
    1.21  #     destdir       : out-of-tree install dir   : string    : /
    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  #     shared        : also buils shared lib     : bool      : n
    1.28  do_libelf_backend() {
    1.29      local destdir="/"
    1.30      local host
    1.31      local prefix
    1.32      local cflags
    1.33 +    local ldflags
    1.34      local shared
    1.35      local -a extra_config
    1.36      local arg
    1.37 @@ -114,6 +119,7 @@
    1.38      CC="${host}-gcc"                                        \
    1.39      RANLIB="${host}-ranlib"                                 \
    1.40      CFLAGS="${cflags} -fPIC"                                \
    1.41 +    LDFLAGS="${ldflags}"                                    \
    1.42      "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure"   \
    1.43          --build=${CT_BUILD}                                 \
    1.44          --host=${host}                                      \