summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLijian.Zhang <Lijian.Zhang@arm.com>2020-04-30 14:52:15 +0800
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-08-18 09:54:56 +0000
commitd37ce966a30f16079bda6254c27c370efcedf276 (patch)
treeb40a205d8f91648c709bf9d16b9dcf0a0a4de6f4
parent0efdd24d0d406f9a4ea6817de3df3c4b08cd391c (diff)
dpdk: fix compiling issue with clang
When building vpp image with below command, clang reports warnings/errors on the unused option '-L', as it's not linking stage, and does not require linking libraries. In dpdk.mk, the linking library path should be attached to DPDK_EXTRA_LDFLAGS, instead of DPDK_EXTRA_CFLAGS $ make build-release CC=clang V=1 clang -Wp,-MD,./.ark_ddm.o.d.tmp -fPIE -fPIC -pthread -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/lib/librte_eal/linux/eal/include -march=armv8-a+crc -DRTE_MACHINE_CPUFLAG_NEON -DRTE_MACHINE_CPUFLAG_CRC32 -I/root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include -DRTE_USE_FUNCTION_VERSIONING -include /root/origin/build-root/build-vpp-native/external/dpdk-20.02/arm64-armv8a-linuxapp-clang/include/rte_config.h -D_GNU_SOURCE -O3 -I./ -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -Wpointer-arith -Wnested-externs -Wcast-qual -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated -Wno-missing-field-initializers -Wno-address-of-packed-member -Werror -g -mtune=generic -L/root/origin/build-root/install-vpp-native/external/lib -I/root/origin/build-root/install-vpp-native/external/include -o ark_ddm.o -c /root/origin/build-root/build-vpp-native/external/dpdk-20.02/drivers/net/ark/ark_ddm.c == Build drivers/vdpa/ifc clang: warning: argument unused during compilation: '-L/root/origin/build-root/install-vpp-native/external/lib' [-Wunused-command-line-argument] clang: error: argument unused during compilation: '-L/root/origin/build-root/install-vpp-native/external/lib' [-Werror,-Wunused-command-line-argument] Type: fix Change-Id: If8fd9b19d0aff9d3c27d77e78cd3064bb1ad6565 Signed-off-by: Lijian Zhang <Lijian.Zhang@arm.com> Reviewed-by: Jieqiang Wang <Jieqiang.Wang@arm.com> Reviewed-by: Govindarajan Mohandoss <Govindarajan.Mohandoss@arm.com> (cherry picked from commit 88d6ce2bee53b7c9f876aa78c5db8ab1ea75c08a)
-rw-r--r--build/external/packages/dpdk.mk3
1 files changed, 2 insertions, 1 deletions
diff --git a/build/external/packages/dpdk.mk b/build/external/packages/dpdk.mk
index 7e8af071f53..d38e015a037 100644
--- a/build/external/packages/dpdk.mk
+++ b/build/external/packages/dpdk.mk
@@ -155,7 +155,8 @@ endif
endif
endif
-DPDK_EXTRA_CFLAGS += -L$(I)/lib -I$(I)/include
+DPDK_EXTRA_CFLAGS += -I$(I)/include
+DPDK_EXTRA_LDFLAGS += -L$(I)/lib
# assemble DPDK make arguments
DPDK_MAKE_ARGS := -C $(DPDK_SOURCE) -j $(JOBS) \