path: root/examples
diff options
authorThomas Monjalon <>2016-07-25 12:10:55 +0200
committerThomas Monjalon <>2016-07-25 17:54:57 +0200
commitaaf6065be5fe68fcfbb195caeccdd4cbcdfb56e1 (patch)
tree66ed4a38c357c3ab7f465659b1907b91eb3e2af6 /examples
parent29361d4c91eddaf7798076322345ef2b151e0241 (diff)
mk: fix link with glibc < 2.17
There is a dependency on librt with old glibc. The -lrt option was added everywhere it is needed but was also added in some applications makefiles as the first link option. The problem is this option is really useful only if added after the objects or libraries using it (except if using --whole-archive). And the -lrt options put after were removed to avoid duplicates. It was resulting in errors linking test application: eal_timer.c:(.text+0x128): undefined reference to `clock_gettime' eal_timer.c:(.text+0x166): undefined reference to `clock_gettime' eal_alarm.c:(.text+0xda): undefined reference to `clock_gettime' eal_alarm.c:(.text+0x211): undefined reference to `clock_gettime' It is fixed by removing superfluous -lrt in app makefiles. Fixes: 281948b4753e ("mk: fix missing librt dependencies") Fixes: 2f6414f4baf1 ("mk: fix static link with glibc < 2.17") Reported-by: Piotr Azarewicz <> Signed-off-by: Thomas Monjalon <>
Diffstat (limited to 'examples')
1 files changed, 0 insertions, 1 deletions
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index d241730..b77cf71 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -46,7 +46,6 @@ SRCS-y := ptpclient.c
-LDLIBS += -lrt
# workaround for a gcc bug with noreturn attribute