Felix Singer has submitted this change. ( 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80732 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Singer service+coreboot-gerrit@felixsinger.de --- M util/crossgcc/buildgcc A util/crossgcc/sum/libunwind-17.0.6.src.tar.xz.cksum A util/crossgcc/sum/lld-17.0.6.src.tar.xz.cksum 3 files changed, 16 insertions(+), 5 deletions(-)
Approvals: Felix Singer: Looks good to me, approved build bot (Jenkins): Verified
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index 9470fe3..0a0462e 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 -nsf "$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" \ @@ -886,7 +895,7 @@ $MAKE $JOBS || touch .failed $MAKE install || touch .failed
- rm -f ../llvm ../clang ../clang-tools-extra ../compiler-rt ../cmake + rm -f ../llvm ../clang ../clang-tools-extra ../compiler-rt ../cmake ../lld ../libunwind
cp -a ../$CLANG_DIR/tools/scan-build/* "$DESTDIR$TARGETDIR/bin" cp -a ../$CLANG_DIR/tools/scan-view/* "$DESTDIR$TARGETDIR/bin" @@ -1023,7 +1032,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) diff --git a/util/crossgcc/sum/libunwind-17.0.6.src.tar.xz.cksum b/util/crossgcc/sum/libunwind-17.0.6.src.tar.xz.cksum new file mode 100644 index 0000000..e54b574 --- /dev/null +++ b/util/crossgcc/sum/libunwind-17.0.6.src.tar.xz.cksum @@ -0,0 +1 @@ +336b82602ec25a02bb987f44bd5ed990cb4c7f4a tarballs/libunwind-17.0.6.src.tar.xz diff --git a/util/crossgcc/sum/lld-17.0.6.src.tar.xz.cksum b/util/crossgcc/sum/lld-17.0.6.src.tar.xz.cksum new file mode 100644 index 0000000..0979dbd --- /dev/null +++ b/util/crossgcc/sum/lld-17.0.6.src.tar.xz.cksum @@ -0,0 +1 @@ +abe5d45ebea2b9994a5e6ed31268a2114f4fa14f tarballs/lld-17.0.6.src.tar.xz