From: Thomas Monjalon Date: Mon, 18 Jul 2016 09:33:52 +0000 (+0200) Subject: mk: fix static link with glibc < 2.17 X-Git-Tag: spdx-start~6136 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2f6414f4baf1;p=dpdk.git mk: fix static link with glibc < 2.17 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 Tested-by: Yongjie Gu --- diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 886dbdd88f..eb28e115be 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