Changeset 16962 in niluje


Ignore:
Timestamp:
Mar 17, 2020, 5:08:38 PM (2 weeks ago)
Author:
NiLuJe
Message:

Nickel Sysroot:

  • Update ICU to Kobo's tree
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Configs/trunk/Kindle/Misc/kobo-nickel-sysroot.sh

    r16961 r16962  
    174174#       instead of relying on ELF symbol versioning, like everybody else, it actually *renames* the symbol names themselves.
    175175#       Gentoo defaults to unsuffixed symbols, because that's the only sane approach to this mess (via --disable-renaming and the matching define tweak, c.f., x-compile.sh),
    176 #       but the truly ancient version shipped by Kobo features such suffixes...
    177 #       Sooo, build that truly old version, with the suffix, just to be safe...
     176#       but the version shipped by Kobo features such suffixes...
     177#       Sooo, build the Kobo version, with the suffix, just to be safe...
    178178if [[ "${TC_WANT_QT_LTS}" == "true" ]] ; then
    179179        echo "* Building ICU 65.1 . . ."
     
    187187        patch -p1 < ${PORTAGE_DIR}/dev-libs/icu/files/icu-64.2-darwin.patch
    188188        patch -p1 < ${PORTAGE_DIR}/dev-libs/icu/files/icu-64.1-data_archive_generation.patch
     189        patch -p1 < ${PORTAGE_DIR}/dev-libs/icu/files/icu-65.1-integer-overflow.patch
    189190        sed -i -e "s:LDFLAGSICUDT=-nodefaultlibs -nostdlib:LDFLAGSICUDT=:" config/mh-linux
    190191        sed -i -e 's:icudefs.mk:icudefs.mk Doxyfile:' configure.ac
     
    220221        cd ..
    221222else
    222         echo "* Building ICU 4.6.1 . . ."
    223         echo ""
    224         ICU_SOVER="46.1"
    225         cd ..
    226         wget "http://download.icu-project.org/files/icu4c/4.6.1/icu4c-4_6_1-src.tgz" -O icu4c-4_6_1-src.tgz
    227         tar -I pigz -xvf icu4c-4_6_1-src.tgz
    228         cd icu/source
    229         update_title_info
     223        # NOTE: Kobo updated from 4.6.1 to 64.2 around the 4.19 release (I forgot the exact release ;p).
     224        echo "* Building ICU 64.2 . . ."
     225        echo ""
     226        ICU_SOVER="64.2"
     227        cd ..
     228        rm -rf icu
     229        until git clone -b kobo --single-branch --depth 1 https://github.com/kobolabs/icu.git ; do
     230                rm -rf icu
     231                sleep 15
     232        done
     233        cd icu/icu4c/source
     234        update_title_info
     235        patch -p1 < ${PORTAGE_DIR}/dev-libs/icu/files/icu-64.2-darwin.patch
     236        patch -p1 < ${PORTAGE_DIR}/dev-libs/icu/files/icu-64.1-data_archive_generation.patch
    230237        sed -i -e "s:LDFLAGSICUDT=-nodefaultlibs -nostdlib:LDFLAGSICUDT=:" config/mh-linux
     238        sed -i -e 's:icudefs.mk:icudefs.mk Doxyfile:' configure.ac
    231239        autoreconf -fi
    232240        # Cross-Compile fun...
    233         mkdir ../../icu-host
    234         cd ../../icu-host
    235         env CFLAGS="" CXXFLAGS="" ASFLAGS="" LDFLAGS="" CC="gcc" CXX="g++" AR="ar" RANLIB="ranlib" NM="nm" LD="ld" ../icu/source/configure --enable-renaming --disable-debug --disable-samples --enable-static
     241        mkdir ../../../icu-host
     242        cd ../../../icu-host
     243        env CFLAGS="" CXXFLAGS="" ASFLAGS="" LDFLAGS="" CC="gcc" CXX="g++" AR="ar" RANLIB="ranlib" NM="nm" LD="ld" ../icu/source/configure --enable-renaming --disable-debug --disable-samples --disable-layoutex --enable-static
    236244        # NOTE: Don't care about verbose output for the host build ;).
    237245        make ${JOBSFLAGS}
     
    241249        export CXX="${CROSS_TC}-g++"
    242250        export LD="${CROSS_TC}-ld"
     251        # ICU 64.x requires C++11
     252        if [[ "${TC_WANT_QT_LTS}" == "true" ]] ; then
     253                # Match the Qt std level, just in case...
     254                export CXXFLAGS="${NOLTO_CFLAGS} -std=c++14"
     255        else
     256                export CXXFLAGS="${NOLTO_CFLAGS} -std=c++11"
     257        fi
     258        # Use Kobo's config to tone down the size of the ICU Data lib (c.f., https://github.com/unicode-org/icu/blob/master/docs/userguide/icu_data/buildtool.md)
     259        export ICU_DATA_FILTER_FILE="${PWD}/kobo.json"
    243260        # Huh. Why this only shows up w/ LTO is a mystery...
    244261        export ac_cv_c_bigendian=no
    245         ./configure --prefix=${TC_BUILD_DIR} --host=${CROSS_TC} --disable-static --enable-shared --enable-renaming --disable-samples --disable-debug --with-cross-build="${TC_BUILD_WD}/icu-host"
     262        ./configure --prefix=${TC_BUILD_DIR} --host=${CROSS_TC} --disable-static --enable-shared --enable-renaming --disable-samples --disable-layoutex --disable-debug --with-cross-build="${TC_BUILD_WD}/icu-host"
    246263        make ${JOBSFLAGS} VERBOSE=1
    247264        make install
    248265        unset ac_cv_c_bigendian
     266        unset ICU_DATA_FILTER_FILE
    249267        export CXXFLAGS="${NOLTO_CFLAGS}"
    250268        unset LD
    251269        unset CXX
    252270        unset CC
    253         cd ..
     271        cd ../..
    254272fi
    255273
Note: See TracChangeset for help on using the changeset viewer.