[PATCH 01 of 10] complibs/libelf: build with -fPIC
Yann E. MORIN
yann.morin.1998@anciens.enib.fr
Thu Dec 30 23:32:00 GMT 2010
# HG changeset patch
# User "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
# Date 1293586458 -3600
# Node ID 4e5486098305b1ef2fdfb2c8ad740848a9a14eec
# Parent cb0f625b3f9f704140aaeed024baac05e6b27df0
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>
diff --git a/scripts/build/companion_libs/libelf.sh b/scripts/build/companion_libs/libelf.sh
--- a/scripts/build/companion_libs/libelf.sh
+++ b/scripts/build/companion_libs/libelf.sh
@@ -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} \
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list