aboutsummaryrefslogtreecommitdiffstats
path: root/cmake/glibc-compat-symbols.h
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-04-21 08:29:17 +0200
committerSven Gothel <[email protected]>2013-04-21 08:29:17 +0200
commit554b34927cd6a2e0c0ce227108ebf8521bcba889 (patch)
tree9b038eab0eae9fb1893c6570aa6237920a537c9c /cmake/glibc-compat-symbols.h
parentcc19a6716ff24522b8c705c3ab27f6df2098223f (diff)
Add 'cmake/glibc-compat-symbols.h' to force usage of minimal GLIBC symbols currently for memcpy only, used in our x86_32 and default gcc toolchain cmake file.
Note: JogAmp's minimum GLIBC is 2.4 due to '__stack_chk_fail' (stack overflow checking) GLIBC 2.4 - March 2006 - Standard for LSB 4.0, Used in SLES 10 We could add compile/link option '-fno-stack-protector', however stack protection seems reasonable and a pre 2006 distribution a bit too 'far fetched' for our multimedia bindings anyway.
Diffstat (limited to 'cmake/glibc-compat-symbols.h')
-rw-r--r--cmake/glibc-compat-symbols.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/glibc-compat-symbols.h b/cmake/glibc-compat-symbols.h
new file mode 100644
index 00000000..482e2326
--- /dev/null
+++ b/cmake/glibc-compat-symbols.h
@@ -0,0 +1,15 @@
+#ifndef __GLIBC_COMPAT_SYMBOLS_H__
+#define __GLIBC_COMPAT_SYMBOLS_H__ 1
+
+/**
+ * add other architecures below
+ */
+#ifdef __amd64__
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.2.5");
+#else
+ #define GLIBC_COMPAT_SYMBOL(FFF) __asm__(".symver " #FFF "," #FFF "@GLIBC_2.0");
+#endif /*__amd64__*/
+
+GLIBC_COMPAT_SYMBOL(memcpy)
+
+#endif /*__GLIBC_COMPAT_SYMBOLS_H__*/