mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
llvm: update to 3.9.0
This commit is contained in:
parent
087b6688e7
commit
c15819934a
@ -17,15 +17,14 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="llvm"
|
||||
PKG_VERSION="3.8.1"
|
||||
PKG_VERSION="3.9.0"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_ARCH="x86_64"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://llvm.org/"
|
||||
PKG_URL="http://llvm.org/releases/$PKG_VERSION/${PKG_NAME}-${PKG_VERSION}.src.tar.xz"
|
||||
PKG_SOURCE_DIR="${PKG_NAME}-${PKG_VERSION}.src"
|
||||
PKG_DEPENDS_HOST=""
|
||||
PKG_DEPENDS_TARGET="toolchain llvm:host"
|
||||
PKG_DEPENDS_TARGET="toolchain zlib"
|
||||
PKG_PRIORITY="optional"
|
||||
PKG_SECTION="lang"
|
||||
PKG_SHORTDESC="llvm: Low Level Virtual Machine"
|
||||
@ -34,88 +33,43 @@ PKG_LONGDESC="Low-Level Virtual Machine (LLVM) is a compiler infrastructure desi
|
||||
PKG_IS_ADDON="no"
|
||||
PKG_AUTORECONF="no"
|
||||
|
||||
# package specific configure options
|
||||
PKG_CONFIGURE_OPTS_HOST="--disable-polly \
|
||||
--disable-libcpp \
|
||||
--disable-cxx11 \
|
||||
--disable-split-dwarf \
|
||||
--disable-clang-arcmt \
|
||||
--disable-clang-static-analyzer \
|
||||
--disable-clang-rewriter \
|
||||
--disable-zlib \
|
||||
--disable-assertions \
|
||||
--disable-werror \
|
||||
--disable-terminfo \
|
||||
--enable-optimized \
|
||||
--disable-debug-runtime \
|
||||
--disable-debug-symbols \
|
||||
--enable-keep-symbols \
|
||||
--enable-targets=r600"
|
||||
|
||||
PKG_CONFIGURE_OPTS_TARGET="--enable-polly \
|
||||
--disable-libcpp \
|
||||
--disable-cxx11 \
|
||||
--disable-split-dwarf \
|
||||
--disable-clang-arcmt \
|
||||
--disable-clang-static-analyzer \
|
||||
--disable-clang-rewriter \
|
||||
--enable-optimized \
|
||||
--disable-profiling \
|
||||
--disable-assertions \
|
||||
--disable-werror \
|
||||
--disable-terminfo \
|
||||
--disable-expensive-checks \
|
||||
--disable-debug-runtime \
|
||||
--disable-debug-symbols \
|
||||
--enable-keep-symbols \
|
||||
--enable-jit \
|
||||
--disable-docs \
|
||||
--disable-doxygen \
|
||||
--enable-threads \
|
||||
--enable-pthreads \
|
||||
--enable-zlib \
|
||||
--enable-pic \
|
||||
--enable-shared \
|
||||
--enable-embed-stdcxx \
|
||||
--enable-timestamps \
|
||||
--disable-backtraces \
|
||||
--disable-libffi \
|
||||
--disable-ltdl-install"
|
||||
|
||||
if [ "$TARGET_ARCH" = x86_64 ]; then
|
||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-targets=x86_64,r600"
|
||||
elif [ "$TARGET_ARCH" = arm ]; then
|
||||
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-targets=arm"
|
||||
fi
|
||||
|
||||
PKG_MAKE_OPTS_HOST="BUILD_DIRS_ONLY=1 CFLAGS= CXXFLAGS="
|
||||
|
||||
pre_configure_host() {
|
||||
( cd ../autoconf
|
||||
aclocal --force --verbose -I m4
|
||||
autoconf --force --verbose -I m4 -o ../configure
|
||||
)
|
||||
|
||||
# we are building hosttools inside the target builddir
|
||||
mkdir -p ../.$TARGET_NAME && cd ../.$TARGET_NAME/
|
||||
rm -rf ../.$HOST_NAME
|
||||
mkdir -p BuildTools && cd BuildTools
|
||||
configure_target() {
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_CONF \
|
||||
-DCMAKE_PREFIX_PATH=$SYSROOT_PREFIX/usr \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_FLAGS="$CFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
|
||||
-DLLVM_INCLUDE_TOOLS=ON \
|
||||
-DLLVM_BUILD_TOOLS=OFF \
|
||||
-DLLVM_BUILD_UTILS=OFF \
|
||||
-DLLVM_BUILD_EXAMPLES=OFF \
|
||||
-DLLVM_INCLUDE_EXAMPLES=OFF \
|
||||
-DLLVM_BUILD_TESTS=OFF \
|
||||
-DLLVM_INCLUDE_TESTS=OFF \
|
||||
-DLLVM_INCLUDE_GO_TESTS=OFF \
|
||||
-DLLVM_BUILD_DOCS=OFF \
|
||||
-DLLVM_INCLUDE_DOCS=OFF \
|
||||
-DLLVM_ENABLE_DOXYGEN=OFF \
|
||||
-DLLVM_ENABLE_SPHINX=OFF \
|
||||
-DLLVM_TARGETS_TO_BUILD="AMDGPU" \
|
||||
-DLLVM_ENABLE_TERMINFO=OFF \
|
||||
-DLLVM_ENABLE_ASSERTIONS=OFF \
|
||||
-DLLVM_ENABLE_WERROR=OFF \
|
||||
-DLLVM_TARGET_ARCH="$TARGET_ARCH" \
|
||||
-DLLVM_ENABLE_ZLIB=ON \
|
||||
-DLLVM_BUILD_LLVM_DYLIB=OFF \
|
||||
-DLLVM_LINK_LLVM_DYLIB=OFF \
|
||||
..
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
export CFLAGS="$CFLAGS -fPIC"
|
||||
export CXXFLAGS="$CXXFLAGS -fPIC"
|
||||
}
|
||||
|
||||
makeinstall_host() {
|
||||
# nothing to install here
|
||||
:
|
||||
post_make_target() {
|
||||
make -C $ROOT/$PKG_BUILD/.$TARGET_NAME/ llvm-config
|
||||
}
|
||||
|
||||
post_makeinstall_target() {
|
||||
cp -a $ROOT/$PKG_BUILD/.$TARGET_NAME/bin/llvm-config $SYSROOT_PREFIX/usr/bin
|
||||
|
||||
rm -rf $INSTALL/usr/bin
|
||||
rm -rf $INSTALL/usr/lib/BugpointPasses.so
|
||||
rm -rf $INSTALL/usr/lib/LLVMHello.so
|
||||
rm -rf $INSTALL/usr/lib/libLTO.so
|
||||
rm -rf $INSTALL/usr/lib/libprofile_rt.so
|
||||
rm -rf $INSTALL/usr/lib
|
||||
}
|
||||
|
@ -0,0 +1,58 @@
|
||||
diff -Naur a/cmake/config-ix.cmake b/cmake/config-ix.cmake
|
||||
--- a/cmake/config-ix.cmake 2016-06-21 12:34:40.000000000 -0700
|
||||
+++ b/cmake/config-ix.cmake 2016-09-03 13:00:34.362142473 -0700
|
||||
@@ -525,23 +525,7 @@
|
||||
endif()
|
||||
|
||||
set(LLVM_BINDINGS "")
|
||||
-if(WIN32)
|
||||
- message(STATUS "Go bindings disabled.")
|
||||
-else()
|
||||
- find_program(GO_EXECUTABLE NAMES go DOC "go executable")
|
||||
- if(GO_EXECUTABLE STREQUAL "GO_EXECUTABLE-NOTFOUND")
|
||||
- message(STATUS "Go bindings disabled.")
|
||||
- else()
|
||||
- execute_process(COMMAND ${GO_EXECUTABLE} run ${PROJECT_SOURCE_DIR}/bindings/go/conftest.go
|
||||
- RESULT_VARIABLE GO_CONFTEST)
|
||||
- if(GO_CONFTEST STREQUAL "0")
|
||||
- set(LLVM_BINDINGS "${LLVM_BINDINGS} go")
|
||||
- message(STATUS "Go bindings enabled.")
|
||||
- else()
|
||||
- message(STATUS "Go bindings disabled, need at least Go 1.2.")
|
||||
- endif()
|
||||
- endif()
|
||||
-endif()
|
||||
+message(STATUS "Go bindings disabled.")
|
||||
|
||||
find_program(GOLD_EXECUTABLE NAMES ${LLVM_DEFAULT_TARGET_TRIPLE}-ld.gold ld.gold ${LLVM_DEFAULT_TARGET_TRIPLE}-ld ld DOC "The gold linker")
|
||||
set(LLVM_BINUTILS_INCDIR "" CACHE PATH
|
||||
@@ -551,28 +535,6 @@
|
||||
find_program(LD64_EXECUTABLE NAMES ld DOC "The ld64 linker")
|
||||
endif()
|
||||
|
||||
-include(FindOCaml)
|
||||
-include(AddOCaml)
|
||||
-if(WIN32)
|
||||
- message(STATUS "OCaml bindings disabled.")
|
||||
-else()
|
||||
- find_package(OCaml)
|
||||
- if( NOT OCAML_FOUND )
|
||||
- message(STATUS "OCaml bindings disabled.")
|
||||
- else()
|
||||
- if( OCAML_VERSION VERSION_LESS "4.00.0" )
|
||||
- message(STATUS "OCaml bindings disabled, need OCaml >=4.00.0.")
|
||||
- else()
|
||||
- find_ocamlfind_package(ctypes VERSION 0.4 OPTIONAL)
|
||||
- if( HAVE_OCAML_CTYPES )
|
||||
- message(STATUS "OCaml bindings enabled.")
|
||||
- find_ocamlfind_package(oUnit VERSION 2 OPTIONAL)
|
||||
- set(LLVM_BINDINGS "${LLVM_BINDINGS} ocaml")
|
||||
- else()
|
||||
- message(STATUS "OCaml bindings disabled, need ctypes >=0.4.")
|
||||
- endif()
|
||||
- endif()
|
||||
- endif()
|
||||
-endif()
|
||||
+message(STATUS "OCaml bindings disabled.")
|
||||
|
||||
string(REPLACE " " ";" LLVM_BINDINGS_LIST "${LLVM_BINDINGS}")
|
@ -1,98 +0,0 @@
|
||||
diff -Naur llvm-3.5.0.src/autoconf/configure.ac llvm-3.5.0.src.patch/autoconf/configure.ac
|
||||
--- llvm-3.5.0.src/autoconf/configure.ac 2014-07-25 19:47:30.000000000 +0200
|
||||
+++ llvm-3.5.0.src.patch/autoconf/configure.ac 2014-09-05 10:42:58.947215468 +0200
|
||||
@@ -485,6 +485,10 @@
|
||||
AC_CHECK_PROG(BUILD_CXX, c++, c++, , , /usr/ucb/c++)
|
||||
fi
|
||||
fi
|
||||
+ AC_SUBST(BUILD_CPPFLAGS)
|
||||
+ AC_SUBST(BUILD_CFLAGS)
|
||||
+ AC_SUBST(BUILD_CXXFLAGS)
|
||||
+ AC_SUBST(BUILD_LDFLAGS)
|
||||
else
|
||||
AC_SUBST(LLVM_CROSS_COMPILING, [0])
|
||||
fi
|
||||
diff -Naur llvm-3.5.0.src/autoconf/m4/build_exeext.m4 llvm-3.5.0.src.patch/autoconf/m4/build_exeext.m4
|
||||
--- llvm-3.5.0.src/autoconf/m4/build_exeext.m4 2008-09-26 19:27:58.000000000 +0200
|
||||
+++ llvm-3.5.0.src.patch/autoconf/m4/build_exeext.m4 2014-09-05 10:42:58.948215478 +0200
|
||||
@@ -18,7 +18,7 @@
|
||||
fi
|
||||
fi
|
||||
test -z "$BUILD_CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
|
||||
- ac_build_link='${BUILD_CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD'
|
||||
+ ac_build_link='${BUILD_CC-cc} -o conftest $BUILD_CFLAGS $BUILD_CPPFLAGS $BUILD_LDFLAGS conftest.$ac_ext $LIBS 1>&AS_MESSAGE_LOG_FD'
|
||||
rm -f conftest*
|
||||
echo 'int main () { return 0; }' > conftest.$ac_ext
|
||||
ac_cv_build_exeext=
|
||||
diff -Naur llvm-3.5.0.src/Makefile llvm-3.5.0.src.patch/Makefile
|
||||
--- llvm-3.5.0.src/Makefile 2014-03-25 22:45:41.000000000 +0100
|
||||
+++ llvm-3.5.0.src.patch/Makefile 2014-09-05 10:45:20.542528330 +0200
|
||||
@@ -99,54 +99,6 @@
|
||||
DIRS := $(filter-out unittests, $(DIRS))
|
||||
endif
|
||||
|
||||
-# If we're cross-compiling, build the build-hosted tools first
|
||||
-ifeq ($(LLVM_CROSS_COMPILING),1)
|
||||
-all:: cross-compile-build-tools
|
||||
-
|
||||
-clean::
|
||||
- $(Verb) rm -rf BuildTools
|
||||
-
|
||||
-cross-compile-build-tools:
|
||||
- $(Verb) if [ ! -f BuildTools/Makefile ]; then \
|
||||
- $(MKDIR) BuildTools; \
|
||||
- cd BuildTools ; \
|
||||
- unset CFLAGS ; \
|
||||
- unset CXXFLAGS ; \
|
||||
- AR=$(BUILD_AR) ; \
|
||||
- AS=$(BUILD_AS) ; \
|
||||
- LD=$(BUILD_LD) ; \
|
||||
- CC=$(BUILD_CC) ; \
|
||||
- CXX=$(BUILD_CXX) ; \
|
||||
- unset SDKROOT ; \
|
||||
- unset UNIVERSAL_SDK_PATH ; \
|
||||
- configure_opts= ; \
|
||||
- if test "$(ENABLE_LIBCPP)" -ne 0 ; then \
|
||||
- configure_opts="$$configure_opts --enable-libcpp"; \
|
||||
- fi; \
|
||||
- $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \
|
||||
- --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE) \
|
||||
- --disable-polly $$configure_opts; \
|
||||
- cd .. ; \
|
||||
- fi; \
|
||||
- ($(MAKE) -C BuildTools \
|
||||
- BUILD_DIRS_ONLY=1 \
|
||||
- UNIVERSAL= \
|
||||
- UNIVERSAL_SDK_PATH= \
|
||||
- SDKROOT= \
|
||||
- TARGET_NATIVE_ARCH="$(TARGET_NATIVE_ARCH)" \
|
||||
- TARGETS_TO_BUILD="$(TARGETS_TO_BUILD)" \
|
||||
- TARGET_LIBS="$(LIBS)" \
|
||||
- ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \
|
||||
- ENABLE_PROFILING=$(ENABLE_PROFILING) \
|
||||
- ENABLE_COVERAGE=$(ENABLE_COVERAGE) \
|
||||
- DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \
|
||||
- ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \
|
||||
- ENABLE_LIBCPP=$(ENABLE_LIBCPP) \
|
||||
- CFLAGS= \
|
||||
- CXXFLAGS= \
|
||||
- ) || exit 1;
|
||||
-endif
|
||||
-
|
||||
# Include the main makefile machinery.
|
||||
include $(LLVM_SRC_ROOT)/Makefile.rules
|
||||
|
||||
diff -Naur llvm-3.5.0.src/Makefile.config.in llvm-3.5.0.src.patch/Makefile.config.in
|
||||
--- llvm-3.5.0.src/Makefile.config.in 2014-07-16 18:50:34.000000000 +0200
|
||||
+++ llvm-3.5.0.src.patch/Makefile.config.in 2014-09-05 10:42:58.954215572 +0200
|
||||
@@ -135,6 +135,10 @@
|
||||
# call if we're cross-compiling).
|
||||
BUILD_CC=@BUILD_CC@
|
||||
BUILD_CXX=@BUILD_CXX@
|
||||
+BUILD_CPPFLAGS=@BUILD_CPPFLAGS@
|
||||
+BUILD_CFLAGS=@BUILD_CFLAGS@
|
||||
+BUILD_CXXFLAGS=@BUILD_CXXFLAGS@
|
||||
+BUILD_LDFLAGS=@BUILD_LDFLAGS@
|
||||
|
||||
# Triple for configuring build tools when cross-compiling
|
||||
BUILD_TRIPLE=@build@
|
@ -1,36 +0,0 @@
|
||||
diff -Naur llvm-3.5.0.src/Makefile.rules llvm-3.5.0.src.patch/Makefile.rules
|
||||
--- llvm-3.5.0.src/Makefile.rules 2014-06-20 21:00:41.000000000 +0200
|
||||
+++ llvm-3.5.0.src.patch/Makefile.rules 2014-09-05 11:04:20.267554714 +0200
|
||||
@@ -594,16 +594,6 @@
|
||||
endif
|
||||
endif
|
||||
|
||||
-ifdef SHARED_LIBRARY
|
||||
-ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
|
||||
-ifneq ($(HOST_OS),Darwin)
|
||||
- LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
|
||||
-else
|
||||
- LD.Flags += -Wl,-install_name -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
|
||||
-endif
|
||||
-endif
|
||||
-endif
|
||||
-
|
||||
ifdef TOOL_VERBOSE
|
||||
C.Flags += -v
|
||||
CXX.Flags += -v
|
||||
@@ -650,14 +640,7 @@
|
||||
ifndef TOOL_NO_EXPORTS
|
||||
LD.Flags += $(RDYNAMIC)
|
||||
endif
|
||||
- ifneq ($(HOST_OS), Darwin)
|
||||
- ifdef TOOLNAME
|
||||
- LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
|
||||
- endif
|
||||
- else
|
||||
- ifneq ($(DARWIN_MAJVERS),4)
|
||||
- LD.Flags += $(RPATH) -Wl,@executable_path/../lib
|
||||
- endif
|
||||
+ ifeq ($(HOST_OS), Darwin)
|
||||
ifeq ($(RC_XBS),YES)
|
||||
TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/llvm-lto.XXXXXX)
|
||||
LD.Flags += -Wl,-object_path_lto -Wl,$(TempFile)
|
Loading…
x
Reference in New Issue
Block a user