Thread (35 messages) 35 messages, 5 authors, 2021-01-26

Re: [dpdk-dev] [PATCH v2 2/3] ci: add aarch64 clang cross-compilation builds

From: Juraj Linkeš <hidden>
Date: 2020-10-01 14:43:37

-----Original Message-----
From: Aaron Conole <aconole@redhat.com>
Sent: Thursday, October 1, 2020 3:32 PM
To: Juraj Linkeš <redacted>
Cc: thomas@monjalon.net; david.marchand@redhat.com;
maicolgabriel@hotmail.com; dev@dpdk.org
Subject: Re: [PATCH v2 2/3] ci: add aarch64 clang cross-compilation builds

Juraj Linkeš [off-list ref] writes:
quoted
Mirror the existing gcc jobs - build static and shared libs.
Use arm64_armv8_linux_clang_ubuntu1804 meson cross file.

Signed-off-by: Juraj Linkeš <redacted>
---
 .ci/linux-build.sh |  9 +++++++--
 .travis.yml        | 22 ++++++++++++++++++++--
 2 files changed, 27 insertions(+), 4 deletions(-)
diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
d079801d7..137f51e91 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -28,11 +28,16 @@ install_libabigail() {
     rm ${version}.tar.gz
 }

-if [ "$AARCH64" = "1" ]; then
+if [ "$AARCH64_GCC" = "1" ]; then
Why do we need to do this?

CC_FOR_BUILD and CC should be either 'gcc' or 'clang' - so we could just key off
of those instead of having to do this new set of variables, yes?
I didn't think of these variables. I'll make use of them, that's better, thanks.
quoted
     # convert the arch specifier
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi

+if [ "$AARCH64_CLANG" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file
config/arm/arm64_armv8_linux_clang_ubuntu1804"
quoted
+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_GCC" != "1" ] && [ "$AARCH64_CLANG" != 1 ]; then
     devtools/test-null.sh
 fi
diff --git a/.travis.yml b/.travis.yml index d6eeab371..1f769d823
100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,6 +18,10 @@ _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross,
pkg-config-aarch64-linux-gnu]

+_aarch64_clang_packages: &aarch64_clang_packages
+  - *required_packages
+  - [libgcc-8-dev-arm64-cross, libatomic1-arm64-cross,
+libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
+
 _build_32b_packages: &build_32b_packages
   - *required_packages
   - [gcc-multilib]
@@ -69,20 +73,34 @@ jobs:
         packages:
           - *build_32b_packages
   # x86_64 cross-compiling aarch64 jobs
-  - env: DEF_LIB="static" AARCH64=1
+  - env: DEF_LIB="static" AARCH64_GCC=1
     arch: amd64
     compiler: gcc
     addons:
       apt:
         packages:
           - *aarch64_packages
-  - env: DEF_LIB="shared" AARCH64=1
+  - env: DEF_LIB="shared" AARCH64_GCC=1
     arch: amd64
     compiler: gcc
     addons:
       apt:
         packages:
           - *aarch64_packages
+  - env: DEF_LIB="static" AARCH64_CLANG=1
+    arch: amd64
+    compiler: clang
+    addons:
+      apt:
+        packages:
+          - *aarch64_clang_packages
+  - env: DEF_LIB="shared" AARCH64_CLANG=1
+    arch: amd64
+    compiler: clang
+    addons:
+      apt:
+        packages:
+          - *aarch64_clang_packages
   # aarch64 gcc jobs
   - env: DEF_LIB="static"
     arch: arm64
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help