diff options
author | Khem Raj <raj.khem@gmail.com> | 2016-05-19 23:35:43 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2016-05-20 00:15:15 -0700 |
commit | 7364ca41b93841437667c84bb66c15fcb39763d9 (patch) | |
tree | 5f0f6ae79156109f66d817b53a14d7bbc252b5f5 /recipes-devtools | |
parent | ed0cc9804381763e6c0baebcb2a5793645531a83 (diff) | |
download | meta-clang-7364ca41b93841437667c84bb66c15fcb39763d9.tar.gz |
clang: Switch to master (3.9) branch
Drop upstreamed patches
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-devtools')
20 files changed, 259 insertions, 416 deletions
diff --git a/recipes-devtools/clang/clang.inc b/recipes-devtools/clang/clang.inc index 7f921ac..331d97d 100644 --- a/recipes-devtools/clang/clang.inc +++ b/recipes-devtools/clang/clang.inc | |||
@@ -4,29 +4,17 @@ LLVM_DIR = "llvm${LLVM_RELEASE}" | |||
4 | LLVM_GIT ?= "git://github.com/llvm-mirror" | 4 | LLVM_GIT ?= "git://github.com/llvm-mirror" |
5 | LLVM_GIT_PROTOCOL ?= "git" | 5 | LLVM_GIT_PROTOCOL ?= "git" |
6 | 6 | ||
7 | PV = "3.8.0" | ||
8 | BRANCH ?= "release_38" | ||
9 | SRCREV_llvm ?= "06cf4b238fa45638ed37ec7725d38930fea37ff9" | ||
10 | SRCREV_clang ?= "9fd77bd68130d9b2fbc56a3138b6f981d560480a" | ||
11 | SRCREV_compiler-rt ?= "31769223eb782e7b03655810d00dfdec66467d51" | ||
12 | SRCREV_libcxxabi ?= "8d4e51dd9c743b66c8dd552f0632174e04af4052" | ||
13 | SRCREV_libcxx ?= "fda3549c01ea0a1d2ee00fe0033c35dc36796fc8" | ||
14 | SRCREV_libunwind ?= "25647b29dd78196ed3c883392ebb339265aeb355" | ||
15 | |||
16 | LLVMMD5SUM ?= "4c0bc17c954e99fd547528d938832bfa" | ||
17 | CLANGMD5SUM ?= "82ed8fe1976ca709bbd81f4f10a48ccd" | ||
18 | |||
19 | # | 7 | # |
20 | # Uncomment below to enable master version of clang/llvm | 8 | # Uncomment below to enable master version of clang/llvm |
21 | # | 9 | # |
22 | 10 | ||
23 | #PV = "3.9.0" | 11 | PV = "3.9.0" |
24 | #BRANCH = "master" | 12 | BRANCH = "master" |
25 | #SRCREV_llvm = "${AUTOREV}" | 13 | SRCREV_llvm = "${AUTOREV}" |
26 | #SRCREV_clang = "${AUTOREV}" | 14 | SRCREV_clang = "${AUTOREV}" |
27 | #SRCREV_compiler-rt = "${AUTOREV}" | 15 | SRCREV_compiler-rt = "${AUTOREV}" |
28 | #SRCREV_libcxxabi = "${AUTOREV}" | 16 | SRCREV_libcxxabi = "${AUTOREV}" |
29 | #SRCREV_libcxx = "${AUTOREV}" | 17 | SRCREV_libcxx = "${AUTOREV}" |
30 | #SRCREV_libunwind = "${AUTOREV}" | 18 | SRCREV_libunwind = "${AUTOREV}" |
31 | #LLVMMD5SUM = "43fdaa303c1c5589ad60f4ffc6a0b9ce" | 19 | LLVMMD5SUM = "43fdaa303c1c5589ad60f4ffc6a0b9ce" |
32 | #CLANGMD5SUM = "a77eac638a3aae44a2d604217d6f0f01" | 20 | CLANGMD5SUM = "a77eac638a3aae44a2d604217d6f0f01" |
diff --git a/recipes-devtools/clang/clang/0001-Frontend-support-I-path-for-sysroot-expansion.patch b/recipes-devtools/clang/clang/0001-Frontend-support-I-path-for-sysroot-expansion.patch deleted file mode 100644 index 76c214a..0000000 --- a/recipes-devtools/clang/clang/0001-Frontend-support-I-path-for-sysroot-expansion.patch +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | Upstream-Status: backport | ||
2 | |||
3 | From 0632c1bf6c41f6c89f21957e1379232ef7668d4a Mon Sep 17 00:00:00 2001 | ||
4 | From: Saleem Abdulrasool <compnerd@compnerd.org> | ||
5 | Date: Fri, 6 May 2016 19:13:55 +0000 | ||
6 | Subject: [PATCH] Frontend: support -I=path for sysroot expansion | ||
7 | |||
8 | From the GCC manpage: | ||
9 | |||
10 | -I dir | ||
11 | ... If dir begins with =, then the = will be replaced by the sysroot prefix; | ||
12 | see --sysroot and -isysroot. | ||
13 | |||
14 | Add support to expand the `=` as a prefix of the include path with the sysroot | ||
15 | if specified. `-isysroot` takes precedence over `--sysroot` as the normal | ||
16 | argument behaviour occurs. The ordering of the `-isysroot` is relevant to the | ||
17 | path substituted. If no `--sysroot=` or `-isysroot` option is present, the = is | ||
18 | not expanded. | ||
19 | |||
20 | Resolves PR26965! | ||
21 | |||
22 | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268777 91177308-0d34-0410-b5e6-96231b3b80d8 | ||
23 | --- | ||
24 | lib/Frontend/CompilerInvocation.cpp | 16 ++++++++++++++-- | ||
25 | test/Preprocessor/sysroot-prefix.c | 28 ++++++++++++++++++++++++++++ | ||
26 | 2 files changed, 42 insertions(+), 2 deletions(-) | ||
27 | create mode 100644 test/Preprocessor/sysroot-prefix.c | ||
28 | |||
29 | diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp | ||
30 | index 237a447..845dffc 100644 | ||
31 | --- a/lib/Frontend/CompilerInvocation.cpp | ||
32 | +++ b/lib/Frontend/CompilerInvocation.cpp | ||
33 | @@ -1243,6 +1243,8 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) { | ||
34 | |||
35 | // Add -I..., -F..., and -index-header-map options in order. | ||
36 | bool IsIndexHeaderMap = false; | ||
37 | + bool IsSysrootSpecified = | ||
38 | + Args.hasArg(OPT__sysroot_EQ) || Args.hasArg(OPT_isysroot); | ||
39 | for (const Arg *A : Args.filtered(OPT_I, OPT_F, OPT_index_header_map)) { | ||
40 | if (A->getOption().matches(OPT_index_header_map)) { | ||
41 | // -index-header-map applies to the next -I or -F. | ||
42 | @@ -1253,8 +1255,18 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args) { | ||
43 | frontend::IncludeDirGroup Group = | ||
44 | IsIndexHeaderMap ? frontend::IndexHeaderMap : frontend::Angled; | ||
45 | |||
46 | - Opts.AddPath(A->getValue(), Group, | ||
47 | - /*IsFramework=*/A->getOption().matches(OPT_F), true); | ||
48 | + bool IsFramework = A->getOption().matches(OPT_F); | ||
49 | + std::string Path = A->getValue(); | ||
50 | + | ||
51 | + if (IsSysrootSpecified && !IsFramework && A->getValue()[0] == '=') { | ||
52 | + SmallString<32> Buffer; | ||
53 | + llvm::sys::path::append(Buffer, Opts.Sysroot, | ||
54 | + llvm::StringRef(A->getValue()).substr(1)); | ||
55 | + Path = Buffer.str(); | ||
56 | + } | ||
57 | + | ||
58 | + Opts.AddPath(Path.c_str(), Group, IsFramework, | ||
59 | + /*IgnoreSysroot*/ true); | ||
60 | IsIndexHeaderMap = false; | ||
61 | } | ||
62 | |||
63 | diff --git a/test/Preprocessor/sysroot-prefix.c b/test/Preprocessor/sysroot-prefix.c | ||
64 | new file mode 100644 | ||
65 | index 0000000..feea502 | ||
66 | --- /dev/null | ||
67 | +++ b/test/Preprocessor/sysroot-prefix.c | ||
68 | @@ -0,0 +1,28 @@ | ||
69 | +// RUN: %clang_cc1 -v -isysroot /var/empty -I /dev/null -E %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ISYSROOT_NO_SYSROOT %s | ||
70 | +// RUN: %clang_cc1 -v -isysroot /var/empty -I =/dev/null -E %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ISYSROOT_SYSROOT_DEV_NULL %s | ||
71 | +// RUN: %clang_cc1 -v -I =/dev/null -E %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-NO_ISYSROOT_SYSROOT_DEV_NULL %s | ||
72 | +// RUN: %clang_cc1 -v -isysroot /var/empty -I =null -E %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ISYSROOT_SYSROOT_NULL %s | ||
73 | +// RUN: %clang_cc1 -v -isysroot /var/empty -isysroot /var/empty/root -I =null -E %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ISYSROOT_ISYSROOT_SYSROOT_NULL %s | ||
74 | +// RUN: %clang_cc1 -v -isysroot /var/empty/root -isysroot /var/empty -I =null -E %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ISYSROOT_ISYSROOT_SWAPPED_SYSROOT_NULL %s | ||
75 | + | ||
76 | +// CHECK-ISYSROOT_NO_SYSROOT: ignoring nonexistent directory "/dev/null" | ||
77 | +// CHECK-ISYSROOT_NO_SYSROOT-NOT: ignoring nonexistent directory "/var/empty/dev/null" | ||
78 | + | ||
79 | +// CHECK-NO_ISYSROOT_SYSROOT_DEV_NULL: ignoring nonexistent directory "=/dev/null" | ||
80 | +// CHECK-NO_ISYSROOT_SYSROOT_DEV_NULL-NOT: ignoring nonexistent directory "/dev/null" | ||
81 | + | ||
82 | +// CHECK-ISYSROOT_SYSROOT_DEV_NULL: ignoring nonexistent directory "/var/empty/dev/null" | ||
83 | +// CHECK-ISYSROOT_SYSROOT_DEV_NULL-NOT: ignoring nonexistent directory "/dev/null" | ||
84 | + | ||
85 | +// CHECK-NO_ISYSROOT_SYSROOT: ignoring nonexistent directory "=/dev/null" | ||
86 | +// CHECK-NO_ISYSROOT_SYSROOT-NOT: ignoring nonexistent directory "/var/empty/dev/null" | ||
87 | + | ||
88 | +// CHECK-ISYSROOT_SYSROOT_NULL: ignoring nonexistent directory "/var/empty/null" | ||
89 | +// CHECK-ISYSROOT_SYSROOT_NULL-NOT: ignoring nonexistent directory "=null" | ||
90 | + | ||
91 | +// CHECK-ISYSROOT_ISYSROOT_SYSROOT_NULL: ignoring nonexistent directory "/var/empty/root/null" | ||
92 | +// CHECK-ISYSROOT_ISYSROOT_SYSROOT_NULL-NOT: ignoring nonexistent directory "=null" | ||
93 | + | ||
94 | +// CHECK-ISYSROOT_ISYSROOT_SWAPPED_SYSROOT_NULL: ignoring nonexistent directory "/var/empty/null" | ||
95 | +// CHECK-ISYSROOT_ISYSROOT_SWAPPED_SYSROOT_NULL-NOT: ignoring nonexistent directory "=null" | ||
96 | + | ||
97 | -- | ||
98 | 2.8.2 | ||
99 | |||
diff --git a/recipes-devtools/clang/clang/0001-driver-Add-musl-ldso-support.patch b/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch index 89eb0b8..6747c24 100644 --- a/recipes-devtools/clang/clang/0001-driver-Add-musl-ldso-support.patch +++ b/recipes-devtools/clang/clang/0001-clang-driver-Add-musl-ldso-support.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 2b8900f80027da90a41043f8d428c208cb6fdae2 Mon Sep 17 00:00:00 2001 | 1 | From 21cb1801f0da97918ce5a567cd1f60413b4de726 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 30 Mar 2016 19:56:10 -0700 | 3 | Date: Wed, 30 Mar 2016 19:56:10 -0700 |
4 | Subject: [PATCH] driver: Add musl ldso support | 4 | Subject: [PATCH 1/4] clang: driver: Add musl ldso support |
5 | 5 | ||
6 | Linux/musl libc implementation has different ldso | 6 | Linux/musl libc implementation has different ldso |
7 | this needs to take effect when target arch is detected | 7 | this needs to take effect when target arch is detected |
@@ -9,14 +9,14 @@ as a musl based Linux platform | |||
9 | 9 | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
11 | --- | 11 | --- |
12 | lib/Driver/Tools.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++----- | 12 | lib/Driver/Tools.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++------ |
13 | 1 file changed, 42 insertions(+), 5 deletions(-) | 13 | 1 file changed, 42 insertions(+), 6 deletions(-) |
14 | 14 | ||
15 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp | 15 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp |
16 | index e45c5c5..34237c4 100644 | 16 | index 8a1cb54..0ce548c 100644 |
17 | --- a/lib/Driver/Tools.cpp | 17 | --- a/lib/Driver/Tools.cpp |
18 | +++ b/lib/Driver/Tools.cpp | 18 | +++ b/lib/Driver/Tools.cpp |
19 | @@ -8953,6 +8953,47 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, | 19 | @@ -8994,6 +8994,47 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, |
20 | return "/system/bin/linker64"; | 20 | return "/system/bin/linker64"; |
21 | else | 21 | else |
22 | return "/system/bin/linker"; | 22 | return "/system/bin/linker"; |
@@ -64,13 +64,14 @@ index e45c5c5..34237c4 100644 | |||
64 | } else if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::sparc || | 64 | } else if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::sparc || |
65 | Arch == llvm::Triple::sparcel) | 65 | Arch == llvm::Triple::sparcel) |
66 | return "/lib/ld-linux.so.2"; | 66 | return "/lib/ld-linux.so.2"; |
67 | @@ -8981,11 +9022,7 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, | 67 | @@ -9021,12 +9062,7 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, |
68 | bool IsNaN2008 = mips::isNaN2008(Args, ToolChain.getTriple()); | 68 | bool IsNaN2008 = mips::isNaN2008(Args, Triple); |
69 | if (mips::isUCLibc(Args)) | 69 | if (mips::isUCLibc(Args)) |
70 | LibName = IsNaN2008 ? "ld-uClibc-mipsn8.so.0" : "ld-uClibc.so.0"; | 70 | LibName = IsNaN2008 ? "ld-uClibc-mipsn8.so.0" : "ld-uClibc.so.0"; |
71 | - else if (!ToolChain.getTriple().hasEnvironment()) { | 71 | - else if (!Triple.hasEnvironment() && |
72 | - bool LE = (ToolChain.getTriple().getArch() == llvm::Triple::mipsel) || | 72 | - Triple.getVendor() == llvm::Triple::VendorType::MipsTechnologies) { |
73 | - (ToolChain.getTriple().getArch() == llvm::Triple::mips64el); | 73 | - bool LE = (Triple.getArch() == llvm::Triple::mipsel) || |
74 | - (Triple.getArch() == llvm::Triple::mips64el); | ||
74 | - LibName = LE ? "ld-musl-mipsel.so.1" : "ld-musl-mips.so.1"; | 75 | - LibName = LE ? "ld-musl-mipsel.so.1" : "ld-musl-mips.so.1"; |
75 | - } else | 76 | - } else |
76 | + else | 77 | + else |
diff --git a/recipes-devtools/clang/clang/0001-triplet-Add-musl-support.patch b/recipes-devtools/clang/clang/0001-llvm-triplet-Add-musl-support.patch index 3fdf4b6..a13f568 100644 --- a/recipes-devtools/clang/clang/0001-triplet-Add-musl-support.patch +++ b/recipes-devtools/clang/clang/0001-llvm-triplet-Add-musl-support.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 6ea56dabfd56ad4d1f994378b3f5ce46c02cb85c Mon Sep 17 00:00:00 2001 | 1 | From a585b7edd91dd64d1d9a8b171f82e28413e574b9 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Wed, 30 Mar 2016 19:55:41 -0700 | 3 | Date: Wed, 30 Mar 2016 19:55:41 -0700 |
4 | Subject: [PATCH] triplet: Add musl support | 4 | Subject: [PATCH 1/4] llvm: triplet: Add musl support |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | --- | 7 | --- |
@@ -69,7 +69,7 @@ index 1967fac..f8b6236 100644 | |||
69 | .StartsWith("gnu", Triple::GNU) | 69 | .StartsWith("gnu", Triple::GNU) |
70 | .StartsWith("android", Triple::Android) | 70 | .StartsWith("android", Triple::Android) |
71 | diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h | 71 | diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h |
72 | index ec1212d..902ce4a 100644 | 72 | index 7c9ea7d..09c4051 100644 |
73 | --- a/lib/Target/ARM/ARMSubtarget.h | 73 | --- a/lib/Target/ARM/ARMSubtarget.h |
74 | +++ b/lib/Target/ARM/ARMSubtarget.h | 74 | +++ b/lib/Target/ARM/ARMSubtarget.h |
75 | @@ -424,8 +424,10 @@ public: | 75 | @@ -424,8 +424,10 @@ public: |
@@ -92,10 +92,10 @@ index ec1212d..902ce4a 100644 | |||
92 | isTargetWindows() || isAAPCS16_ABI(); | 92 | isTargetWindows() || isAAPCS16_ABI(); |
93 | } | 93 | } |
94 | diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp | 94 | diff --git a/lib/Target/ARM/ARMTargetMachine.cpp b/lib/Target/ARM/ARMTargetMachine.cpp |
95 | index 390b39c..9840c11 100644 | 95 | index 81127f7..c90ec0f 100644 |
96 | --- a/lib/Target/ARM/ARMTargetMachine.cpp | 96 | --- a/lib/Target/ARM/ARMTargetMachine.cpp |
97 | +++ b/lib/Target/ARM/ARMTargetMachine.cpp | 97 | +++ b/lib/Target/ARM/ARMTargetMachine.cpp |
98 | @@ -99,6 +99,8 @@ computeTargetABI(const Triple &TT, StringRef CPU, | 98 | @@ -100,6 +100,8 @@ computeTargetABI(const Triple &TT, StringRef CPU, |
99 | case llvm::Triple::Android: | 99 | case llvm::Triple::Android: |
100 | case llvm::Triple::GNUEABI: | 100 | case llvm::Triple::GNUEABI: |
101 | case llvm::Triple::GNUEABIHF: | 101 | case llvm::Triple::GNUEABIHF: |
diff --git a/recipes-devtools/clang/clang/0001-remove-fopen64-fseeko64-ftello64-tmpfile64-on-musl.patch b/recipes-devtools/clang/clang/0001-remove-fopen64-fseeko64-ftello64-tmpfile64-on-musl.patch deleted file mode 100644 index 76ee9a2..0000000 --- a/recipes-devtools/clang/clang/0001-remove-fopen64-fseeko64-ftello64-tmpfile64-on-musl.patch +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | From 01501b1e05e60ab5446fa12a15071049f07e3ae0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 15 Mar 2016 05:25:36 +0000 | ||
4 | Subject: [PATCH 1/2] remove fopen64/fseeko64/ftello64/tmpfile64 on musl | ||
5 | |||
6 | They are not available | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | include/llvm/Analysis/TargetLibraryInfo.def | 12 ------------ | ||
11 | lib/Transforms/IPO/InferFunctionAttrs.cpp | 25 ------------------------- | ||
12 | 2 files changed, 37 deletions(-) | ||
13 | |||
14 | diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def | ||
15 | index 7798e3c..65158b8 100644 | ||
16 | --- a/include/llvm/Analysis/TargetLibraryInfo.def | ||
17 | +++ b/include/llvm/Analysis/TargetLibraryInfo.def | ||
18 | @@ -525,9 +525,6 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") | ||
19 | /// FILE *fopen(const char *filename, const char *mode); | ||
20 | TLI_DEFINE_ENUM_INTERNAL(fopen) | ||
21 | TLI_DEFINE_STRING_INTERNAL("fopen") | ||
22 | -/// FILE *fopen64(const char *filename, const char *opentype) | ||
23 | -TLI_DEFINE_ENUM_INTERNAL(fopen64) | ||
24 | -TLI_DEFINE_STRING_INTERNAL("fopen64") | ||
25 | /// int fprintf(FILE *stream, const char *format, ...); | ||
26 | TLI_DEFINE_ENUM_INTERNAL(fprintf) | ||
27 | TLI_DEFINE_STRING_INTERNAL("fprintf") | ||
28 | @@ -561,9 +558,6 @@ TLI_DEFINE_STRING_INTERNAL("fseek") | ||
29 | /// int fseeko(FILE *stream, off_t offset, int whence); | ||
30 | TLI_DEFINE_ENUM_INTERNAL(fseeko) | ||
31 | TLI_DEFINE_STRING_INTERNAL("fseeko") | ||
32 | -/// int fseeko64(FILE *stream, off64_t offset, int whence) | ||
33 | -TLI_DEFINE_ENUM_INTERNAL(fseeko64) | ||
34 | -TLI_DEFINE_STRING_INTERNAL("fseeko64") | ||
35 | /// int fsetpos(FILE *stream, const fpos_t *pos); | ||
36 | TLI_DEFINE_ENUM_INTERNAL(fsetpos) | ||
37 | TLI_DEFINE_STRING_INTERNAL("fsetpos") | ||
38 | @@ -585,9 +579,6 @@ TLI_DEFINE_STRING_INTERNAL("ftell") | ||
39 | /// off_t ftello(FILE *stream); | ||
40 | TLI_DEFINE_ENUM_INTERNAL(ftello) | ||
41 | TLI_DEFINE_STRING_INTERNAL("ftello") | ||
42 | -/// off64_t ftello64(FILE *stream) | ||
43 | -TLI_DEFINE_ENUM_INTERNAL(ftello64) | ||
44 | -TLI_DEFINE_STRING_INTERNAL("ftello64") | ||
45 | /// int ftrylockfile(FILE *file); | ||
46 | TLI_DEFINE_ENUM_INTERNAL(ftrylockfile) | ||
47 | TLI_DEFINE_STRING_INTERNAL("ftrylockfile") | ||
48 | @@ -1050,9 +1041,6 @@ TLI_DEFINE_STRING_INTERNAL("times") | ||
49 | /// FILE *tmpfile(void); | ||
50 | TLI_DEFINE_ENUM_INTERNAL(tmpfile) | ||
51 | TLI_DEFINE_STRING_INTERNAL("tmpfile") | ||
52 | -/// FILE *tmpfile64(void) | ||
53 | -TLI_DEFINE_ENUM_INTERNAL(tmpfile64) | ||
54 | -TLI_DEFINE_STRING_INTERNAL("tmpfile64") | ||
55 | /// int toascii(int c); | ||
56 | TLI_DEFINE_ENUM_INTERNAL(toascii) | ||
57 | TLI_DEFINE_STRING_INTERNAL("toascii") | ||
58 | diff --git a/lib/Transforms/IPO/InferFunctionAttrs.cpp b/lib/Transforms/IPO/InferFunctionAttrs.cpp | ||
59 | index 4295a75..f6d19eb 100644 | ||
60 | --- a/lib/Transforms/IPO/InferFunctionAttrs.cpp | ||
61 | +++ b/lib/Transforms/IPO/InferFunctionAttrs.cpp | ||
62 | @@ -844,31 +844,6 @@ static bool inferPrototypeAttributes(Function &F, | ||
63 | Changed |= setOnlyReadsMemory(F, 1); | ||
64 | Changed |= setOnlyReadsMemory(F, 2); | ||
65 | return Changed; | ||
66 | - case LibFunc::fopen64: | ||
67 | - if (FTy->getNumParams() != 2 || !FTy->getReturnType()->isPointerTy() || | ||
68 | - !FTy->getParamType(0)->isPointerTy() || | ||
69 | - !FTy->getParamType(1)->isPointerTy()) | ||
70 | - return false; | ||
71 | - Changed |= setDoesNotThrow(F); | ||
72 | - Changed |= setDoesNotAlias(F, 0); | ||
73 | - Changed |= setDoesNotCapture(F, 1); | ||
74 | - Changed |= setDoesNotCapture(F, 2); | ||
75 | - Changed |= setOnlyReadsMemory(F, 1); | ||
76 | - Changed |= setOnlyReadsMemory(F, 2); | ||
77 | - return Changed; | ||
78 | - case LibFunc::fseeko64: | ||
79 | - case LibFunc::ftello64: | ||
80 | - if (FTy->getNumParams() == 0 || !FTy->getParamType(0)->isPointerTy()) | ||
81 | - return false; | ||
82 | - Changed |= setDoesNotThrow(F); | ||
83 | - Changed |= setDoesNotCapture(F, 1); | ||
84 | - return Changed; | ||
85 | - case LibFunc::tmpfile64: | ||
86 | - if (!FTy->getReturnType()->isPointerTy()) | ||
87 | - return false; | ||
88 | - Changed |= setDoesNotThrow(F); | ||
89 | - Changed |= setDoesNotAlias(F, 0); | ||
90 | - return Changed; | ||
91 | case LibFunc::fstat64: | ||
92 | case LibFunc::fstatvfs64: | ||
93 | if (FTy->getNumParams() != 2 || !FTy->getParamType(1)->isPointerTy()) | ||
94 | -- | ||
95 | 1.9.1 | ||
96 | |||
diff --git a/recipes-devtools/clang/clang/0001-driver-Use-lib-for-ldso-on-OE.patch b/recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch index 10ddb33..2269968 100644 --- a/recipes-devtools/clang/clang/0001-driver-Use-lib-for-ldso-on-OE.patch +++ b/recipes-devtools/clang/clang/0002-clang-driver-Use-lib-for-ldso-on-OE.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 5a999b10efbc59834d93d8f52694b3423fc83c42 Mon Sep 17 00:00:00 2001 | 1 | From 90f5518a14a4756ef08dbd324b907d9b705d01b8 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 9 May 2016 23:29:24 -0700 | 3 | Date: Mon, 9 May 2016 23:29:24 -0700 |
4 | Subject: [PATCH] driver: Use /lib for ldso on OE | 4 | Subject: [PATCH 2/4] clang: driver: Use /lib for ldso on OE |
5 | 5 | ||
6 | OE does not follow the default base_libdir | 6 | OE does not follow the default base_libdir |
7 | that clang has, therefore adjust it for OE | 7 | that clang has, therefore adjust it for OE |
@@ -11,23 +11,22 @@ for 64bit to /lib64 instead of /lib | |||
11 | 11 | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | --- | 13 | --- |
14 | lib/Driver/Tools.cpp | 16 +++++++--------- | 14 | lib/Driver/Tools.cpp | 13 ++++++------- |
15 | 1 file changed, 7 insertions(+), 9 deletions(-) | 15 | 1 file changed, 6 insertions(+), 7 deletions(-) |
16 | 16 | ||
17 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp | 17 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp |
18 | index 34237c4..94ad9db 100644 | 18 | index 0ce548c..d318b10 100644 |
19 | --- a/lib/Driver/Tools.cpp | 19 | --- a/lib/Driver/Tools.cpp |
20 | +++ b/lib/Driver/Tools.cpp | 20 | +++ b/lib/Driver/Tools.cpp |
21 | @@ -9016,8 +9016,6 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, | 21 | @@ -9057,7 +9057,6 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, |
22 | return "/lib/ld-linux.so.3"; | 22 | return "/lib/ld-linux.so.3"; |
23 | } else if (Arch == llvm::Triple::mips || Arch == llvm::Triple::mipsel || | 23 | } else if (Arch == llvm::Triple::mips || Arch == llvm::Triple::mipsel || |
24 | Arch == llvm::Triple::mips64 || Arch == llvm::Triple::mips64el) { | 24 | Arch == llvm::Triple::mips64 || Arch == llvm::Triple::mips64el) { |
25 | - std::string LibDir = | 25 | - std::string LibDir = "/lib" + mips::getMipsABILibSuffix(Args, Triple); |
26 | - "/lib" + mips::getMipsABILibSuffix(Args, ToolChain.getTriple()); | ||
27 | StringRef LibName; | 26 | StringRef LibName; |
28 | bool IsNaN2008 = mips::isNaN2008(Args, ToolChain.getTriple()); | 27 | bool IsNaN2008 = mips::isNaN2008(Args, Triple); |
29 | if (mips::isUCLibc(Args)) | 28 | if (mips::isUCLibc(Args)) |
30 | @@ -9025,26 +9023,26 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, | 29 | @@ -9065,17 +9064,17 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, |
31 | else | 30 | else |
32 | LibName = IsNaN2008 ? "ld-linux-mipsn8.so.1" : "ld.so.1"; | 31 | LibName = IsNaN2008 ? "ld-linux-mipsn8.so.1" : "ld.so.1"; |
33 | 32 | ||
@@ -50,11 +49,9 @@ index 34237c4..94ad9db 100644 | |||
50 | } else if (Arch == llvm::Triple::systemz) | 49 | } else if (Arch == llvm::Triple::systemz) |
51 | return "/lib/ld64.so.1"; | 50 | return "/lib/ld64.so.1"; |
52 | else if (Arch == llvm::Triple::sparcv9) | 51 | else if (Arch == llvm::Triple::sparcv9) |
53 | return "/lib64/ld-linux.so.2"; | 52 | @@ -9084,7 +9083,7 @@ static std::string getLinuxDynamicLinker(const ArgList &Args, |
54 | else if (Arch == llvm::Triple::x86_64 && | 53 | Triple.getEnvironment() == llvm::Triple::GNUX32) |
55 | ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUX32) | 54 | return "/libx32/ld-linux-x32.so.2"; |
56 | - return "/libx32/ld-linux-x32.so.2"; | ||
57 | + return "/lib/ld-linux-x32.so.2"; | ||
58 | else | 55 | else |
59 | - return "/lib64/ld-linux-x86-64.so.2"; | 56 | - return "/lib64/ld-linux-x86-64.so.2"; |
60 | + return "/lib/ld-linux-x86-64.so.2"; | 57 | + return "/lib/ld-linux-x86-64.so.2"; |
diff --git a/recipes-devtools/clang/clang/0001-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-compile.patch b/recipes-devtools/clang/clang/0002-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch index 8945c66..6787df7 100644 --- a/recipes-devtools/clang/clang/0001-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-compile.patch +++ b/recipes-devtools/clang/clang/0002-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From a004191b8e3976ac4a201ddc78c03a777d3193d9 Mon Sep 17 00:00:00 2001 | 1 | From 002d533f62fb3a25e8515e3b53d384fb055ddac6 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 15 May 2015 12:13:17 -0700 | 3 | Date: Fri, 15 May 2015 12:13:17 -0700 |
4 | Subject: [PATCH] Remove CMAKE_CROSSCOMPILING so it can cross compile | 4 | Subject: [PATCH 2/4] llvm: Remove CMAKE_CROSSCOMPILING so it can cross compile |
5 | 5 | ||
6 | we already have llvm-config from clang-native | 6 | we already have llvm-config from clang-native |
7 | 7 | ||
@@ -11,10 +11,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
11 | 1 file changed, 2 insertions(+), 2 deletions(-) | 11 | 1 file changed, 2 insertions(+), 2 deletions(-) |
12 | 12 | ||
13 | diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt | 13 | diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt |
14 | index d2ef45a..3d8b7b1 100644 | 14 | index 32d0f4c..8d90b3b 100644 |
15 | --- a/tools/llvm-config/CMakeLists.txt | 15 | --- a/tools/llvm-config/CMakeLists.txt |
16 | +++ b/tools/llvm-config/CMakeLists.txt | 16 | +++ b/tools/llvm-config/CMakeLists.txt |
17 | @@ -34,7 +34,7 @@ add_llvm_tool(llvm-config | 17 | @@ -51,7 +51,7 @@ add_definitions(-DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}") |
18 | # Add the dependency on the generation step. | 18 | # Add the dependency on the generation step. |
19 | add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH}) | 19 | add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH}) |
20 | 20 | ||
@@ -23,12 +23,12 @@ index d2ef45a..3d8b7b1 100644 | |||
23 | set(${project}_LLVM_CONFIG_EXE "${LLVM_NATIVE_BUILD}/bin/llvm-config") | 23 | set(${project}_LLVM_CONFIG_EXE "${LLVM_NATIVE_BUILD}/bin/llvm-config") |
24 | set(${project}_LLVM_CONFIG_EXE ${${project}_LLVM_CONFIG_EXE} PARENT_SCOPE) | 24 | set(${project}_LLVM_CONFIG_EXE ${${project}_LLVM_CONFIG_EXE} PARENT_SCOPE) |
25 | 25 | ||
26 | @@ -47,4 +47,4 @@ if(CMAKE_CROSSCOMPILING) | 26 | @@ -64,4 +64,4 @@ if(CMAKE_CROSSCOMPILING) |
27 | add_dependencies(${project}NativeLLVMConfig CONFIGURE_LLVM_NATIVE) | 27 | add_dependencies(${project}NativeLLVMConfig CONFIGURE_LLVM_NATIVE) |
28 | 28 | ||
29 | add_dependencies(llvm-config ${project}NativeLLVMConfig) | 29 | add_dependencies(llvm-config ${project}NativeLLVMConfig) |
30 | -endif(CMAKE_CROSSCOMPILING) | 30 | -endif(CMAKE_CROSSCOMPILING) |
31 | +endif(CMAKE_CROSSCOMPILING1) | 31 | +endif(CMAKE_CROSSCOMPILING1) |
32 | -- | 32 | -- |
33 | 2.1.4 | 33 | 2.8.2 |
34 | 34 | ||
diff --git a/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch b/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch new file mode 100644 index 0000000..7418fc7 --- /dev/null +++ b/recipes-devtools/clang/clang/0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From be020e5e63464204a9459ecb807c9706f422f1da Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 19 May 2016 21:11:06 -0700 | ||
4 | Subject: [PATCH 3/4] clang: Driver/tools.cpp: Add -lssp and -lssp_nonshared on | ||
5 | musl | ||
6 | |||
7 | musl driver will need to add ssp libraries to linker cmdline | ||
8 | when using stack protector commands on compiler cmdline | ||
9 | |||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | lib/Driver/Tools.cpp | 7 +++++++ | ||
13 | 1 file changed, 7 insertions(+) | ||
14 | |||
15 | diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp | ||
16 | index d318b10..38d8e27 100644 | ||
17 | --- a/lib/Driver/Tools.cpp | ||
18 | +++ b/lib/Driver/Tools.cpp | ||
19 | @@ -9366,6 +9366,13 @@ void gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, | ||
20 | |||
21 | CmdArgs.push_back("-lc"); | ||
22 | |||
23 | + if (ToolChain.getTriple().isLinuxMuslEnvironment() && | ||
24 | + (Args.hasArg(options::OPT_fstack_protector) || | ||
25 | + Args.hasArg(options::OPT_fstack_protector_strong) || | ||
26 | + Args.hasArg(options::OPT_fstack_protector_all))) { | ||
27 | + CmdArgs.push_back("-lssp_nonshared"); | ||
28 | + CmdArgs.push_back("-lssp"); | ||
29 | + } | ||
30 | if (Args.hasArg(options::OPT_static)) | ||
31 | CmdArgs.push_back("--end-group"); | ||
32 | else | ||
33 | -- | ||
34 | 2.8.2 | ||
35 | |||
diff --git a/recipes-devtools/clang/clang/0002-Do-not-assume-linux-glibc.patch b/recipes-devtools/clang/clang/0003-llvm-Do-not-assume-linux-glibc.patch index d194898..6a84485 100644 --- a/recipes-devtools/clang/clang/0002-Do-not-assume-linux-glibc.patch +++ b/recipes-devtools/clang/clang/0003-llvm-Do-not-assume-linux-glibc.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 9f7b677d3a6582b232e16cb5518935633b2e65fb Mon Sep 17 00:00:00 2001 | 1 | From 877eeefccde262eda3bd022fff2ad6d147a6ad54 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 15 Mar 2016 05:26:47 +0000 | 3 | Date: Tue, 15 Mar 2016 05:26:47 +0000 |
4 | Subject: [PATCH 2/2] Do not assume linux == glibc | 4 | Subject: [PATCH 3/4] llvm: Do not assume linux == glibc |
5 | 5 | ||
6 | musl's implementation of std functions is different | 6 | musl's implementation of std functions is different |
7 | 7 | ||
@@ -24,5 +24,5 @@ index 9a7aeb5..e3b7fe2 100644 | |||
24 | EXPLICIT_SYMBOL(stderr); | 24 | EXPLICIT_SYMBOL(stderr); |
25 | EXPLICIT_SYMBOL(stdout); | 25 | EXPLICIT_SYMBOL(stdout); |
26 | -- | 26 | -- |
27 | 1.9.1 | 27 | 2.8.2 |
28 | 28 | ||
diff --git a/recipes-devtools/clang/clang/0001-musl-ppc-does-not-support-128-bit-long-double.patch b/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch index c897c9f..8ac0151 100644 --- a/recipes-devtools/clang/clang/0001-musl-ppc-does-not-support-128-bit-long-double.patch +++ b/recipes-devtools/clang/clang/0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 04668daf04919786807fbdd40ee412bb788ed4e7 Mon Sep 17 00:00:00 2001 | 1 | From 5af772366531ed83ce42a2d6a86c1f5820f659a4 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 10 May 2016 02:00:11 -0700 | 3 | Date: Tue, 10 May 2016 02:00:11 -0700 |
4 | Subject: [PATCH] musl/ppc does not support 128-bit long double | 4 | Subject: [PATCH 4/4] clang: musl/ppc does not support 128-bit long double |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | --- | 7 | --- |
@@ -9,10 +9,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
9 | 1 file changed, 2 insertions(+), 1 deletion(-) | 9 | 1 file changed, 2 insertions(+), 1 deletion(-) |
10 | 10 | ||
11 | diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp | 11 | diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp |
12 | index af8aea0..ad5ebee 100644 | 12 | index c205356..8146f21 100644 |
13 | --- a/lib/Basic/Targets.cpp | 13 | --- a/lib/Basic/Targets.cpp |
14 | +++ b/lib/Basic/Targets.cpp | 14 | +++ b/lib/Basic/Targets.cpp |
15 | @@ -1505,7 +1505,8 @@ public: | 15 | @@ -1578,7 +1578,8 @@ public: |
16 | break; | 16 | break; |
17 | } | 17 | } |
18 | 18 | ||
diff --git a/recipes-devtools/clang/clang/0004-llvm-remove-fopen64-fseeko64-ftello64-tmpfile64-on-m.patch b/recipes-devtools/clang/clang/0004-llvm-remove-fopen64-fseeko64-ftello64-tmpfile64-on-m.patch new file mode 100644 index 0000000..7c78e21 --- /dev/null +++ b/recipes-devtools/clang/clang/0004-llvm-remove-fopen64-fseeko64-ftello64-tmpfile64-on-m.patch | |||
@@ -0,0 +1,126 @@ | |||
1 | From bc8a39484dc4db80baa846438a6908e2f9572572 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 19 May 2016 22:52:05 -0700 | ||
4 | Subject: [PATCH 4/4] llvm: remove fopen64/fseeko64/ftello64/tmpfile64 on musl | ||
5 | |||
6 | They are not available | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | --- | ||
10 | include/llvm/Analysis/TargetLibraryInfo.def | 12 ------------ | ||
11 | lib/Analysis/TargetLibraryInfo.cpp | 13 ------------- | ||
12 | lib/Transforms/Utils/BuildLibCalls.cpp | 17 ----------------- | ||
13 | 3 files changed, 42 deletions(-) | ||
14 | |||
15 | diff --git a/include/llvm/Analysis/TargetLibraryInfo.def b/include/llvm/Analysis/TargetLibraryInfo.def | ||
16 | index b2a593d..7bfafcc 100644 | ||
17 | --- a/include/llvm/Analysis/TargetLibraryInfo.def | ||
18 | +++ b/include/llvm/Analysis/TargetLibraryInfo.def | ||
19 | @@ -530,9 +530,6 @@ TLI_DEFINE_STRING_INTERNAL("fmodl") | ||
20 | /// FILE *fopen(const char *filename, const char *mode); | ||
21 | TLI_DEFINE_ENUM_INTERNAL(fopen) | ||
22 | TLI_DEFINE_STRING_INTERNAL("fopen") | ||
23 | -/// FILE *fopen64(const char *filename, const char *opentype) | ||
24 | -TLI_DEFINE_ENUM_INTERNAL(fopen64) | ||
25 | -TLI_DEFINE_STRING_INTERNAL("fopen64") | ||
26 | /// int fprintf(FILE *stream, const char *format, ...); | ||
27 | TLI_DEFINE_ENUM_INTERNAL(fprintf) | ||
28 | TLI_DEFINE_STRING_INTERNAL("fprintf") | ||
29 | @@ -566,9 +563,6 @@ TLI_DEFINE_STRING_INTERNAL("fseek") | ||
30 | /// int fseeko(FILE *stream, off_t offset, int whence); | ||
31 | TLI_DEFINE_ENUM_INTERNAL(fseeko) | ||
32 | TLI_DEFINE_STRING_INTERNAL("fseeko") | ||
33 | -/// int fseeko64(FILE *stream, off64_t offset, int whence) | ||
34 | -TLI_DEFINE_ENUM_INTERNAL(fseeko64) | ||
35 | -TLI_DEFINE_STRING_INTERNAL("fseeko64") | ||
36 | /// int fsetpos(FILE *stream, const fpos_t *pos); | ||
37 | TLI_DEFINE_ENUM_INTERNAL(fsetpos) | ||
38 | TLI_DEFINE_STRING_INTERNAL("fsetpos") | ||
39 | @@ -590,9 +584,6 @@ TLI_DEFINE_STRING_INTERNAL("ftell") | ||
40 | /// off_t ftello(FILE *stream); | ||
41 | TLI_DEFINE_ENUM_INTERNAL(ftello) | ||
42 | TLI_DEFINE_STRING_INTERNAL("ftello") | ||
43 | -/// off64_t ftello64(FILE *stream) | ||
44 | -TLI_DEFINE_ENUM_INTERNAL(ftello64) | ||
45 | -TLI_DEFINE_STRING_INTERNAL("ftello64") | ||
46 | /// int ftrylockfile(FILE *file); | ||
47 | TLI_DEFINE_ENUM_INTERNAL(ftrylockfile) | ||
48 | TLI_DEFINE_STRING_INTERNAL("ftrylockfile") | ||
49 | @@ -1055,9 +1046,6 @@ TLI_DEFINE_STRING_INTERNAL("times") | ||
50 | /// FILE *tmpfile(void); | ||
51 | TLI_DEFINE_ENUM_INTERNAL(tmpfile) | ||
52 | TLI_DEFINE_STRING_INTERNAL("tmpfile") | ||
53 | -/// FILE *tmpfile64(void) | ||
54 | -TLI_DEFINE_ENUM_INTERNAL(tmpfile64) | ||
55 | -TLI_DEFINE_STRING_INTERNAL("tmpfile64") | ||
56 | /// int toascii(int c); | ||
57 | TLI_DEFINE_ENUM_INTERNAL(toascii) | ||
58 | TLI_DEFINE_STRING_INTERNAL("toascii") | ||
59 | diff --git a/lib/Analysis/TargetLibraryInfo.cpp b/lib/Analysis/TargetLibraryInfo.cpp | ||
60 | index 71f15b15..6d98f06 100644 | ||
61 | --- a/lib/Analysis/TargetLibraryInfo.cpp | ||
62 | +++ b/lib/Analysis/TargetLibraryInfo.cpp | ||
63 | @@ -375,16 +375,12 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, | ||
64 | TLI.setUnavailable(LibFunc::under_IO_getc); | ||
65 | TLI.setUnavailable(LibFunc::under_IO_putc); | ||
66 | TLI.setUnavailable(LibFunc::memalign); | ||
67 | - TLI.setUnavailable(LibFunc::fopen64); | ||
68 | - TLI.setUnavailable(LibFunc::fseeko64); | ||
69 | TLI.setUnavailable(LibFunc::fstat64); | ||
70 | TLI.setUnavailable(LibFunc::fstatvfs64); | ||
71 | - TLI.setUnavailable(LibFunc::ftello64); | ||
72 | TLI.setUnavailable(LibFunc::lstat64); | ||
73 | TLI.setUnavailable(LibFunc::open64); | ||
74 | TLI.setUnavailable(LibFunc::stat64); | ||
75 | TLI.setUnavailable(LibFunc::statvfs64); | ||
76 | - TLI.setUnavailable(LibFunc::tmpfile64); | ||
77 | } | ||
78 | |||
79 | // As currently implemented in clang, NVPTX code has no standard library to | ||
80 | @@ -861,15 +857,6 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, | ||
81 | case LibFunc::dunder_isoc99_sscanf: | ||
82 | return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && | ||
83 | FTy.getParamType(1)->isPointerTy()); | ||
84 | - case LibFunc::fopen64: | ||
85 | - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && | ||
86 | - FTy.getParamType(0)->isPointerTy() && | ||
87 | - FTy.getParamType(1)->isPointerTy()); | ||
88 | - case LibFunc::fseeko64: | ||
89 | - case LibFunc::ftello64: | ||
90 | - return (NumParams == 0 && FTy.getParamType(0)->isPointerTy()); | ||
91 | - case LibFunc::tmpfile64: | ||
92 | - return (FTy.getReturnType()->isPointerTy()); | ||
93 | case LibFunc::fstat64: | ||
94 | case LibFunc::fstatvfs64: | ||
95 | return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); | ||
96 | diff --git a/lib/Transforms/Utils/BuildLibCalls.cpp b/lib/Transforms/Utils/BuildLibCalls.cpp | ||
97 | index f4260a9..a9e673f 100644 | ||
98 | --- a/lib/Transforms/Utils/BuildLibCalls.cpp | ||
99 | +++ b/lib/Transforms/Utils/BuildLibCalls.cpp | ||
100 | @@ -638,23 +638,6 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { | ||
101 | Changed |= setOnlyReadsMemory(F, 1); | ||
102 | Changed |= setOnlyReadsMemory(F, 2); | ||
103 | return Changed; | ||
104 | - case LibFunc::fopen64: | ||
105 | - Changed |= setDoesNotThrow(F); | ||
106 | - Changed |= setDoesNotAlias(F, 0); | ||
107 | - Changed |= setDoesNotCapture(F, 1); | ||
108 | - Changed |= setDoesNotCapture(F, 2); | ||
109 | - Changed |= setOnlyReadsMemory(F, 1); | ||
110 | - Changed |= setOnlyReadsMemory(F, 2); | ||
111 | - return Changed; | ||
112 | - case LibFunc::fseeko64: | ||
113 | - case LibFunc::ftello64: | ||
114 | - Changed |= setDoesNotThrow(F); | ||
115 | - Changed |= setDoesNotCapture(F, 1); | ||
116 | - return Changed; | ||
117 | - case LibFunc::tmpfile64: | ||
118 | - Changed |= setDoesNotThrow(F); | ||
119 | - Changed |= setDoesNotAlias(F, 0); | ||
120 | - return Changed; | ||
121 | case LibFunc::fstat64: | ||
122 | case LibFunc::fstatvfs64: | ||
123 | Changed |= setDoesNotThrow(F); | ||
124 | -- | ||
125 | 2.8.2 | ||
126 | |||
diff --git a/recipes-devtools/clang/clang_git.bb b/recipes-devtools/clang/clang_git.bb index 9eecebe..b6804ac 100644 --- a/recipes-devtools/clang/clang_git.bb +++ b/recipes-devtools/clang/clang_git.bb | |||
@@ -15,17 +15,16 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=${LLVMMD5SUM}; \ | |||
15 | " | 15 | " |
16 | SRC_URI = "${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=llvm \ | 16 | SRC_URI = "${LLVM_GIT}/llvm.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=llvm \ |
17 | ${LLVM_GIT}/clang.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};destsuffix=git/tools/clang;name=clang \ | 17 | ${LLVM_GIT}/clang.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};destsuffix=git/tools/clang;name=clang \ |
18 | file://0001-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-compile.patch \ | 18 | file://0001-llvm-triplet-Add-musl-support.patch \ |
19 | file://0002-Do-not-assume-linux-glibc.patch \ | 19 | file://0002-llvm-Remove-CMAKE_CROSSCOMPILING-so-it-can-cross-com.patch \ |
20 | file://0001-triplet-Add-musl-support.patch \ | 20 | file://0003-llvm-Do-not-assume-linux-glibc.patch \ |
21 | file://0001-driver-Add-musl-ldso-support.patch;patchdir=tools/clang \ | 21 | file://0004-llvm-remove-fopen64-fseeko64-ftello64-tmpfile64-on-m.patch \ |
22 | file://0001-driver-Use-lib-for-ldso-on-OE.patch;patchdir=tools/clang \ | 22 | file://0001-clang-driver-Add-musl-ldso-support.patch;patchdir=tools/clang \ |
23 | file://0001-musl-ppc-does-not-support-128-bit-long-double.patch;patchdir=tools/clang \ | 23 | file://0002-clang-driver-Use-lib-for-ldso-on-OE.patch;patchdir=tools/clang \ |
24 | file://0001-Frontend-support-I-path-for-sysroot-expansion.patch;patchdir=tools/clang \ | 24 | file://0003-clang-Driver-tools.cpp-Add-lssp-and-lssp_nonshared-o.patch;patchdir=tools/clang \ |
25 | file://0004-clang-musl-ppc-does-not-support-128-bit-long-double.patch;patchdir=tools/clang \ | ||
25 | " | 26 | " |
26 | 27 | ||
27 | SRC_URI_append_libc-musl_class-target = " file://0001-remove-fopen64-fseeko64-ftello64-tmpfile64-on-musl.patch " | ||
28 | |||
29 | SRCREV_FORMAT = "llvm_clang" | 28 | SRCREV_FORMAT = "llvm_clang" |
30 | 29 | ||
31 | INHIBIT_DEFAULT_DEPS = "1" | 30 | INHIBIT_DEFAULT_DEPS = "1" |
diff --git a/recipes-devtools/clang/compiler-rt/0001-3.9-Remove-fatal-check-for-explicit-COMPILER_RT_DEFAULT_.patch b/recipes-devtools/clang/compiler-rt/0001-3.9-Remove-fatal-check-for-explicit-COMPILER_RT_DEFAULT_.patch deleted file mode 100644 index 1d02c4c..0000000 --- a/recipes-devtools/clang/compiler-rt/0001-3.9-Remove-fatal-check-for-explicit-COMPILER_RT_DEFAULT_.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From eeb6437d951a5316a5d743578ccb284db9d57caa Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 10 May 2016 10:37:55 -0700 | ||
4 | Subject: [PATCH] Remove fatal check for explicit | ||
5 | COMPILER_RT_DEFAULT_TARGET_ARCH | ||
6 | |||
7 | In OE, we do not deduce float-abi via target triplet | ||
8 | but via a CFLAGS option, and we do not have possibility | ||
9 | to build both hf and sf in same toolchain, therefore lets | ||
10 | ignore the test, we are doing the right job from recipe | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | cmake/Modules/CompilerRTUtils.cmake | 4 ---- | ||
15 | 1 file changed, 4 deletions(-) | ||
16 | |||
17 | diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake | ||
18 | index b4a2b48..086d9ba 100644 | ||
19 | --- a/cmake/Modules/CompilerRTUtils.cmake | ||
20 | +++ b/cmake/Modules/CompilerRTUtils.cmake | ||
21 | @@ -125,9 +125,5 @@ macro(test_target_arch arch def) | ||
22 | endif() | ||
23 | if(${CAN_TARGET_${arch}}) | ||
24 | list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) | ||
25 | - elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "${arch}" AND | ||
26 | - COMPILER_RT_HAS_EXPLICIT_DEFAULT_TARGET_TRIPLE) | ||
27 | - # Bail out if we cannot target the architecture we plan to test. | ||
28 | - message(FATAL_ERROR "Cannot compile for ${arch}:\n${TARGET_${arch}_OUTPUT}") | ||
29 | endif() | ||
30 | endmacro() | ||
31 | -- | ||
32 | 2.8.2 | ||
33 | |||
diff --git a/recipes-devtools/clang/compiler-rt/0001-Remove-fatal-check-for-explicit-COMPILER_RT_DEFAULT_.patch b/recipes-devtools/clang/compiler-rt/0001-Remove-fatal-check-for-explicit-COMPILER_RT_DEFAULT_.patch index d741b55..1a7b96b 100644 --- a/recipes-devtools/clang/compiler-rt/0001-Remove-fatal-check-for-explicit-COMPILER_RT_DEFAULT_.patch +++ b/recipes-devtools/clang/compiler-rt/0001-Remove-fatal-check-for-explicit-COMPILER_RT_DEFAULT_.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 14f4f8e55b363037ae881084e4594934a869cf5d Mon Sep 17 00:00:00 2001 | 1 | From b0de87ae88ff187820624d461fbb8fde84a90eb1 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 10 May 2016 10:37:55 -0700 | 3 | Date: Tue, 10 May 2016 10:37:55 -0700 |
4 | Subject: [PATCH] Remove fatal check for explicit | 4 | Subject: [PATCH 1/3] Remove fatal check for explicit |
5 | COMPILER_RT_DEFAULT_TARGET_ARCH | 5 | COMPILER_RT_DEFAULT_TARGET_ARCH |
6 | 6 | ||
7 | In OE, we do not deduce float-abi via target triplet | 7 | In OE, we do not deduce float-abi via target triplet |
@@ -11,14 +11,14 @@ ignore the test, we are doing the right job from recipe | |||
11 | 11 | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | --- | 13 | --- |
14 | cmake/config-ix.cmake | 4 ---- | 14 | cmake/Modules/CompilerRTUtils.cmake | 4 ---- |
15 | 1 file changed, 4 deletions(-) | 15 | 1 file changed, 4 deletions(-) |
16 | 16 | ||
17 | diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake | 17 | diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake |
18 | index 264085e..299682d 100644 | 18 | index b4a2b48..086d9ba 100644 |
19 | --- a/cmake/config-ix.cmake | 19 | --- a/cmake/Modules/CompilerRTUtils.cmake |
20 | +++ b/cmake/config-ix.cmake | 20 | +++ b/cmake/Modules/CompilerRTUtils.cmake |
21 | @@ -128,10 +128,6 @@ macro(test_target_arch arch def) | 21 | @@ -125,9 +125,5 @@ macro(test_target_arch arch def) |
22 | endif() | 22 | endif() |
23 | if(${CAN_TARGET_${arch}}) | 23 | if(${CAN_TARGET_${arch}}) |
24 | list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) | 24 | list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch}) |
@@ -28,7 +28,6 @@ index 264085e..299682d 100644 | |||
28 | - message(FATAL_ERROR "Cannot compile for ${arch}:\n${TARGET_${arch}_OUTPUT}") | 28 | - message(FATAL_ERROR "Cannot compile for ${arch}:\n${TARGET_${arch}_OUTPUT}") |
29 | endif() | 29 | endif() |
30 | endmacro() | 30 | endmacro() |
31 | |||
32 | -- | 31 | -- |
33 | 2.8.2 | 32 | 2.8.2 |
34 | 33 | ||
diff --git a/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch b/recipes-devtools/clang/compiler-rt/0002-support-a-new-embedded-linux-target.patch index 2fbaf1c..12fc4e4 100644 --- a/recipes-devtools/clang/compiler-rt/0001-support-a-new-embedded-linux-target.patch +++ b/recipes-devtools/clang/compiler-rt/0002-support-a-new-embedded-linux-target.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 6e66e74ebe27ae6b5f072f857bab92a10c600d64 Mon Sep 17 00:00:00 2001 | 1 | From 7b7cdc3fcbec45f08b20600c8410c125edeb67ef Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sun, 19 Apr 2015 15:16:23 -0700 | 3 | Date: Sun, 19 Apr 2015 15:16:23 -0700 |
4 | Subject: [PATCH] support a new embedded linux target | 4 | Subject: [PATCH 2/3] support a new embedded linux target |
5 | 5 | ||
6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 6 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
7 | --- | 7 | --- |
@@ -13,7 +13,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
13 | create mode 100644 make/platform/clang_linux_embedded_test_input.c | 13 | create mode 100644 make/platform/clang_linux_embedded_test_input.c |
14 | 14 | ||
15 | diff --git a/lib/builtins/int_util.c b/lib/builtins/int_util.c | 15 | diff --git a/lib/builtins/int_util.c b/lib/builtins/int_util.c |
16 | index 323e461..d8f775d 100644 | 16 | index 420d1e2..0e46141 100644 |
17 | --- a/lib/builtins/int_util.c | 17 | --- a/lib/builtins/int_util.c |
18 | +++ b/lib/builtins/int_util.c | 18 | +++ b/lib/builtins/int_util.c |
19 | @@ -48,8 +48,7 @@ void compilerrt_abort_impl(const char *file, int line, const char *function) { | 19 | @@ -48,8 +48,7 @@ void compilerrt_abort_impl(const char *file, int line, const char *function) { |
@@ -322,5 +322,5 @@ diff --git a/make/platform/clang_linux_embedded_test_input.c b/make/platform/cla | |||
322 | new file mode 100644 | 322 | new file mode 100644 |
323 | index 0000000..e69de29 | 323 | index 0000000..e69de29 |
324 | -- | 324 | -- |
325 | 2.1.4 | 325 | 2.8.2 |
326 | 326 | ||
diff --git a/recipes-devtools/clang/compiler-rt/0001-Simplify-cross-compilation.-Don-t-use-native-compile.patch b/recipes-devtools/clang/compiler-rt/0003-Simplify-cross-compilation.-Don-t-use-native-compile.patch index 67b0e73..ffbe537 100644 --- a/recipes-devtools/clang/compiler-rt/0001-Simplify-cross-compilation.-Don-t-use-native-compile.patch +++ b/recipes-devtools/clang/compiler-rt/0003-Simplify-cross-compilation.-Don-t-use-native-compile.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 6ca47f1d7d4f9fd34baeba86af67108ac0eaeffe Mon Sep 17 00:00:00 2001 | 1 | From f8617c08ad6e38ccb4623a777cd8c9601af6e2ec Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sun, 3 Apr 2016 07:40:06 +0000 | 3 | Date: Thu, 19 May 2016 23:11:45 -0700 |
4 | Subject: [PATCH] Simplify cross-compilation. Don't use native-compiled | 4 | Subject: [PATCH 3/3] Simplify cross-compilation. Don't use native-compiled |
5 | llvm-config. | 5 | llvm-config. |
6 | 6 | ||
7 | Note: AddLLVM.cmake does not expose the LLVM source directory. | 7 | Note: AddLLVM.cmake does not expose the LLVM source directory. |
@@ -20,13 +20,13 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
20 | 1 file changed, 6 insertions(+), 26 deletions(-) | 20 | 1 file changed, 6 insertions(+), 26 deletions(-) |
21 | 21 | ||
22 | diff --git a/CMakeLists.txt b/CMakeLists.txt | 22 | diff --git a/CMakeLists.txt b/CMakeLists.txt |
23 | index c60c246..6f989bf 100644 | 23 | index d8794b5..d5477cf 100644 |
24 | --- a/CMakeLists.txt | 24 | --- a/CMakeLists.txt |
25 | +++ b/CMakeLists.txt | 25 | +++ b/CMakeLists.txt |
26 | @@ -85,32 +85,12 @@ else() | 26 | @@ -60,32 +60,12 @@ option(COMPILER_RT_BUILD_SANITIZERS "Build sanitizers" ON) |
27 | set(COMPILER_RT_TEST_COMPILER ${CMAKE_C_COMPILER} CACHE PATH "Compiler to use for testing") | 27 | mark_as_advanced(COMPILER_RT_BUILD_SANITIZERS) |
28 | set(COMPILER_RT_TEST_CXX_COMPILER ${CMAKE_CXX_COMPILER} CACHE PATH "C++ Compiler to use for testing") | ||
29 | 28 | ||
29 | if (COMPILER_RT_STANDALONE_BUILD) | ||
30 | - if (NOT LLVM_CONFIG_PATH) | 30 | - if (NOT LLVM_CONFIG_PATH) |
31 | - find_program(LLVM_CONFIG_PATH "llvm-config" | 31 | - find_program(LLVM_CONFIG_PATH "llvm-config" |
32 | - DOC "Path to llvm-config binary") | 32 | - DOC "Path to llvm-config binary") |
@@ -49,7 +49,7 @@ index c60c246..6f989bf 100644 | |||
49 | - | 49 | - |
50 | - # Make use of LLVM CMake modules. | 50 | - # Make use of LLVM CMake modules. |
51 | - file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE) | 51 | - file(TO_CMAKE_PATH ${LLVM_BINARY_DIR} LLVM_BINARY_DIR_CMAKE_STYLE) |
52 | - set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/share/llvm/cmake") | 52 | - set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR_CMAKE_STYLE}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm") |
53 | - list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") | 53 | - list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}") |
54 | - # Get some LLVM variables from LLVMConfig. | 54 | - # Get some LLVM variables from LLVMConfig. |
55 | - include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake") | 55 | - include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake") |
@@ -63,5 +63,5 @@ index c60c246..6f989bf 100644 | |||
63 | set(LLVM_LIBRARY_OUTPUT_INTDIR | 63 | set(LLVM_LIBRARY_OUTPUT_INTDIR |
64 | ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) | 64 | ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) |
65 | -- | 65 | -- |
66 | 1.9.1 | 66 | 2.8.2 |
67 | 67 | ||
diff --git a/recipes-devtools/clang/compiler-rt_git.bb b/recipes-devtools/clang/compiler-rt_git.bb index a9ce234..1fb7bf7 100644 --- a/recipes-devtools/clang/compiler-rt_git.bb +++ b/recipes-devtools/clang/compiler-rt_git.bb | |||
@@ -17,9 +17,9 @@ PV .= "+git${SRCPV}" | |||
17 | LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=27b14ab4ce08d04c3a9a5f0ed7997362; \ | 17 | LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=27b14ab4ce08d04c3a9a5f0ed7997362; \ |
18 | " | 18 | " |
19 | SRC_URI = "${LLVM_GIT}/compiler-rt.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=compiler-rt \ | 19 | SRC_URI = "${LLVM_GIT}/compiler-rt.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=compiler-rt \ |
20 | file://0001-support-a-new-embedded-linux-target.patch \ | ||
21 | file://0001-Simplify-cross-compilation.-Don-t-use-native-compile.patch \ | ||
22 | file://0001-Remove-fatal-check-for-explicit-COMPILER_RT_DEFAULT_.patch \ | 20 | file://0001-Remove-fatal-check-for-explicit-COMPILER_RT_DEFAULT_.patch \ |
21 | file://0002-support-a-new-embedded-linux-target.patch \ | ||
22 | file://0003-Simplify-cross-compilation.-Don-t-use-native-compile.patch \ | ||
23 | " | 23 | " |
24 | 24 | ||
25 | SRCREV_FORMAT = "compiler-rt" | 25 | SRCREV_FORMAT = "compiler-rt" |
diff --git a/recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch b/recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch index f66de8f..e9eb4d2 100644 --- a/recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch +++ b/recipes-devtools/clang/libcxx/0001-use-constexpr-when-using-glibc.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | From 21ddd574f6e9b321614d39a7765f1ad98aa09f54 Mon Sep 17 00:00:00 2001 | 1 | From a97e50970942df6bf0f3f2fda5ba44e10ef63713 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Tue, 15 Mar 2016 04:56:27 +0000 | 3 | Date: Thu, 19 May 2016 23:22:52 -0700 |
4 | Subject: [PATCH] use constexpr when using glibc | 4 | Subject: [PATCH] use constexpr when using glibc |
5 | 5 | ||
6 | POSIX does not permit using PTHREAD_COND_INITIALIZER except for static | 6 | POSIX does not permit using PTHREAD_COND_INITIALIZER except for static |
@@ -12,45 +12,37 @@ code is invalid | |||
12 | 12 | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
14 | --- | 14 | --- |
15 | include/__mutex_base | 11 ++++++++--- | 15 | include/__mutex_base | 10 ++++++++-- |
16 | 1 file changed, 8 insertions(+), 3 deletions(-) | 16 | 1 file changed, 8 insertions(+), 2 deletions(-) |
17 | 17 | ||
18 | diff --git a/include/__mutex_base b/include/__mutex_base | 18 | diff --git a/include/__mutex_base b/include/__mutex_base |
19 | index b019b47..10ad9f2 100644 | 19 | index 32536a6..58430c7 100644 |
20 | --- a/include/__mutex_base | 20 | --- a/include/__mutex_base |
21 | +++ b/include/__mutex_base | 21 | +++ b/include/__mutex_base |
22 | @@ -33,7 +33,10 @@ class _LIBCPP_TYPE_VIS mutex | 22 | @@ -39,7 +39,10 @@ class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mut |
23 | public: | 23 | public: |
24 | _LIBCPP_INLINE_VISIBILITY | 24 | _LIBCPP_INLINE_VISIBILITY |
25 | #ifndef _LIBCPP_HAS_NO_CONSTEXPR | 25 | #ifndef _LIBCPP_HAS_NO_CONSTEXPR |
26 | - constexpr mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {} | 26 | - constexpr mutex() _NOEXCEPT : __m_(_LIBCPP_MUTEX_INITIALIZER) {} |
27 | +#ifdef __GLIBC__ | 27 | +#ifdef __GLIBC__ |
28 | + constexpr | 28 | + constexpr |
29 | +#endif | 29 | +#endif |
30 | + mutex() _NOEXCEPT : __m_(PTHREAD_MUTEX_INITIALIZER) {} | 30 | + mutex() _NOEXCEPT : __m_(_LIBCPP_MUTEX_INITIALIZER) {} |
31 | #else | 31 | #else |
32 | mutex() _NOEXCEPT {__m_ = (pthread_mutex_t)PTHREAD_MUTEX_INITIALIZER;} | 32 | mutex() _NOEXCEPT {__m_ = (__libcpp_mutex_t)_LIBCPP_MUTEX_INITIALIZER;} |
33 | #endif | 33 | #endif |
34 | @@ -63,7 +66,6 @@ extern const try_to_lock_t try_to_lock; | 34 | @@ -278,7 +281,10 @@ class _LIBCPP_TYPE_VIS condition_variable |
35 | extern const adopt_lock_t adopt_lock; | ||
36 | |||
37 | #else | ||
38 | - | ||
39 | constexpr defer_lock_t defer_lock = defer_lock_t(); | ||
40 | constexpr try_to_lock_t try_to_lock = try_to_lock_t(); | ||
41 | constexpr adopt_lock_t adopt_lock = adopt_lock_t(); | ||
42 | @@ -272,7 +274,10 @@ class _LIBCPP_TYPE_VIS condition_variable | ||
43 | public: | 35 | public: |
44 | _LIBCPP_INLINE_VISIBILITY | 36 | _LIBCPP_INLINE_VISIBILITY |
45 | #ifndef _LIBCPP_HAS_NO_CONSTEXPR | 37 | #ifndef _LIBCPP_HAS_NO_CONSTEXPR |
46 | - constexpr condition_variable() : __cv_(PTHREAD_COND_INITIALIZER) {} | 38 | - constexpr condition_variable() : __cv_(_LIBCPP_CONDVAR_INITIALIZER) {} |
47 | +#ifdef __GLIBC__ | 39 | +#ifdef __GLIBC__ |
48 | + constexpr | 40 | + constexpr |
49 | +#endif | 41 | +#endif |
50 | + condition_variable() : __cv_(PTHREAD_COND_INITIALIZER) {} | 42 | + condition_variable() : __cv_(_LIBCPP_CONDVAR_INITIALIZER) {} |
51 | #else | 43 | #else |
52 | condition_variable() {__cv_ = (pthread_cond_t)PTHREAD_COND_INITIALIZER;} | 44 | condition_variable() {__cv_ = (__libcpp_condvar_t)_LIBCPP_CONDVAR_INITIALIZER;} |
53 | #endif | 45 | #endif |
54 | -- | 46 | -- |
55 | 1.9.1 | 47 | 2.8.2 |
56 | 48 | ||
diff --git a/recipes-devtools/clang/llvm-libunwind/0001-aarch64-Use-x29-and-x30-for-fp-and-lr-respectively.patch b/recipes-devtools/clang/llvm-libunwind/0001-aarch64-Use-x29-and-x30-for-fp-and-lr-respectively.patch deleted file mode 100644 index 0c65dba..0000000 --- a/recipes-devtools/clang/llvm-libunwind/0001-aarch64-Use-x29-and-x30-for-fp-and-lr-respectively.patch +++ /dev/null | |||
@@ -1,65 +0,0 @@ | |||
1 | From 5def58395d2248dfcd3165b4f23ba04b7f355837 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 10 Sep 2015 21:27:28 +0000 | ||
4 | Subject: [PATCH] aarch64: Use x29 and x30 for fp and lr respectively | ||
5 | |||
6 | This does not change the code generation with integrated asm | ||
7 | but using x30 and x29 helps compile the code with gnu as. Currently gas | ||
8 | fails to assemble this code with errors as below | ||
9 | |||
10 | Error: operand X should be an integer register | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | Upstream-Status: Submitted[http://reviews.llvm.org/D12777] | ||
15 | |||
16 | src/UnwindRegistersRestore.S | 6 +++--- | ||
17 | src/UnwindRegistersSave.S | 6 +++--- | ||
18 | 2 files changed, 6 insertions(+), 6 deletions(-) | ||
19 | |||
20 | diff --git a/src/UnwindRegistersRestore.S b/src/UnwindRegistersRestore.S | ||
21 | index 7d21953..1244d82 100644 | ||
22 | --- a/src/UnwindRegistersRestore.S | ||
23 | +++ b/src/UnwindRegistersRestore.S | ||
24 | @@ -282,8 +282,8 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind15Registers_arm646jumptoEv) | ||
25 | ldp x22,x23, [x0, #0x0B0] | ||
26 | ldp x24,x25, [x0, #0x0C0] | ||
27 | ldp x26,x27, [x0, #0x0D0] | ||
28 | - ldp x28,fp, [x0, #0x0E0] | ||
29 | - ldr lr, [x0, #0x100] // restore pc into lr | ||
30 | + ldp x28,x29, [x0, #0x0E0] | ||
31 | + ldr x30, [x0, #0x100] // restore pc into lr | ||
32 | ldr x1, [x0, #0x0F8] | ||
33 | mov sp,x1 // restore sp | ||
34 | |||
35 | @@ -306,7 +306,7 @@ DEFINE_LIBUNWIND_PRIVATE_FUNCTION(_ZN9libunwind15Registers_arm646jumptoEv) | ||
36 | ldr d31, [x0, #0x208] | ||
37 | |||
38 | ldp x0, x1, [x0, #0x000] // restore x0,x1 | ||
39 | - ret lr // jump to pc | ||
40 | + ret x30 // jump to pc | ||
41 | |||
42 | #elif defined(__arm__) && !defined(__APPLE__) | ||
43 | |||
44 | diff --git a/src/UnwindRegistersSave.S b/src/UnwindRegistersSave.S | ||
45 | index d26908c..80776c8 100644 | ||
46 | --- a/src/UnwindRegistersSave.S | ||
47 | +++ b/src/UnwindRegistersSave.S | ||
48 | @@ -254,11 +254,11 @@ DEFINE_LIBUNWIND_FUNCTION(unw_getcontext) | ||
49 | stp x22,x23, [x0, #0x0B0] | ||
50 | stp x24,x25, [x0, #0x0C0] | ||
51 | stp x26,x27, [x0, #0x0D0] | ||
52 | - stp x28,fp, [x0, #0x0E0] | ||
53 | - str lr, [x0, #0x0F0] | ||
54 | + stp x28,x29, [x0, #0x0E0] | ||
55 | + str x30, [x0, #0x0F0] | ||
56 | mov x1,sp | ||
57 | str x1, [x0, #0x0F8] | ||
58 | - str lr, [x0, #0x100] // store return address as pc | ||
59 | + str x30, [x0, #0x100] // store return address as pc | ||
60 | // skip cpsr | ||
61 | stp d0, d1, [x0, #0x110] | ||
62 | stp d2, d3, [x0, #0x120] | ||
63 | -- | ||
64 | 2.5.1 | ||
65 | |||
diff --git a/recipes-devtools/clang/llvm-libunwind_git.bb b/recipes-devtools/clang/llvm-libunwind_git.bb index 51bdb06..48890e3 100644 --- a/recipes-devtools/clang/llvm-libunwind_git.bb +++ b/recipes-devtools/clang/llvm-libunwind_git.bb | |||
@@ -24,7 +24,6 @@ SRC_URI = "\ | |||
24 | ${LLVM_GIT}/libcxx.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=libcxx;destsuffix=git/projects/libcxx \ | 24 | ${LLVM_GIT}/libcxx.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=libcxx;destsuffix=git/projects/libcxx \ |
25 | ${LLVM_GIT}/libcxxabi.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=libcxxabi;destsuffix=git/projects/libcxxabi \ | 25 | ${LLVM_GIT}/libcxxabi.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=libcxxabi;destsuffix=git/projects/libcxxabi \ |
26 | ${LLVM_GIT}/libunwind.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=libunwind;destsuffix=git/projects/libunwind \ | 26 | ${LLVM_GIT}/libunwind.git;protocol=${LLVM_GIT_PROTOCOL};branch=${BRANCH};name=libunwind;destsuffix=git/projects/libunwind \ |
27 | file://0001-aarch64-Use-x29-and-x30-for-fp-and-lr-respectively.patch \ | ||
28 | " | 27 | " |
29 | 28 | ||
30 | SRCREV_FORMAT = "llvm_libcxx_libcxxabi_libunwind" | 29 | SRCREV_FORMAT = "llvm_libcxx_libcxxabi_libunwind" |