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 <stefan.reinauer@coreboot.org>
Reviewed-on: http://review.coreboot.org/10815
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Stefan Reinauer 2015-07-07 00:20:42 +02:00
parent a660bc1921
commit e9e6e3d93c
1 changed files with 7 additions and 0 deletions

View File

@ -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"