added
mips32r2_uclibc_gclibcxx_dyn, (preferred atm, tested on prod hw)
mips32r2_uclibc_gclibcxx_static
targets (shared) and renamed previous uclibc ones to
mips32r2_uclibc_uclibcxx_dyn,
mips32r2_uclibc_uclibcxx_static
for clarity (i.e. non-shared, pure ones)
reworked builder classes to use inheritance of properties and
methods (instead of copying boiler plate code)
mips32r2_uclibc_gclibcxx_dyn target compiles and tested to run on
production targets such as avm routers modified with a freetz env.
See cm8/freetz@41d97c3789 for one of
many possible projects to build a working toolchain with. In short
- git clone
- umask 0022
- make menuconfig (choose expert, disable toolchain download and
let the toolchain/make scripts built a gcc-5.x one, do not forget
to set FREETZ_LIB_libuClibc__WITH_WCHAR=y)
- read the commit message for further info on long double math
peculiarities
- tested here with 0.9.33.2
Remember that swap will need to be running on the box, or else
kiwix-serve is likely to quit with "invalid lzma stream in cluster"
errors (if memory is too low).
If the box lacks library support such as libstdc++.so*, you can
copy them from the target toolchain libdir over to
BUILD_mips32r2_uclibc_gclibcxx_dyn/INSTALL/lib if there are
unsatisfied dependencies at runtime. (Which libraries need to be
supplemented this way depends on your firmware and/or freetz
configuration).
Another issue is the execution in non-standard installation
directories. LD_LIBRARY_PATH env needs to point to "our" lib
directory. If you tar INSTALL/ dir, transport the result to
an embedded device, untar and wan't to run from there, it is
best to wrap all the elf binaries with a shell script that
correctly sets LD_LIBRARY_PATH. This step has been automated,
but needs testing, see
kiwixbuild/patches/fixenv-run-in-nonstd-installdir.sh
for details.
This fixenv script is copied to INSTALL/bin during the
build and it should be run on the box, if kiwix-tools is to
reside in nonstd location (i.e. if files are not installed
or installable to /bin, /lib or their usr/ pendants).
Feel free to improve on automation of the necessary setup
steps to make mips port build and deployment easier.