summaryrefslogtreecommitdiff
path: root/scripts/build/companion_libs/210-expat.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-12-09 21:51:44 (GMT)
committerAlexey Neyman <stilor@att.net>2016-12-11 08:46:06 (GMT)
commit3dbb576c1708c1683ef780a43dec31a220458f39 (patch)
treed1d3a7cc6a6dde85899df10ad371b8e98e15fd04 /scripts/build/companion_libs/210-expat.sh
parentda3f8c4ec5345b709a330eebab01cd62c574295d (diff)
Make companion libs static.
This follows the trend set by 1*.sh scripts that configure ISL, GMP, MPFR, CLooG, etc. Building with shared libraries presents all kinds of problems: - The shared libraries need to be installed into ${CT_PREFIX_DIR}. - The binaries linked against companion libs need to have proper RPATH, or they're looking for shared libs in .build/${CT_PREFIX}/buildtools/lib. - All libraries must agree as to whether they're built shared, static, or both. Otherwise, gettext tries to link in static libncurses.a into a shared library and fails (since libncurses was compiled without the -fPIC switch and hence contains relocations that cannot be handled in a shared library). So this fixes the current mess. If we decide to re-enable building the companion libs shared, we should probably make this dependent on a separate suboption of CT_STATIC_TOOLCHAIN. Add a config loosely based on one reported in the issue 274. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/companion_libs/210-expat.sh')
-rwxr-xr-xscripts/build/companion_libs/210-expat.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/build/companion_libs/210-expat.sh b/scripts/build/companion_libs/210-expat.sh
index 3a6deb5..4b21b59 100755
--- a/scripts/build/companion_libs/210-expat.sh
+++ b/scripts/build/companion_libs/210-expat.sh
@@ -31,7 +31,6 @@ do_expat_for_host() {
expat_opts+=( "prefix=${CT_HOST_COMPLIBS_DIR}" )
expat_opts+=( "cflags=${CT_CFLAGS_FOR_HOST}" )
expat_opts+=( "ldflags=${CT_LDFLAGS_FOR_HOST}" )
- expat_opts+=( "static_build=${CT_STATIC_TOOLCHAIN}" )
do_expat_backend "${expat_opts[@]}"
@@ -59,7 +58,7 @@ do_expat_for_target() {
esac
expat_opts+=( "prefix=${prefix}" )
expat_opts+=( "destdir=${CT_SYSROOT_DIR}" )
- expat_opts+=( "static_build=y" )
+ expat_opts+=( "shared=${CT_SHARED_LIBS}" )
do_expat_backend "${expat_opts[@]}"
@@ -78,6 +77,7 @@ do_expat_backend() {
local prefix
local cflags
local ldflags
+ local shared
local arg
local -a extra_config
@@ -85,9 +85,8 @@ do_expat_backend() {
eval "${arg// /\\ }"
done
- if [ "${static_build}" = "y" ]; then
+ if [ "${shared}" != "y" ]; then
extra_config+=("--disable-shared")
- extra_config+=("--enable-static")
fi
CT_DoLog EXTRA "Configuring expat"
@@ -99,6 +98,7 @@ do_expat_backend() {
--build=${CT_BUILD} \
--host=${host} \
--prefix="${prefix}" \
+ --enable-static \
"${extra_config[@]}"
CT_DoLog EXTRA "Building expat"