From a252cf7c59a6e649274c63465b202c7c41216257 Mon Sep 17 00:00:00 2001 From: Kamil Godzwon Date: Mon, 19 Sep 2022 09:40:43 -0400 Subject: [PATCH] dpdkbuild: disable LTO while using clang compiler Disable LTO while using clang compiler due to unsupported fat LTO objects error. Signed-off-by: Kamil Godzwon Change-Id: I511e92144c974e8a55d503f58d2ae45bef62eb68 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14557 Reviewed-by: Michal Berger Reviewed-by: Konrad Sztyber Reviewed-by: Tomasz Zawadzki Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins --- dpdkbuild/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dpdkbuild/Makefile b/dpdkbuild/Makefile index cf4607ce4..d7a37975e 100644 --- a/dpdkbuild/Makefile +++ b/dpdkbuild/Makefile @@ -24,8 +24,11 @@ DPDK_OPTS += --buildtype=debug endif ifeq ($(CONFIG_LTO),y) +# dpdk complains about compiler not supporting fat LTO objects when clang is in use so don't enable it in such a instance +ifneq ($(CC_TYPE),clang) DPDK_OPTS += -Db_lto=true endif +endif # the drivers we use DPDK_DRIVERS = bus bus/pci bus/vdev mempool/ring