diff mbox series

[ovs-dev,v1] Travis: Fix path search issue for AFXDP on arm CI

Message ID 20200724054629.16043-1-Lance.Yang@arm.com
State Not Applicable
Headers show
Series [ovs-dev,v1] Travis: Fix path search issue for AFXDP on arm CI | expand

Commit Message

Lance Yang July 24, 2020, 5:46 a.m. UTC
The current AFXDP job only supports x86 on Travis CI. The patch only
fixes some issues for arm CI. It did not add AFXDP as an additional job
for arm CI. The following issues are fixed:

1. The header file cdefs.h is under different path on arm, this patch adds
the path for searching headers in linux-build.sh.

2. GCC on arm does not search a library path, causing the bfp
library cannot be found during compilation. To fix this library link issue,
this patch adds the bfp library search path in CFLAGS.

The fix of above issues will help developers who want to manually run
AFXDP job on arm CI when they validate their patches.

Reviewed-by: Yanqin Wei <Yanqin.Wei@arm.com>
Signed-off-by: Lance Yang <Lance.Yang@arm.com>
---
 .travis/linux-build.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index 02615a8ec..ec92c92d0 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -71,8 +71,16 @@  function install_kernel()
         # The Linux kernel defines __always_inline in stddef.h (283d7573), and
         # sys/cdefs.h tries to re-define it.  Older libc-dev package in xenial
         # doesn't have a fix for this issue.  Applying it manually.
-        sudo sed -i '/^# define __always_inline .*/i # undef __always_inline' \
-                    /usr/include/x86_64-linux-gnu/sys/cdefs.h || true
+        if [ "$TRAVIS_ARCH" == "aarch64" ]; then
+            sudo sed -i \
+                 '/^# define __always_inline .*/i # undef __always_inline' \
+                 /usr/include/aarch64-linux-gnu/sys/cdefs.h || true
+            CFLAGS_FOR_OVS="$CFLAGS_FOR_OVS -L/usr/local/lib64"
+        else
+            sudo sed -i \
+                '/^# define __always_inline .*/i # undef __always_inline' \
+                         /usr/include/x86_64-linux-gnu/sys/cdefs.h || true
+        fi
         EXTRA_OPTS="${EXTRA_OPTS} --enable-afxdp"
     else
         EXTRA_OPTS="${EXTRA_OPTS} --with-linux=$(pwd)"