changeset 29600:577c86f00dd1

Support x86_64 + PIC in mangle.h, needed for OS X 64 bit compiles.
author reimar
date Fri, 04 Sep 2009 09:50:17 +0000
parents 106374d8ceb7
children cd3ae709054f
files mangle.h
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mangle.h	Fri Sep 04 09:35:58 2009 +0000
+++ b/mangle.h	Fri Sep 04 09:50:17 2009 +0000
@@ -31,6 +31,13 @@
 #define attribute_used
 #endif
 
+#if ( defined(__PIC__) || defined(__pic__) ) && ! defined(PIC)
+#    define PIC
+#endif
+#if ARCH_X86_64 && defined(PIC)
+#define MANGLE(a) EXTERN_PREFIX #a "(%%rip)"
+#else
 #define MANGLE(a) EXTERN_PREFIX #a
+#endif
 
 #endif /* MPLAYER_MANGLE_H */