summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch')
-rw-r--r--meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch92
1 files changed, 92 insertions, 0 deletions
diff --git a/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
new file mode 100644
index 0000000000..789c308863
--- /dev/null
+++ b/meta/recipes-devtools/llvm/llvm/0006-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -0,0 +1,92 @@
1From 4c08879d2dfbe7face4e679ac8499dc7bff2dd20 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 21 May 2016 00:33:20 +0000
4Subject: [PATCH 06/19] llvm: TargetLibraryInfo: Undefine libc functions if
5 they are macros
6
7musl defines some functions as macros and not inline functions
8if this is the case then make sure to undefine them
9
10Upstream-Status: Pending
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 .../llvm/Analysis/TargetLibraryInfo.def | 21 +++++++++++++++++++
14 1 file changed, 21 insertions(+)
15
16diff --git a/llvm/include/llvm/Analysis/TargetLibraryInfo.def b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
17index afed404f04c..876888656f2 100644
18--- a/llvm/include/llvm/Analysis/TargetLibraryInfo.def
19+++ b/llvm/include/llvm/Analysis/TargetLibraryInfo.def
20@@ -782,6 +782,9 @@ TLI_DEFINE_STRING_INTERNAL("fmodl")
21 TLI_DEFINE_ENUM_INTERNAL(fopen)
22 TLI_DEFINE_STRING_INTERNAL("fopen")
23 /// FILE *fopen64(const char *filename, const char *opentype)
24+#ifdef fopen64
25+#undef fopen64
26+#endif
27 TLI_DEFINE_ENUM_INTERNAL(fopen64)
28 TLI_DEFINE_STRING_INTERNAL("fopen64")
29 /// int fork();
30@@ -829,6 +832,9 @@ TLI_DEFINE_STRING_INTERNAL("fseek")
31 /// int fseeko(FILE *stream, off_t offset, int whence);
32 TLI_DEFINE_ENUM_INTERNAL(fseeko)
33 TLI_DEFINE_STRING_INTERNAL("fseeko")
34+#ifdef fseeko64
35+#undef fseeko64
36+#endif
37 /// int fseeko64(FILE *stream, off64_t offset, int whence)
38 TLI_DEFINE_ENUM_INTERNAL(fseeko64)
39 TLI_DEFINE_STRING_INTERNAL("fseeko64")
40@@ -839,6 +845,9 @@ TLI_DEFINE_STRING_INTERNAL("fsetpos")
41 TLI_DEFINE_ENUM_INTERNAL(fstat)
42 TLI_DEFINE_STRING_INTERNAL("fstat")
43 /// int fstat64(int filedes, struct stat64 *buf)
44+#ifdef fstat64
45+#undef fstat64
46+#endif
47 TLI_DEFINE_ENUM_INTERNAL(fstat64)
48 TLI_DEFINE_STRING_INTERNAL("fstat64")
49 /// int fstatvfs(int fildes, struct statvfs *buf);
50@@ -854,6 +863,9 @@ TLI_DEFINE_STRING_INTERNAL("ftell")
51 TLI_DEFINE_ENUM_INTERNAL(ftello)
52 TLI_DEFINE_STRING_INTERNAL("ftello")
53 /// off64_t ftello64(FILE *stream)
54+#ifdef ftello64
55+#undef ftello64
56+#endif
57 TLI_DEFINE_ENUM_INTERNAL(ftello64)
58 TLI_DEFINE_STRING_INTERNAL("ftello64")
59 /// int ftrylockfile(FILE *file);
60@@ -980,6 +992,9 @@ TLI_DEFINE_STRING_INTERNAL("logl")
61 TLI_DEFINE_ENUM_INTERNAL(lstat)
62 TLI_DEFINE_STRING_INTERNAL("lstat")
63 /// int lstat64(const char *path, struct stat64 *buf);
64+#ifdef lstat64
65+#undef lstat64
66+#endif
67 TLI_DEFINE_ENUM_INTERNAL(lstat64)
68 TLI_DEFINE_STRING_INTERNAL("lstat64")
69 /// void *malloc(size_t size);
70@@ -1205,6 +1220,9 @@ TLI_DEFINE_STRING_INTERNAL("sscanf")
71 TLI_DEFINE_ENUM_INTERNAL(stat)
72 TLI_DEFINE_STRING_INTERNAL("stat")
73 /// int stat64(const char *path, struct stat64 *buf);
74+#ifdef stat64
75+#undef stat64
76+#endif
77 TLI_DEFINE_ENUM_INTERNAL(stat64)
78 TLI_DEFINE_STRING_INTERNAL("stat64")
79 /// int statvfs(const char *path, struct statvfs *buf);
80@@ -1340,6 +1358,9 @@ TLI_DEFINE_STRING_INTERNAL("times")
81 TLI_DEFINE_ENUM_INTERNAL(tmpfile)
82 TLI_DEFINE_STRING_INTERNAL("tmpfile")
83 /// FILE *tmpfile64(void)
84+#ifdef tmpfile64
85+#undef tmpfile64
86+#endif
87 TLI_DEFINE_ENUM_INTERNAL(tmpfile64)
88 TLI_DEFINE_STRING_INTERNAL("tmpfile64")
89 /// int toascii(int c);
90--
912.22.0
92