diff mbox series

[v16,7/8] ci: add aarch64 -> aarch32 cross compiling jobs

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

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš April 21, 2021, 8:50 a.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(-)
diff mbox series

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 898cffd998..bb94221d08 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