From ee57ae6598d3a4b2c2d39ed3a7f47b15162a66d0 Mon Sep 17 00:00:00 2001
From: Robert Schmidt <robert.schmidt@openairinterface.org>
Date: Tue, 28 May 2024 13:30:38 +0200
Subject: [PATCH] doc/cross-compile.md: update some text, compile with ninja

---
 cmake_targets/cross-arm.cmake |  4 ++--
 doc/cross-compile.md          | 14 +++++++++-----
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/cmake_targets/cross-arm.cmake b/cmake_targets/cross-arm.cmake
index 6209245876c..5384c09c5a6 100644
--- a/cmake_targets/cross-arm.cmake
+++ b/cmake_targets/cross-arm.cmake
@@ -1,8 +1,8 @@
 set(CMAKE_SYSTEM_NAME Linux)
 set(CMAKE_SYSTEM_PROCESSOR arm)
 
-set(CMAKE_C_COMPILER   /usr/bin/aarch64-linux-gnu-gcc-9)
-set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-9)
+set(CMAKE_C_COMPILER   /usr/bin/aarch64-linux-gnu-gcc-11)
+set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-11)
 
 set(CROSS_COMPILE 1)
 set(bnProc_gen_128_DIR    ${CMAKE_CURRENT_BINARY_DIR}/${NATIVE_DIR}) # /../build)
diff --git a/doc/cross-compile.md b/doc/cross-compile.md
index b452aabb9d8..ce61ce2e402 100644
--- a/doc/cross-compile.md
+++ b/doc/cross-compile.md
@@ -46,11 +46,15 @@ sudo apt-get install -y \
     zlib1g-dev:arm64
 ```
 
+The above enables apt to download packages for arm64. It also installs
+gcc cross-compilers for aarch64 in version 11. This version needs to match the
+versions of gcc defined in the cmake cross-compilation file (`cross-arm.cmake`).
+
 ## Install and Build
 
 ### Install required packages
 
-Use the host compiler to install some dependencies.
+Use the host compiler to install its dependencies.
 
 ```shell
 cd cmake_targets
@@ -85,9 +89,9 @@ be defined in order to tell cmake where the host tools have been built.
 
 ```shell
 cd ../build-cross
-cmake ../../.. -DCMAKE_TOOLCHAIN_FILE=../../../cmake_targets/cross-arm.cmake -DNATIVE_DIR=../build
+cmake ../../.. -GNinja -DCMAKE_TOOLCHAIN_FILE=../../../cmake_targets/cross-arm.cmake -DNATIVE_DIR=../build
 
-make -j`nproc` dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim
-make -j`nproc` lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem
-make -j`nproc` params_libconfig coding rfsimulator
+ninja -j`nproc` dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim
+ninja -j`nproc` lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem
+ninja -j`nproc` params_libconfig coding rfsimulator
 ```
-- 
GitLab