Hi,
This is the third version of the patch to enable cross building OSv in
multiarch distros. This version updates the patches to use the
compiler to resolve the library locations before falling back to the
hard coded locations when cross compiling.
The changes enable cross compiling on multiarch distros while leaving
existing usage unchanged in other supported environments.
With these, I am able to cross build OSv for arm64 on Debian using -
$ export CROSS_PREFIX="aarch64-linux-gnu-"
$ ./scripts/build -j8 arch=aarch64 fs=rofs image=native-example
The following steps can be used to setup the cross environment on x86
installation -
# dpkg --add-architecture arm64
# apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
libboost-system-dev:arm64
As an additional benefit of the patches, it is now also possible to
use CROSS_PREFIX to speed up compilation for both native and cross
scenarios using ccache without messing with symlinks to compiler
binaries -
$ export CROSS_PREFIX="ccache " # native
or
$ export CROSS_PREFIX="ccache aarch64-linux-gnu-
The patches have been tested on Debian both native and cross. Any
additional testing especially on Fedora / CentOS which do not provide
multiarch would be appreciated.
Thanks,
Punit
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/osv-dev/20210219223813.842617-1-punitagrawal%40gmail.com.