Compiled on RPI4B-4G with 5.10.77-piCore-v8 Compile Flags: CFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto -fuse-linker-plugin -fno-exceptions' CXXFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe -flto -fuse-linker-plugin -fno-exceptions -fno-rtti' LDFLAGS='-Wl,-O1' export CFLAGS CXXFLAGS LDFLAGS Dependencies: compiletc automake libtool-dev python3.8 llvm-bin Commands: wget https://gitlab.gnome.org/GNOME/libxml2/-/archive/v2.9.13/libxml2-v2.9.13.tar.gz tar -xf libxml2-v2.9.13.tar.gz cd libxml2-v2.9.13/ # fix LTO plugin P=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/10.2.0/liblto_plugin.so.0.0.0 sudo mkdir -p /usr/local/lib/bfd-plugins sudo ln -sfv $P /usr/local/lib/bfd-plugins/liblto_plugin.so ./autogen.sh --prefix=/usr/local --enable-shared --enable-static --with-python=/usr/local/bin/python3 time make -j4 real 2m 12.22s user 3m 14.75s sys 0m 13.99s DESTDIR=/tmp/packing-libxml2 make install llvm-strip --strip-debug /tmp/packing-libxml2/usr/local/lib/*.a llvm-strip --strip-debug /tmp/packing-libxml2/usr/local/lib/python3.8/site-packages/*.a # dev mkdir -p /tmp/packing-libxml2-dev/usr/local/lib mv /tmp/packing-libxml2/usr/local/include /tmp/packing-libxml2-dev/usr/local mv /tmp/packing-libxml2/usr/local/lib/*a /tmp/packing-libxml2-dev/usr/local/lib mv /tmp/packing-libxml2/usr/local/lib/pkgconfig/ /tmp/packing-libxml2-dev/usr/local/lib mv /tmp/packing-libxml2/usr/local/lib/cmake /tmp/packing-libxml2-dev/usr/local/lib mv /tmp/packing-libxml2/usr/local/lib/xml2Conf.sh /tmp/packing-libxml2-dev/usr/local/lib mkdir -p /tmp/packing-libxml2-dev/usr/local/share mv /tmp/packing-libxml2/usr/local/share/aclocal/ /tmp/packing-libxml2-dev/usr/local/share mkdir -p /tmp/packing-libxml2-dev/usr/local/bin mv /tmp/packing-libxml2/usr/local/bin/xml2-config /tmp/packing-libxml2-dev/usr/local/bin mkdir -p /tmp/packing-libxml2-dev/usr/local/lib/python3.8/site-packages mv /tmp/packing-libxml2/usr/local/lib/python3.8/site-packages/*a /tmp/packing-libxml2-dev/usr/local/lib/python3.8/site-packages # python mkdir -p /tmp/packing-libxml2-python/usr/local/lib/ mv /tmp/packing-libxml2/usr/local/lib/python3.8 /tmp/packing-libxml2-python/usr/local/lib/ # doc mkdir -p /tmp/packing-libxml2-doc/usr/local/ mv /tmp/packing-libxml2/usr/local/share /tmp/packing-libxml2-doc/usr/local/ # bin mkdir -p /tmp/packing-libxml2-bin/usr/local/ mv /tmp/packing-libxml2/usr/local/bin /tmp/packing-libxml2-bin/usr/local/ # strip strip --strip-unneeded /tmp/packing-libxml2-bin/usr/local/bin/* strip --strip-unneeded /tmp/packing-libxml2/usr/local/lib/libxml2.so.2.9.13 strip --strip-unneeded /tmp/packing-libxml2-python/usr/local/lib/python3.8/site-packages/*so # squash cd /tmp sudo chown -R root:root packing-libxml2* for D in packing-libxml2*; do mksquashfs $D ${D#packing-}.tcz -quiet; done