Skip to contentSkip to conversation

package/clang: new package

Buildroot Thomas Petazzoni 1 participant 1 message Apr 28, 2018

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=86defeeab61728fc29639110a3c28a2824294bdb
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

This patch provides Clang tools and libraries for the host and libclang for the target.

host-clang is needed to build libclc, which is provided in a follow-up patch.

We need libclang for the target because it is used by most of OpenCL implementations.

A later patch in this series will enable Clover, the OpenCL implementation part of Mesa3D, which requires libclang.

clang-tblgen must be copied to HOST_DIR as it is not installed by default but is needed for cross-compilation:
http://lists.llvm.org/pipermail/cfe-dev/2015-June/043318.html

[Thomas:
- Add Config.in comment about BR2_TOOLCHAIN_HAS_GCC_BUG_64735
- Minor reformatting/rewrapping of comments in .mk file]

---
 DEVELOPERS               |  1 +
 package/Config.in        |  1 +
 package/clang/Config.in  | 26 +++++++++++++++++
 package/clang/clang.hash |  3 ++
 package/clang/clang.mk   | 74 ++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 105 insertions(+)
DEVELOPERS +1 -0
index 25edcf97b3..b281245df2 100644
@@ -1912,6 +1912,7 @@ F:	package/dropwatch/
 F:	package/tstools/
 
 N:	Valentin Korenblit <[email protected]>
+F:	package/clang/
 F:	package/llvm/
 
 N:	Vanya Sergeev <[email protected]>
package/Config.in +1 -0
index 8614a9b216..66f6d10058 100644
@@ -1485,6 +1485,7 @@ menu "Other"
 	source "package/bctoolbox/Config.in"
 	source "package/bdwgc/Config.in"
 	source "package/boost/Config.in"
+	source "package/clang/Config.in"
 	source "package/clapack/Config.in"
 	source "package/classpath/Config.in"
 	source "package/cppcms/Config.in"
package/clang/Config.in new file +26 -0
new file mode 100644
index 0000000000..80f03c80b7
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_CLANG
+	bool "clang"
+	depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+	depends on BR2_HOST_GCC_AT_LEAST_4_8
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
+	depends on !BR2_STATIC_LIBS
+	depends on BR2_USE_WCHAR # std::wstring
+	select BR2_PACKAGE_LLVM
+	help
+	  Clang is a C/C++, Objective C/C++ and OpenCL C front-end
+	  for the LLVM compiler.
+
+	  http://clang.llvm.org
+
+comment "clang needs a toolchain w/ wchar, threads, C++, gcc >= 4.8, host gcc >= 4.8, dynamic library"
+	depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+	depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 \
+		|| BR2_STATIC_LIBS || !BR2_USE_WCHAR
+
+comment "clang needs a toolchain not affected by GCC bug 64735"
+	depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
package/clang/clang.hash new file +3 -0
new file mode 100644
index 0000000000..a5bf909814
@@ -0,0 +1,3 @@
+# locally calculated
+sha256 135f6c9b0cd2da1aff2250e065946258eb699777888df39ca5a5b4fe5e23d0ff cfe-5.0.1.src.tar.xz
+sha256 de4c79665f0f5688b0ace17cba6f8e0343925bb95e0949d66d47bbd4527310d6 LICENSE.TXT
package/clang/clang.mk new file +74 -0

74 lines not on this page · raw message