Hi,

This is the second version of the patch to enable cross building OSv
in multiarch distros. This version updates the second patch to rely on
the newly added boost_base support.

Cover letter from previous version - 

Here's a couple of fixes to rely on the compiler to resolve library
locations during the build rather than using hard coded paths in the
build/Makefile when cross compiling. 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 environment -

    # 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-

I've tested this on Debian both native and cross. Any additional
testing especially on Fedora / CentOS which do not provide multiarch
would be appreciated.

Thanks,
Punit

Punit Agrawal (2):
  scripts/build: Simplify libgcc_s.so.1 detection
  Simplify boost library detection logic

 Makefile           | 33 ++++++++++-----------------------
 modules/common.gmk | 27 +++++++--------------------
 scripts/build      | 17 ++++++++---------
 3 files changed, 25 insertions(+), 52 deletions(-)

-- 
2.29.2

-- 
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/20210215124906.792439-1-punitagrawal%40gmail.com.

Reply via email to