Rather than patch the dpdk makefile and a template config file, we can
pass the -fPIC flag via EXTRA_CFLAGS.
This is more reliable than expecting the dpdk file names to be kept
unchanged.

Signed-off-by: David Marchand <[email protected]>
---
This patch applies on top of Ilya proposed change [1].

1: https://patchwork.ozlabs.org/patch/1113982/

---
 .travis/linux-build.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/.travis/linux-build.sh b/.travis/linux-build.sh
index b88bfb5..cd8cfcf 100755
--- a/.travis/linux-build.sh
+++ b/.travis/linux-build.sh
@@ -74,8 +74,6 @@ function install_dpdk()
         if [ $DIR_NAME != "dpdk-$1"  ]; then mv $DIR_NAME dpdk-$1; fi
         cd dpdk-$1
     fi
-    echo 'CONFIG_RTE_BUILD_FPIC=y' >>config/common_linuxapp
-    sed -ri '/EXECENV_CFLAGS  = -pthread -fPIC/{s/$/\nelse ifeq 
($(CONFIG_RTE_BUILD_FPIC),y)/;s/$/\nEXECENV_CFLAGS  = -pthread -fPIC/}' 
mk/exec-env/linuxapp/rte.vars.mk
 
     make config CC=gcc T=$TARGET
 
@@ -88,7 +86,7 @@ function install_dpdk()
     sed -i '/CONFIG_RTE_EAL_IGB_UIO=y/s/=y/=n/' build/.config
     sed -i '/CONFIG_RTE_KNI_KMOD=y/s/=y/=n/' build/.config
 
-    make -j4 CC=gcc
+    make -j4 CC=gcc EXTRA_CFLAGS='-fPIC'
     echo "Installed DPDK source in $(pwd)"
     cd ..
 }
-- 
1.8.3.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to