From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by dpdk.org (Postfix) with ESMTP id E46771BA5A for ; Tue, 15 May 2018 11:24:11 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1FE721435 for ; Tue, 15 May 2018 02:24:11 -0700 (PDT) Received: from net-debian.shanghai.arm.com (net-debian.shanghai.arm.com [10.169.36.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id C387B3F23C for ; Tue, 15 May 2018 02:24:10 -0700 (PDT) From: Gavin Hu To: dev@dpdk.org Date: Tue, 15 May 2018 05:23:44 -0400 Message-Id: <1526376227-25534-1-git-send-email-gavin.hu@arm.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1526372924-28411-1-git-send-email-gavin.hu@arm.com> References: <1526372924-28411-1-git-send-email-gavin.hu@arm.com> Subject: [dpdk-dev] [PATCH v2 1/4] app: add LDFLAGS -latomic to link atomic lib X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2018 09:24:12 -0000 For ARM64 platform, libdpdk.a includes the librte_pmd_octeontx_ssovf.a, which requires the libatomic.a support.The atomic lib is built-in in the gcc toolchain, but for clang it has to be explicitly linked. For more details, please refer to https://clang.llvm.org/docs/Toolchain.html ~/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_cancel_burst': timvf_worker.c:(.text+0x80): undefined reference to `__atomic_fetch_add_8' /home/gavin/arm_repo/dpdk/build/lib/librte_pmd_octeontx_ssovf.a(timvf_worker.o): In function `timvf_timer_arm_burst_sp': timvf_worker.c:(.text+0x200): undefined reference to `__atomic_fetch_add_8' timvf_worker.c:(.text+0x244): undefined reference to `__atomic_store_2' timvf_worker.c:(.text+0x278): undefined reference to `__atomic_fetch_add_4' timvf_worker.c:(.text+0x30c): undefined reference to `__atomic_store_2' Signed-off-by: Gavin Hu Reviewed-by: Honnappa Nagarahalli --- mk/rte.app.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 438f99d..bca8325 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -51,6 +51,7 @@ endif # Link only the libraries used in the application LDFLAGS += --as-needed +LDFLAGS += -latomic # default path for libs _LDLIBS-y += -L$(RTE_SDK_BIN)/lib -- 2.1.4