Skip to contentSkip to conversation

overlay: fix link error due to missing -lrt

PATCH In review Rodrigo Vivi 3 participants 4 messages Sep 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 overlay: fix link error due to missing -lrt

CC Damien Lespiau <[email protected]>
---
 overlay/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)
overlay/Makefile.am +2 -0
index 426a3df..c648875 100644
@@ -65,4 +65,6 @@ intel_gpu_overlay_SOURCES += \
 
 intel_gpu_overlay_SOURCES += $(both_x11_sources)
 
+intel_gpu_overlay_LDADD = $(LDADD) -lrt
+
 EXTRA_DIST=README
Signature · 1 line
1.8.1.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Rodrigo Vivi
CC Damien Lespiau <[email protected]>

Ship it!

Signature · 1 line
Damien
Quoted 18 lines
---
 overlay/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)
overlay/Makefile.am +2 -0
index 426a3df..c648875 100644
@@ -65,4 +65,6 @@ intel_gpu_overlay_SOURCES += \
 
 intel_gpu_overlay_SOURCES += $(both_x11_sources)
 
+intel_gpu_overlay_LDADD = $(LDADD) -lrt
+
 EXTRA_DIST=README
Signature · 1 line
1.8.1.4
#2 lore raw
In reply to Rodrigo Vivi
Quoted 11 lines · Rodrigo Vivi
CC Damien Lespiau <[email protected]>
---
 overlay/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)
overlay/Makefile.am +0 -0
index 426a3df..c648875 100644

overlay/Makefile.am intel_gpu_overlay_SOURCES += \ · line 70

Quoted 6 lines
overlay/Makefile.am +2 -0
@@ -65,4 +65,6 @@ intel_gpu_overlay_SOURCES += \
 
 intel_gpu_overlay_SOURCES += $(both_x11_sources)
 
+intel_gpu_overlay_LDADD = $(LDADD) -lrt
+
 EXTRA_DIST=README

Assuming this is about clock_gettime (which really the commit message should say), there should be a configure check. Recent libc doesn't need it.

Cheers,
Julien

#3 lore raw
Quoted 16 lines · Julien Cristau
Quoted 14 lines · Rodrigo Vivi
CC Damien Lespiau <[email protected]>
---
 overlay/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)
overlay/Makefile.am +0 -0
index 426a3df..c648875 100644
@@ -65,4 +65,6 @@ intel_gpu_overlay_SOURCES += \
 
 intel_gpu_overlay_SOURCES += $(both_x11_sources)
 
Quoted 7 lines

overlay/Makefile.am intel_gpu_overlay_SOURCES += \ · line 70

Quoted 3 lines
overlay/Makefile.am +2 -0
+intel_gpu_overlay_LDADD = $(LDADD) -lrt
+
 EXTRA_DIST=README

Assuming this is about clock_gettime (which really the commit message should say), there should be a configure check. Recent libc doesn't need it.

Indeed. Always adding -lrt works but is, of course, not perfect. Note that we have other unconditional linking against librt already that could be audited.

One could steal what glib does and define a special CLOCK_GETTIME_LIBS variable that will end up either empty or equal to '-lrt':

https://git.gnome.org/browse/glib/tree/configure.ac#n2414

Signature · 1 line
Damien