From e9e6e3d93c67c0e5df1b32fe37b1956624503c97 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 7 Jul 2015 00:20:42 +0200 Subject: buildgcc: work around bug in --print-librt-file-name Running "clang -target i386-elf --print-librt-file-name" prints [..]/bin/../lib/clang/3.6.1/lib/libclang_rt.builtins-i386.a However, the correct path is [..]/lib/linux/libclang_rt.builtins-i386.a on a Linux host. Hence, create symbolic links to make sure that our build system finds the file where it expects it. Change-Id: I21ef5c4a690d83c326717ca55c5ace558257a0ec Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/10815 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- util/crossgcc/buildgcc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc index e0b4ed40eb..367f4d19ee 100755 --- a/util/crossgcc/buildgcc +++ b/util/crossgcc/buildgcc @@ -480,6 +480,13 @@ build_LLVM() { cp -a ../$CFE_DIR/tools/scan-build/* $DESTDIR$TARGETDIR/bin cp -a ../$CFE_DIR/tools/scan-view/* $DESTDIR$TARGETDIR/bin + + # create symlinks to work around broken --print-librt-file-name + # when used with -target. + cd $DESTDIR$TARGETDIR/lib/clang/${CLANG_VERSION}/lib + for i in */libclang_rt.builtins*.a; do + ln -s $i . + done } printf "${blue}Welcome to the ${red}coreboot${blue} cross toolchain builder v$CROSSGCC_VERSION ($CROSSGCC_DATE)${NC}\n\n" -- cgit v1.2.3