[v11,6/7] ci: add aarch64 -> aarch32 cross compiling jobs
Checks
Commit Message
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>
---
.ci/linux-build.sh | 7 ++++++-
.travis.yml | 19 +++++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
Comments
Juraj Linkeš <juraj.linkes@pantheon.tech> writes:
> 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>
FYI, travis is intermittent right now due to their planned switch to a
credit system.
@@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
fi
+if [ "$AARCH32" = "1" ]; then
+ # convert the arch specifier
+ OPTS="$OPTS --cross-file config/arm/arm32_armv8a_linux_gcc"
+fi
+
if [ "$BUILD_DOCS" = "1" ]; then
OPTS="$OPTS -Denable_docs=true"
fi
@@ -53,7 +58,7 @@ OPTS="$OPTS --buildtype=debugoptimized"
meson build --werror $OPTS
ninja -C build
-if [ "$AARCH64" != "1" ]; then
+if [ "$AARCH64" != "1" ] && [ "$AARCH32" != "1" ]; then
devtools/test-null.sh
fi
@@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
- *required_packages
- [gcc-aarch64-linux-gnu, 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]
+
_build_32b_packages: &build_32b_packages
- *required_packages
- [gcc-multilib]
@@ -104,6 +108,21 @@ jobs:
packages:
- *required_packages
- *doc_packages
+ # aarch64 cross-compiling aarch32 jobs
+ - env: DEF_LIB="shared" AARCH32=1
+ arch: arm64
+ compiler: gcc
+ addons:
+ apt:
+ packages:
+ - *arm_32b_packages
+ - env: DEF_LIB="static" AARCH32=1
+ arch: arm64
+ compiler: gcc
+ addons:
+ apt:
+ packages:
+ - *arm_32b_packages
# aarch64 clang jobs
- env: DEF_LIB="static"
arch: arm64