aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.txt4
-rw-r--r--ports/linux/portdefs.h14
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index 8cba765..11f492e 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,3 +1,7 @@
+2014-07-11:
+ * (seebs) merge in symbol version restrictions (slightly tweaked)
+ for Linux.
+
2014-07-10:
* (seebs) Don't pass -L/usr/lib* for sqlite, because that's probably
the default.
diff --git a/ports/linux/portdefs.h b/ports/linux/portdefs.h
index 20ad529..60a8cc1 100644
--- a/ports/linux/portdefs.h
+++ b/ports/linux/portdefs.h
@@ -11,3 +11,17 @@
* causes errors; you have to leave it empty or specify AT_SYMLINK_FOLLOW.
*/
#define PSEUDO_LINK_SYMLINK_BEHAVIOR 0
+
+/* There were symbol changes that can cause the linker to request
+ * newer versions of glibc, which causes problems occasionally on
+ * older hosts if pseudo is built against a newer glibc and then
+ * run with an older one. Sometimes we can just avoid the symbols,
+ * but memcpy's pretty hard to get away from.
+ */
+#define GLIBC_COMPAT_SYMBOL(sym, ver) __asm(".symver " #sym "," #sym "@GLIBC_" #ver)
+
+#ifdef __amd64__
+GLIBC_COMPAT_SYMBOL(memcpy,2.2.5);
+#else /* tentatively assume this means x86 */
+GLIBC_COMPAT_SYMBOL(memcpy,2.0);
+#endif