bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug#107704: make: unnecessarily linked with librt


From: Manoj Srivastava
Subject: Re: Bug#107704: make: unnecessarily linked with librt
Date: Sun, 19 Aug 2001 23:16:47 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.104 (i586-pc-linux-gnu)

Hi,

         [Please retain the CC to address@hidden so
         that the Debian Bug Tracking system can record your input] 

This has been reported by a Debian user.

make is currently linked against librt and therefore libpthread,
despite using no routines in either library.  This wastes memory.  The
problem is an oversight in the configure script, which causes librt to
be linked even when the functions from it aren't going to be used.

Please apply the appended patch.

        manoj

--- make-3.79.1/configure.in    Fri Jun 23 09:09:41 2000
+++ make-3.79.1z/configure.in   Sat Aug  4 12:42:53 2001
@@ -75,10 +75,16 @@
 
 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
+save_LIBS="$LIBS"
 AC_SEARCH_LIBS(clock_gettime, [rt posix4])
 if test "$ac_cv_search_clock_gettime" != no; then
   AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
             [Define if you have the clock_gettime function.])
+fi
+# But don't drag in librt/libposix4 unless we have high resolution timestamps.
+if test "x$make_cv_nsec_timestamps" = xno \
+   || test $ac_cv_struct_st_mtim_nsec = no
+then LIBS="$save_LIBS"
 fi
 
 # See if we have a standard version of gettimeofday().  Since actual

           
-- 
 Philosophy: unintelligible answers to insoluble problems.
Manoj Srivastava   <address@hidden>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



reply via email to

[Prev in Thread] Current Thread [Next in Thread]