diff --git a/build.sh b/build.sh index a47f17e..92e3af1 100755 --- a/build.sh +++ b/build.sh @@ -845,6 +845,36 @@ if [ ! -f "$STEPS_DIR/make" ]; then touch "$STEPS_DIR/make" fi +# build libiconv +if [ ! -f "$STEPS_DIR/libiconv" ]; then + if [ ! -d "$LFS_BUILD/libiconv" ]; then + tar -xf "$BASE_DIR/sources/libiconv-1.17.tar.gz" + mv "libiconv-1.17" "$LFS_BUILD/libiconv" + fi + cd "$LFS_BUILD/libiconv" + + mkdir -vp build + cd build + + "../configure" \ + --prefix=/usr \ + --host=${LFS_TGT} \ + --build=${BUILD_MACHINE_TRIPLET} \ + --enable-extra-encodings \ + --cache-file=config.cache + + # workaround for insecure rpath + sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool + sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool + + make -j 32 + make -j 32 DESTDIR="$LFS" install + + cd "$BASE_DIR" + + touch "$STEPS_DIR/libiconv" +fi + ## build gettext #if [ ! -f "$STEPS_DIR/gettext" ]; then # if [ ! -d "$LFS_BUILD/gettext" ]; then