]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
mips: add clock_{g,s}ettime symbol compat hacks
authorMike Frysinger <vapier@gentoo.org>
Fri, 16 Aug 2013 19:10:41 +0000 (15:10 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 16 Aug 2013 19:13:16 +0000 (15:13 -0400)
we kind of screwed ourselves into a corner by having the clock symbols
exported only with the glibc-2.0 version ... this patch fixes the
export so all new binaries built against librt will use the correct
glibc-2.2 symbol version

Versions.def
ports/sysdeps/unix/sysv/linux/mips/Versions
sysdeps/unix/clock_gettime.c
sysdeps/unix/clock_settime.c

index 0854e6eb3bb5287f9f7ce8b3ed758c9cd15197ae..009a5638adeec73586e72d21932096db402e19a2 100644 (file)
@@ -113,6 +113,7 @@ libresolv {
   GLIBC_PRIVATE
 }
 librt {
+  GLIBC_2.0
   GLIBC_2.1
   GLIBC_2.2
   GLIBC_2.3
index a56322a8ebc2571872412945b2eee1d44c546872..475a05b668b0e7f7c4c4e2a5fa05bf5b5f504084 100644 (file)
@@ -38,3 +38,9 @@ libc {
     fallocate64;
   }
 }
+librt {
+  GLIBC_2.0 {
+    # c*
+    clock_gettime; clock_settime;
+  }
+}
index d46057a6c7746ecda2fa4617fa79c4b37a2ee207..cae2f64e278d5a4ccc89c8624936d241e29da1e6 100644 (file)
@@ -22,6 +22,7 @@
 #include <sys/time.h>
 #include <libc-internal.h>
 #include <ldsodefs.h>
+#include <shlib-compat.h>
 
 
 #if HP_TIMING_AVAIL
@@ -132,5 +133,15 @@ __clock_gettime (clockid_t clock_id, struct timespec *tp)
 
   return retval;
 }
+#ifdef __mips__
+versioned_symbol (librt, __clock_gettime, clock_gettime, GLIBC_2_2);
+librt_hidden_ver (__clock_gettime, clock_gettime)
+
+# ifdef SHARED
+strong_alias (__clock_gettime, __mips_clock_gettime)
+compat_symbol (librt, __mips_clock_gettime, clock_gettime, GLIBC_2_0);
+# endif
+#else
 weak_alias (__clock_gettime, clock_gettime)
 libc_hidden_def (__clock_gettime)
+#endif
index 6605e9ead9b8f7b0c66e882a4f3b88a84029015d..1e7bd4a9342c7ffe8079dfb3567fd02557a2d5cb 100644 (file)
@@ -20,6 +20,7 @@
 #include <sys/time.h>
 #include <libc-internal.h>
 #include <ldsodefs.h>
+#include <shlib-compat.h>
 
 
 #if HP_TIMING_AVAIL && !defined HANDLED_CPUTIME
@@ -124,4 +125,13 @@ __clock_settime (clockid_t clock_id, const struct timespec *tp)
 
   return retval;
 }
+#ifdef __mips__
+versioned_symbol (librt, __clock_settime, clock_settime, GLIBC_2_2);
+
+# ifdef SHARED
+strong_alias (__clock_settime, __mips_clock_settime)
+compat_symbol (librt, __mips_clock_settime, clock_settime, GLIBC_2_0);
+# endif
+#else
 weak_alias (__clock_settime, clock_settime)
+#endif