Attention is currently required from: Martin L Roth.
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80732?usp=email )
Change subject: util/crossgcc: Also build LLVM LD ......................................................................
util/crossgcc: Also build LLVM LD
When doing LTO the clang linker frontend needs to use LLD or gold. Build LLD as that is the configuration that is best tested.
Change-Id: I3242585f8b5c3426fc6568d3dc47300164d56e3a Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M util/crossgcc/buildgcc 1 file changed, 13 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/32/80732/1
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 9c70ed3..230328a 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -54,11 +54,13 @@ BINUTILS_ARCHIVE="binutils-${BINUTILS_VERSION}.tar.xz" IASL_ARCHIVE="${IASL_VERSION}.tar.gz" # CLANG toolchain FILE locations +LLD_ARCHIVE="lld-${CLANG_VERSION}.src.tar.xz" LLVM_ARCHIVE="llvm-${CLANG_VERSION}.src.tar.xz" CLANG_ARCHIVE="clang-${CLANG_VERSION}.src.tar.xz" CRT_ARCHIVE="compiler-rt-${CLANG_VERSION}.src.tar.xz" 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" CMAKE_ARCHIVE="cmake-${CMAKE_VERSION}.tar.gz" NASM_ARCHIVE="nasm-${NASM_VERSION}.tar.bz2"
@@ -79,13 +81,16 @@ CRT_BASE_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BCLANG_VER..." CTE_BASE_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$%7BCLANG_VER..." 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..." CMAKE_BASE_URL="https://cmake.org/files/v$%7BCMAKE_VERSION%.*%7D" NASM_BASE_URL="https://www.nasm.us/pub/nasm/releasebuilds/$%7BNASM_VERSION%7D"
ALL_ARCHIVES="$GMP_BASE_URL/$GMP_ARCHIVE $MPFR_BASE_URL/$MPFR_ARCHIVE $MPC_BASE_URL/$MPC_ARCHIVE \ $GCC_BASE_URL/$GCC_ARCHIVE $BINUTILS_BASE_URL/$BINUTILS_ARCHIVE $IASL_BASE_URL/$IASL_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 $CMAKE_BASE_URL/$CMAKE_ARCHIVE $NASM_BASE_URL/$NASM_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"
# GCC toolchain directories GMP_DIR="gmp-${GMP_VERSION}" @@ -97,11 +102,13 @@ BINUTILS_DIR="binutils-${BINUTILS_VERSION}" IASL_DIR="acpica-${IASL_VERSION}" # CLANG toolchain directories +LLD_DIR="lld-${CLANG_VERSION}.src" LLVM_DIR="llvm-${CLANG_VERSION}.src" CLANG_DIR="clang-${CLANG_VERSION}.src" CRT_DIR="compiler-rt-${CLANG_VERSION}.src" CTE_DIR="clang-tools-extra-${CLANG_VERSION}.src" LLVMCMAKE_DIR="cmake-${CLANG_VERSION}.src" +LIBUNWIND_DIR="libunwind-${CLANG_VERSION}.src" CMAKE_DIR="cmake-${CMAKE_VERSION}" NASM_DIR="nasm-${NASM_VERSION}"
@@ -866,16 +873,18 @@
build_LLVM() {
+ ln -nsf "$LLD_DIR" ../lld ln -nsf "$LLVM_DIR" ../llvm ln -nsf "$CLANG_DIR" ../clang ln -nsf "$CTE_DIR" ../clang-tools-extra ln -nsf "$CRT_DIR" ../compiler-rt ln -nsf "$LLVMCMAKE_DIR" ../cmake + ln -sft "$LIBUNWIND_DIR" ../libunwind
$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" \ + -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt;lld" \ -DLLVM_INCLUDE_BENCHMARKS="OFF" \ -DLLVM_INCLUDE_TESTS="OFF" \ -DLLVM_INCLUDE_EXAMPLES="OFF" \ @@ -1024,7 +1033,7 @@ CLANG|clang) NAME="LLVM clang" LLVM_VERSION=${CLANG_VERSION} - PACKAGES="CMAKE LLVM CLANG CRT CTE LLVMCMAKE" + PACKAGES="CMAKE LLVM CLANG CRT CTE LLVMCMAKE LLD LIBUNWIND" CMAKE=${DESTDIR}${TARGETDIR}/bin/cmake ;; IASL|iasl)