From 1e04ee16eaa55a8863dbcc32f19647de98f813c5 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Fri, 8 Nov 2013 23:40:26 +0100 Subject: [PATCH] Build: always link explicitly agrainst lib rt This improves sane library dependencies, as mandated by debian policy. Some of the librt functions are in such wide use, that we'd get them through transitive dependencies anyway. But linking explicitly against a function adds the DT_NEEDED for this library to our build artefacts. This is correct, since we're actually using these functions ourselves, making them into direct dependencies. --- admin/scons/Platform.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/admin/scons/Platform.py b/admin/scons/Platform.py index c74b8e39c..1ce12662c 100644 --- a/admin/scons/Platform.py +++ b/admin/scons/Platform.py @@ -56,6 +56,10 @@ def configure(env): conf.env.Append(CPPFLAGS = ' -DHAVE_PTHREAD') conf.env.Append(CCFLAGS = ' -pthread') + if not conf.CheckLib(symbol='clock_gettime', library='rt'): + problems.append('We expect the POSIX realtime extensions to be available through librt. ' + + 'Unable to use clock_gettime()') + if conf.CheckCHeader('execinfo.h'): conf.env.Append(CPPFLAGS = ' -DHAVE_EXECINFO_H') @@ -89,12 +93,6 @@ def configure(env): problems.append('We need the boost regular expression lib (incl. binary lib for linking).') - if conf.CheckLib(symbol='clock_gettime'): - print 'Using function clock_gettime() as defined in the C-lib...' - else: - if not conf.CheckLib(symbol='clock_gettime', library='rt'): - problems.append('No library known to provide the clock_gettime() function.') - if not conf.CheckPkgConfig('gavl', 1.0): problems.append('Did not find Gmerlin Audio Video Lib [http://gmerlin.sourceforge.net/gavl.html].') else: