complibs/libelf: build with -fPIC
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Dec 29 02:34:18 2010 +0100 (2010-12-29)
changeset 2242c48aba92cbeb
parent 2241 78286fe70b62
child 2243 1fb02a4ca444
complibs/libelf: build with -fPIC

libelf is used by gcc to build the lto-plugin used
by binutils' gold to perform LTO.

This requires that files in libelf be compiled with
-fPIC to generate a proper .so.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/companion_libs/libelf.sh
     1.1 --- a/scripts/build/companion_libs/libelf.sh	Mon Jan 03 19:07:34 2011 +0100
     1.2 +++ b/scripts/build/companion_libs/libelf.sh	Wed Dec 29 02:34:18 2010 +0100
     1.3 @@ -37,6 +37,7 @@
     1.4      fi
     1.5  
     1.6      CC="${CT_HOST}-gcc"                                     \
     1.7 +    CFLAGS="-fPIC"                                          \
     1.8      CT_DoExecLog CFG                                        \
     1.9      "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure"   \
    1.10          --build=${CT_BUILD}                                 \
    1.11 @@ -69,6 +70,7 @@
    1.12  
    1.13      CT_DoLog EXTRA "Configuring libelf"
    1.14      CC="${CT_TARGET}-gcc"                                   \
    1.15 +    CFLAGS="-fPIC"                                          \
    1.16      CT_DoExecLog ALL                                        \
    1.17      "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure"   \
    1.18          --build=${CT_BUILD}                                 \