Bump buildroot to 2019.02
This commit is contained in:
26
bsp/buildroot/package/clang/Config.in
Normal file
26
bsp/buildroot/package/clang/Config.in
Normal file
@@ -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
|
||||
3
bsp/buildroot/package/clang/clang.hash
Normal file
3
bsp/buildroot/package/clang/clang.hash
Normal file
@@ -0,0 +1,3 @@
|
||||
# locally calculated
|
||||
sha256 a45b62dde5d7d5fdcdfa876b0af92f164d434b06e9e89b5d0b1cbc65dfe3f418 cfe-7.0.1.src.tar.xz
|
||||
sha256 3f3f2e96e3b7319d2b4b49227d6da624a717340107ce2ca5342a25e0e57dfd35 LICENSE.TXT
|
||||
98
bsp/buildroot/package/clang/clang.mk
Normal file
98
bsp/buildroot/package/clang/clang.mk
Normal file
@@ -0,0 +1,98 @@
|
||||
################################################################################
|
||||
#
|
||||
# clang
|
||||
#
|
||||
################################################################################
|
||||
|
||||
CLANG_VERSION = 7.0.1
|
||||
CLANG_SITE = http://llvm.org/releases/$(CLANG_VERSION)
|
||||
CLANG_SOURCE = cfe-$(CLANG_VERSION).src.tar.xz
|
||||
CLANG_LICENSE = NCSA
|
||||
CLANG_LICENSE_FILES = LICENSE.TXT
|
||||
CLANG_SUPPORTS_IN_SOURCE_BUILD = NO
|
||||
CLANG_INSTALL_STAGING = YES
|
||||
|
||||
HOST_CLANG_DEPENDENCIES = host-llvm host-libxml2
|
||||
CLANG_DEPENDENCIES = llvm host-clang
|
||||
|
||||
# This option is needed, otherwise multiple shared libs
|
||||
# (libclangAST.so, libclangBasic.so, libclangFrontend.so, etc.) will
|
||||
# be generated. As a final shared lib containing all these components
|
||||
# (libclang.so) is also generated, this resulted in the following
|
||||
# error when trying to use tools that use libclang:
|
||||
# $ CommandLine Error: Option 'track-memory' registered more than once!
|
||||
# $ LLVM ERROR: inconsistency in registered CommandLine options
|
||||
# By setting BUILD_SHARED_LIBS to OFF, we generate multiple static
|
||||
# libraries (the same way as host's clang build) and finally
|
||||
# libclang.so to be installed on the target.
|
||||
CLANG_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF
|
||||
|
||||
# Default is Debug build, which requires considerably more disk space
|
||||
# and build time. Release build is selected for host and target
|
||||
# because the linker can run out of memory in Debug mode.
|
||||
HOST_CLANG_CONF_OPTS += -DCMAKE_BUILD_TYPE=Release
|
||||
CLANG_CONF_OPTS += -DCMAKE_BUILD_TYPE=Release
|
||||
|
||||
CLANG_CONF_OPTS += -DCMAKE_CROSSCOMPILING=1
|
||||
|
||||
# We need to build tools because libclang is a tool
|
||||
HOST_CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON
|
||||
CLANG_CONF_OPTS += -DCLANG_BUILD_TOOLS=ON
|
||||
|
||||
HOST_CLANG_CONF_OPTS += \
|
||||
-DCLANG_BUILD_EXAMPLES=OFF \
|
||||
-DCLANG_INCLUDE_DOCS=OFF \
|
||||
-DCLANG_INCLUDE_TESTS=OFF
|
||||
|
||||
CLANG_CONF_OPTS += \
|
||||
-DCLANG_BUILD_EXAMPLES=OFF \
|
||||
-DCLANG_INCLUDE_DOCS=OFF \
|
||||
-DCLANG_INCLUDE_TESTS=OFF
|
||||
|
||||
HOST_CLANG_CONF_OPTS += -DLLVM_CONFIG:FILEPATH=$(HOST_DIR)/bin/llvm-config \
|
||||
-DCLANG_DEFAULT_LINKER=$(TARGET_LD)
|
||||
CLANG_CONF_OPTS += -DLLVM_CONFIG:FILEPATH=$(STAGING_DIR)/usr/bin/llvm-config \
|
||||
-DCLANG_TABLEGEN:FILEPATH=$(HOST_DIR)/bin/clang-tblgen \
|
||||
-DLLVM_TABLEGEN_EXE:FILEPATH=$(HOST_DIR)/bin/llvm-tblgen
|
||||
|
||||
# Clang can't be used as compiler on the target since there are no
|
||||
# development files (headers) and other build tools. So remove clang
|
||||
# binaries and some other unnecessary files from target.
|
||||
CLANG_FILES_TO_REMOVE = \
|
||||
/usr/bin/clang* \
|
||||
/usr/bin/c-index-test \
|
||||
/usr/bin/git-clang-format \
|
||||
/usr/bin/scan-build \
|
||||
/usr/bin/scan-view \
|
||||
/usr/libexec/c++-analyzer \
|
||||
/usr/libexec/ccc-analyzer \
|
||||
/usr/share/clang \
|
||||
/usr/share/opt-viewer \
|
||||
/usr/share/scan-build \
|
||||
/usr/share/scan-view \
|
||||
/usr/share/man/man1/scan-build.1 \
|
||||
/usr/lib/clang
|
||||
|
||||
define CLANG_CLEANUP_TARGET
|
||||
rm -rf $(addprefix $(TARGET_DIR),$(CLANG_FILES_TO_REMOVE))
|
||||
endef
|
||||
CLANG_POST_INSTALL_TARGET_HOOKS += CLANG_CLEANUP_TARGET
|
||||
|
||||
# clang-tblgen is not installed by default, however it is necessary
|
||||
# for cross-compiling clang
|
||||
define HOST_CLANG_INSTALL_CLANG_TBLGEN
|
||||
$(INSTALL) -D -m 0755 $(HOST_CLANG_BUILDDIR)/bin/clang-tblgen \
|
||||
$(HOST_DIR)/bin/clang-tblgen
|
||||
endef
|
||||
HOST_CLANG_POST_INSTALL_HOOKS = HOST_CLANG_INSTALL_CLANG_TBLGEN
|
||||
|
||||
# This option must be enabled to link libclang dynamically against libLLVM.so
|
||||
HOST_CLANG_CONF_OPTS += -DLLVM_LINK_LLVM_DYLIB=ON
|
||||
CLANG_CONF_OPTS += -DLLVM_LINK_LLVM_DYLIB=ON
|
||||
|
||||
# Prevent clang binaries from linking against LLVM static libs
|
||||
HOST_CLANG_CONF_OPTS += -DLLVM_DYLIB_COMPONENTS=all
|
||||
CLANG_CONF_OPTS += -DLLVM_DYLIB_COMPONENTS=all
|
||||
|
||||
$(eval $(cmake-package))
|
||||
$(eval $(host-cmake-package))
|
||||
Reference in New Issue
Block a user