Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80737?usp=email )
Change subject: [WIP]util/crossgcc: Build compiler-rt using runtimes ......................................................................
[WIP]util/crossgcc: Build compiler-rt using runtimes
Should we just download the whole LLVM project instead of individual components? It's a 30MB bigger in total...
TODO: Does this add other runtimes like arm? Now I only get x86 ones...
Change-Id: Iacd9b5f1fc1444b3dd1a785b91510f346e7a2f51 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M util/crossgcc/buildgcc 1 file changed, 9 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/80737/1
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index fb2e5ac..ec09cab 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -61,6 +61,7 @@ CTE_ARCHIVE="clang-tools-extra-${CLANG_VERSION}.src.tar.xz" LLVMCMAKE_ARCHIVE="cmake-${CLANG_VERSION}.src.tar.xz" LIBUNWIND_ARCHIVE="libunwind-${CLANG_VERSION}.src.tar.xz" +RUNTIMES_ARCHIVE="runtimes-${CLANG_VERSION}.src.tar.xz" CMAKE_ARCHIVE="cmake-${CMAKE_VERSION}.tar.gz" NASM_ARCHIVE="nasm-${NASM_VERSION}.tar.bz2"
@@ -83,6 +84,7 @@ LLVMCMAKE_BASE_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BCLANG_VER..." LLD_BASE_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BCLANG_VER..." LIBUNWIND_BASE_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BCLANG_VER..." +RUNTIMES_BASE_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BCLANG_VER..." CMAKE_BASE_URL="https://cmake.org/files/v$%7BCMAKE_VERSION%.*%7D" NASM_BASE_URL="https://www.nasm.us/pub/nasm/releasebuilds/$%7BNASM_VERSION%7D"
@@ -90,7 +92,8 @@ $GCC_BASE_URL/$GCC_ARCHIVE $BINUTILS_BASE_URL/$BINUTILS_ARCHIVE $IASL_BASE_URL/$IASL_ARCHIVE \ $LLD_BASE_URL/$LLD_ARCHIVE $LLVM_BASE_URL/$LLVM_ARCHIVE $CLANG_BASE_URL/$CLANG_ARCHIVE \ $LLVMCMAKE_BASE_URL/$LLVMCMAKE_ARCHIVE $CRT_BASE_URL/$CRT_ARCHIVE $CTE_BASE_URL/$CTE_ARCHIVE \ - $LIBUNWIND_BASE_URL/$LIBUNWIND_ARCHIVE $CMAKE_BASE_URL/$CMAKE_ARCHIVE $NASM_BASE_URL/$NASM_ARCHIVE" + $LIBUNWIND_BASE_URL/$LIBUNWIND_ARCHIVE $RUNTIMES_BASE_URL/$RUNTIMES_ARCHIVE \ + $CMAKE_BASE_URL/$CMAKE_ARCHIVE $NASM_BASE_URL/$NASM_ARCHIVE"
# GCC toolchain directories GMP_DIR="gmp-${GMP_VERSION}" @@ -109,6 +112,7 @@ CTE_DIR="clang-tools-extra-${CLANG_VERSION}.src" LLVMCMAKE_DIR="cmake-${CLANG_VERSION}.src" LIBUNWIND_DIR="libunwind-${CLANG_VERSION}.src" +RUNTIMES_DIR="runtimes-${CLANG_VERSION}.src" CMAKE_DIR="cmake-${CMAKE_VERSION}" NASM_DIR="nasm-${NASM_VERSION}"
@@ -880,16 +884,18 @@ ln -nsf "$CRT_DIR" ../compiler-rt ln -nsf "$LLVMCMAKE_DIR" ../cmake ln -nsf "$LIBUNWIND_DIR" ../libunwind + ln -nsf "$RUNTIMES_DIR" ../runtimes
$CMAKE -G "Unix Makefiles" \ -DCMAKE_INSTALL_PREFIX="$DESTDIR$TARGETDIR" \ -DCLANG_VENDOR="coreboot toolchain v$CROSSGCC_VERSION - " \ - -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld" \ + -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" \ -DLLVM_INCLUDE_BENCHMARKS="OFF" \ -DLLVM_INCLUDE_TESTS="OFF" \ -DLLVM_INCLUDE_EXAMPLES="OFF" \ -DCMAKE_BUILD_TYPE=Release \ -DLLVM_TARGETS_TO_BUILD="AArch64;ARM;PowerPC;RISCV;X86" \ + -DLLVM_ENABLE_RUNTIMES="compiler-rt" \ -G Ninja \ ../llvm || touch .failed # shellcheck disable=SC2086 @@ -1033,7 +1039,7 @@ CLANG|clang) NAME="LLVM clang" LLVM_VERSION=${CLANG_VERSION} - PACKAGES="CMAKE LLVM CLANG CRT CTE LLVMCMAKE LLD LIBUNWIND" + PACKAGES="CMAKE LLVM CLANG CRT CTE LLVMCMAKE LLD LIBUNWIND RUNTIMES" CMAKE=${DESTDIR}${TARGETDIR}/bin/cmake ;; IASL|iasl)