Skip to content

Commit

Permalink
Build libiconv as shared library.
Browse files Browse the repository at this point in the history
Requires changing LD from clang to ld in order for libtool to be able to build shared library.

Also enables libiconv and ICU support in libxml2.
  • Loading branch information
triplef committed Jul 2, 2020
1 parent 8c357b9 commit 246cc88
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion env/toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export CC="${TOOLCHAIN}"/bin/${ANDROID_TARGET}${ANDROID_API_LEVEL}-clang
export CXX="${TOOLCHAIN}"/bin/${ANDROID_TARGET}${ANDROID_API_LEVEL}-clang++
export OBJC="${CC}"
export OBJCXX="${CXX}"
export LD="${CC}"
export LD="${TOOLCHAIN}"/bin/${ANDROID_TARGET_BINUTILS}-ld.gold
export AR="${TOOLCHAIN}"/bin/${ANDROID_TARGET_BINUTILS}-ar
export AS="${TOOLCHAIN}"/bin/${ANDROID_TARGET_BINUTILS}-as
export RANLIB="${TOOLCHAIN}"/bin/${ANDROID_TARGET_BINUTILS}-ranlib
Expand Down
3 changes: 2 additions & 1 deletion phases/14-libiconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ echo -e "\n### Running configure"
./configure \
--host=${ANDROID_TARGET} \
--prefix="${INSTALL_PREFIX}" \
--disable-shared
--enable-shared \
--disable-static \

echo -e "\n### Building"
make -j${MAKE_JOBS}
Expand Down
5 changes: 4 additions & 1 deletion phases/16-libxml2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ echo -e "\n### Running configure"
--prefix="${INSTALL_PREFIX}" \
--without-python \
--without-lzma \
--with-icu \
--disable-shared \
CFLAGS="${CFLAGS} -fPIC" `# required to remove unsupported text relocations` \
`# specify include dir to enable finding libiconv and ICU` \
`# -fPIC required to remove unsupported text relocations` \
CFLAGS="${CFLAGS} -I${INSTALL_PREFIX}/include -fPIC" \

echo -e "\n### Building"
make -j${MAKE_JOBS}
Expand Down
4 changes: 3 additions & 1 deletion phases/17-libxslt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ echo -e "\n### Running configure"
--with-libxml-prefix="${INSTALL_PREFIX}" \
--without-crypto \
--disable-shared \
CFLAGS="${CFLAGS} -fPIC" `# required to remove unsupported text relocations` \
`# specify include dir to enable finding libiconv and ICU (from libxml headers)` \
`# -fPIC required to remove unsupported text relocations` \
CFLAGS="${CFLAGS} -I${INSTALL_PREFIX}/include -fPIC" \

echo -e "\n### Building"
make -j${MAKE_JOBS}
Expand Down
2 changes: 1 addition & 1 deletion phases/40-gnustep-corebase.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ echo -e "\n### Running configure"
./configure \
--host=${ANDROID_TARGET} \
--prefix="${INSTALL_PREFIX}" \
`# for some reason we need to manually specify the include dir` \
`# specify include dir to enable finding ICU` \
CFLAGS="${CFLAGS} -I${INSTALL_PREFIX}/include" \
CPPFLAGS="${CPPFLAGS} -I${INSTALL_PREFIX}/include" \

Expand Down

0 comments on commit 246cc88

Please sign in to comment.