# HG changeset patch # User "Yann E. MORIN" # Date 1293586458 -3600 # Node ID 004b41d847f8fe933f4fd368b5816a413923791c # Parent 78fe1a2a2bac0cb33580ab08a74c6e6fcc6bce65 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" (transplanted from c48aba92cbeb7b7dce956a63ec65d3296735cc16) diff -r 78fe1a2a2bac -r 004b41d847f8 scripts/build/companion_libs/libelf.sh --- a/scripts/build/companion_libs/libelf.sh Mon Jan 03 19:07:34 2011 +0100 +++ b/scripts/build/companion_libs/libelf.sh Wed Dec 29 02:34:18 2010 +0100 @@ -37,6 +37,7 @@ fi CC="${CT_HOST}-gcc" \ + CFLAGS="-fPIC" \ CT_DoExecLog CFG \ "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ --build=${CT_BUILD} \ @@ -69,6 +70,7 @@ CT_DoLog EXTRA "Configuring libelf" CC="${CT_TARGET}-gcc" \ + CFLAGS="-fPIC" \ CT_DoExecLog ALL \ "${CT_SRC_DIR}/libelf-${CT_LIBELF_VERSION}/configure" \ --build=${CT_BUILD} \