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

Aaron Conole aconole at redhat.com
Thu Oct 1 15:31:49 CEST 2020


Juraj Linkeš <juraj.linkes at pantheon.tech> writes:

> Mirror the existing gcc jobs - build static and shared libs.
> Use arm64_armv8_linux_clang_ubuntu1804 meson cross file.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes at pantheon.tech>
> ---
>  .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?

>      # 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"
> +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



More information about the dev mailing list