This patch seems reasonable to me, but I'd better leave it to Waldek to
test that it doesn't break his own cross-compilation setup and commit it.
Thanks.

--
Nadav Har'El
n...@scylladb.com


On Sun, Feb 14, 2021 at 5:30 AM Punit Agrawal <punitagra...@gmail.com>
wrote:

> Hi,
>
> 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
>   Makefile: Rework boost detection to enable cross compilation
>
>  Makefile      | 38 ++++++++++++++++----------------------
>  scripts/build | 17 ++++++++---------
>  2 files changed, 24 insertions(+), 31 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 osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/CANEVyjsDKgPTgwTk%3D%3Du%3DHvd8eaG4EfNLJwxZQu7ePuqeOoo2xQ%40mail.gmail.com.

Reply via email to