[v4,4/4] ci: add aarch64 -> arm32 cross compiling jobs
diff mbox series

Message ID 1588155872-13032-5-git-send-email-juraj.linkes@pantheon.tech
State Superseded
Delegated to: David Marchand
Headers show
Series
  • aarch64 -> arm32 cross compilation support
Related show

Checks

Context Check Description
ci/Intel-compilation fail Compilation issues
ci/travis-robot warning Travis build: failed
ci/checkpatch success coding style OK

Commit Message

Juraj Linkeš April 29, 2020, 10:24 a.m. UTC
Add two jobs (static and shared libs), both building on aarch64 and
producing 32 bit arm binaries. Do not run tests in these jobs.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 .ci/linux-build.sh |  7 ++++++-
 .travis.yml        | 19 +++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

Comments

Aaron Conole May 5, 2020, 6:56 p.m. UTC | #1
Juraj Linkeš <juraj.linkes@pantheon.tech> writes:

> Add two jobs (static and shared libs), both building on aarch64 and
> producing 32 bit arm binaries. Do not run tests in these jobs.
>
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  .ci/linux-build.sh |  7 ++++++-
>  .travis.yml        | 19 +++++++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
> index d079801d7..3cc3d8bac 100755
> --- a/.ci/linux-build.sh
> +++ b/.ci/linux-build.sh
> @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
>      OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
>  fi
>  
> +if [ "$ARM" = "1" ]; then
> +    # convert the arch specifier
> +    OPTS="$OPTS --cross-file config/arm/arm_armv7a_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" ] && [ "$ARM" != "1" ]; then

Probably we should rewrite this check so that it is affirmative on
x86_64 - since there are outstanding proposals for PPC as well (and I
forsee the check to run test-null.sh getting bigger).  WDYT?

>      devtools/test-null.sh
>  fi
>  
> diff --git a/.travis.yml b/.travis.yml
> index 2d2292ff6..63939d2c5 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
>    - *required_packages
>    - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
>  
> +_arm_packages: &arm_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]
>  
> @@ -124,6 +128,21 @@ jobs:
>          packages:
>            - *required_packages
>            - *libabigail_build_packages
> +  # aarch64 cross-compiling arm jobs
> +  - env: DEF_LIB="shared" ARM=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_packages
> +  - env: DEF_LIB="static" ARM=1
> +    arch: arm64
> +    compiler: gcc
> +    addons:
> +      apt:
> +        packages:
> +          - *arm_packages
>    # aarch64 clang jobs
>    - env: DEF_LIB="static"
>      arch: arm64
Juraj Linkeš May 11, 2020, 7:05 a.m. UTC | #2
> -----Original Message-----
> From: Aaron Conole <aconole@redhat.com>
> Sent: Tuesday, May 5, 2020 8:56 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: bruce.richardson@intel.com; maicolgabriel@hotmail.com;
> Ruifeng.Wang@arm.com; dev@dpdk.org
> Subject: Re: [PATCH v4 4/4] ci: add aarch64 -> arm32 cross compiling jobs
> 
> Juraj Linkeš <juraj.linkes@pantheon.tech> writes:
> 
> > Add two jobs (static and shared libs), both building on aarch64 and
> > producing 32 bit arm binaries. Do not run tests in these jobs.
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > ---
> >  .ci/linux-build.sh |  7 ++++++-
> >  .travis.yml        | 19 +++++++++++++++++++
> >  2 files changed, 25 insertions(+), 1 deletion(-)
> >
> > diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh index
> > d079801d7..3cc3d8bac 100755
> > --- a/.ci/linux-build.sh
> > +++ b/.ci/linux-build.sh
> > @@ -33,6 +33,11 @@ if [ "$AARCH64" = "1" ]; then
> >      OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
> >  fi
> >
> > +if [ "$ARM" = "1" ]; then
> > +    # convert the arch specifier
> > +    OPTS="$OPTS --cross-file config/arm/arm_armv7a_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" ] && [ "$ARM" != "1" ]; then
> 
> Probably we should rewrite this check so that it is affirmative on
> x86_64 - since there are outstanding proposals for PPC as well (and I forsee the
> check to run test-null.sh getting bigger).  WDYT?

Well, my patchset introduces cross compilation from aarch64 -> arm32, so if we only check for x86_64 it would try to run arm32 binaries on aarch64 when doing this cross compilation. Maybe we could do a check using something like file ${testpmd} | grep $(uname -m) in test-null.sh?

> >      devtools/test-null.sh
> >  fi
> >
> > diff --git a/.travis.yml b/.travis.yml index 2d2292ff6..63939d2c5
> > 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -21,6 +21,10 @@ _aarch64_packages: &aarch64_packages
> >    - *required_packages
> >    - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross,
> > pkg-config-aarch64-linux-gnu]
> >
> > +_arm_packages: &arm_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]
> >
> > @@ -124,6 +128,21 @@ jobs:
> >          packages:
> >            - *required_packages
> >            - *libabigail_build_packages
> > +  # aarch64 cross-compiling arm jobs
> > +  - env: DEF_LIB="shared" ARM=1
> > +    arch: arm64
> > +    compiler: gcc
> > +    addons:
> > +      apt:
> > +        packages:
> > +          - *arm_packages
> > +  - env: DEF_LIB="static" ARM=1
> > +    arch: arm64
> > +    compiler: gcc
> > +    addons:
> > +      apt:
> > +        packages:
> > +          - *arm_packages
> >    # aarch64 clang jobs
> >    - env: DEF_LIB="static"
> >      arch: arm64

Patch
diff mbox series

diff --git a/.ci/linux-build.sh b/.ci/linux-build.sh
index d079801d7..3cc3d8bac 100755
--- a/.ci/linux-build.sh
+++ b/.ci/linux-build.sh
@@ -33,6 +33,11 @@  if [ "$AARCH64" = "1" ]; then
     OPTS="$OPTS --cross-file config/arm/arm64_armv8_linux_gcc"
 fi
 
+if [ "$ARM" = "1" ]; then
+    # convert the arch specifier
+    OPTS="$OPTS --cross-file config/arm/arm_armv7a_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" ] && [ "$ARM" != "1" ]; then
     devtools/test-null.sh
 fi
 
diff --git a/.travis.yml b/.travis.yml
index 2d2292ff6..63939d2c5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,10 @@  _aarch64_packages: &aarch64_packages
   - *required_packages
   - [gcc-aarch64-linux-gnu, libc6-dev-arm64-cross, pkg-config-aarch64-linux-gnu]
 
+_arm_packages: &arm_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]
 
@@ -124,6 +128,21 @@  jobs:
         packages:
           - *required_packages
           - *libabigail_build_packages
+  # aarch64 cross-compiling arm jobs
+  - env: DEF_LIB="shared" ARM=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_packages
+  - env: DEF_LIB="static" ARM=1
+    arch: arm64
+    compiler: gcc
+    addons:
+      apt:
+        packages:
+          - *arm_packages
   # aarch64 clang jobs
   - env: DEF_LIB="static"
     arch: arm64