From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH] mk: fix static link with glibc < 2.17 Date: Mon, 18 Jul 2016 11:43:45 +0200 Message-ID: <1468835025-3333-1-git-send-email-thomas.monjalon@6wind.com> To: dev@dpdk.org Return-path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 6CD272C07 for ; Mon, 18 Jul 2016 11:44:18 +0200 (CEST) Received: by mail-wm0-f44.google.com with SMTP id o80so108007244wme.1 for ; Mon, 18 Jul 2016 02:44:18 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id kj4sm279205wjb.12.2016.07.18.02.44.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jul 2016 02:44:17 -0700 (PDT) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There is an error when linking static EAL library with an application: eal_alarm.c:(.text+0xd7): undefined reference to `clock_gettime' eal_alarm.c:(.text+0x20f): undefined reference to `clock_gettime' eal_timer.c:(.text+0x108): undefined reference to `clock_gettime' eal_timer.c:(.text+0x146): undefined reference to `clock_gettime' The function clock_gettime() is in librt for old glibc. Fixes: 281948b4753e ("mk: fix missing librt dependencies") Signed-off-by: Thomas Monjalon --- mk/rte.app.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 886dbdd..eb28e11 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -151,6 +151,7 @@ _LDLIBS-y += --no-whole-archive ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n) # The static libraries do not know their dependencies. # So linking with static library requires explicit dependencies. +_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL) += -lrt _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lm _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED) += -lrt _LDLIBS-$(CONFIG_RTE_LIBRTE_METER) += -lm -- 2.7.0