[PATCH] compiler-rt darwin macros
David Fang
fang at csl.cornell.edu
Fri May 24 11:47:34 PDT 2013
Hi,
I thought I'd share a little patch I needed for the latest compiler-rt to
build on powerpc-darwin8, that might be needed on other darwin platforms.
The first part of the patch adds a missing NOT_HERE_IN_10_8_AND_EARLIER
macro for the __ppc__ case.
The second part provides an empty macro for __DARWIN_ALIAS_C on older
systems that didn't define it in <sys/cdefs.h>.
Any interest in either piece? (I can commit after approval.)
Fang
--
David Fang
http://www.csl.cornell.edu/~fang/
-------------- next part --------------
commit 5ae01c4baaaeec09be73548f6e2435833c28f384
Author: David Fang <fang at csl.cornell.edu>
Date: Thu May 23 22:05:29 2013 -0700
for darwin8: provide empty __DARWIN_ALIAS_C macro
diff --git a/lib/apple_versioning.c b/lib/apple_versioning.c
index 09f149f..c5d9a5c 100644
--- a/lib/apple_versioning.c
+++ b/lib/apple_versioning.c
@@ -22,6 +22,7 @@
__attribute__((visibility("default"))) const char sym##_tmp4 = 0; \
extern const char sym##_tmp5 __asm("$ld$hide$os10.5$_" #sym ); \
__attribute__((visibility("default"))) const char sym##_tmp5 = 0;
+ #define NOT_HERE_IN_10_8_AND_EARLIER(sym)
#else
#define NOT_HERE_BEFORE_10_6(sym) \
extern const char sym##_tmp4 __asm("$ld$hide$os10.4$_" #sym ); \
diff --git a/lib/interception/interception.h b/lib/interception/interception.h
index d50af35..3debb08 100644
--- a/lib/interception/interception.h
+++ b/lib/interception/interception.h
@@ -89,6 +89,15 @@ typedef __sanitizer::OFF64_T OFF64_T;
#if defined(__APPLE__)
#include <sys/cdefs.h> // For __DARWIN_ALIAS_C().
+// on darwin8 (OS X 10.4), no library symbols were version-suffixed with "$UNIX2003"
+// compare <sys/cdefs.h> across Darwin versions for reference
+#ifndef __DARWIN_ALIAS
+#define __DARWIN_ALIAS(sym)
+#endif
+#ifndef __DARWIN_ALIAS_C
+#define __DARWIN_ALIAS_C(sym)
+#endif
+
// Just a pair of pointers.
struct interpose_substitution {
const uptr replacement;
More information about the llvm-commits
mailing list