DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mk: fix static link with glibc < 2.17
@ 2016-07-18  9:43 Thomas Monjalon
  2016-07-20  1:19 ` Gu, YongjieX
  0 siblings, 1 reply; 12+ messages in thread
From: Thomas Monjalon @ 2016-07-18  9:43 UTC (permalink / raw)
  To: 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 <thomas.monjalon@6wind.com>
---
 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-07-26  7:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18  9:43 [dpdk-dev] [PATCH] mk: fix static link with glibc < 2.17 Thomas Monjalon
2016-07-20  1:19 ` Gu, YongjieX
2016-07-21  8:22   ` Thomas Monjalon
2016-07-22 13:38     ` Azarewicz, PiotrX T
2016-07-22 13:43       ` Thomas Monjalon
2016-07-22 14:07         ` Azarewicz, PiotrX T
2016-07-22 14:14           ` Thomas Monjalon
2016-07-22 14:47             ` Azarewicz, PiotrX T
2016-07-22 15:05               ` Thomas Monjalon
2016-07-25 11:13                 ` Azarewicz, PiotrX T
2016-07-25 12:37                   ` Thomas Monjalon
2016-07-26  7:06                     ` Azarewicz, PiotrX T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).