[v14,6/7] ci: add aarch64 -> aarch32 cross compiling jobs

Message ID 1615988163-17371-7-git-send-email-juraj.linkes@pantheon.tech (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series aarch64 -> aarch32 cross compilation support |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš March 17, 2021, 1:36 p.m. UTC
  Add two jobs (static and shared libs), both building on aarch64 and
producing 32-bit arm binaries executable on armv8-a, but not armv7.
Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Aaron Conole <aconole@redhat.com>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)
  

Patch

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index 91e43a975b..73a9c234ca 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -62,6 +62,11 @@  if [ "$AARCH64" = "true" ]; then
     fi
 fi
 
+if [ "$AARCH32" = "true" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
 if [ "$BUILD_DOCS" = "true" ]; then
     OPTS="$OPTS -Denable_docs=true"
 fi
@@ -84,7 +89,7 @@  OPTS="$OPTS -Dcheck_includes=true"
 meson build --werror $OPTS
 ninja -C build
 
-if [ "$AARCH64" != "true" ]; then
+if [ "$AARCH64" != "true" ] && [ "$AARCH32" != "true" ]; then
     failed=
     configure_coredump
     devtools/test-null.sh || failed="true"
diff --git a/.travis.yml b/.travis.yml
index 7ed982ac07..c4bd2d079b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -25,6 +25,10 @@  _aarch64_clang_packages: &aarch64_clang_packages
   - *required_packages
   - [libgcc-7-dev-arm64-cross, libatomic1-arm64-cross, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_32b_packages: &arm_32b_packages
+  - *required_packages
+  - [gcc-arm-linux-gnueabihf, libc6-dev-armhf-cross, pkg-config-arm-linux-gnueabihf]
+
 _libabigail_build_packages: &libabigail_build_packages
   - [autoconf, automake, libtool, pkg-config, libxml2-dev, libdw-dev]
 
@@ -168,3 +172,18 @@  jobs:
     virt: vm
     group: edge
     compiler: clang
+  # aarch64 cross-compiling aarch32 jobs
+  - env: DEF_LIB="shared" AARCH32=true
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages
+  - env: DEF_LIB="static" AARCH32=true
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_32b_packages