[coreboot-gerrit] New patch to review for coreboot: buildgcc: work around bug in --print-librt-file-name

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Tue Jul 7 00:55:07 CEST 2015


Stefan Reinauer (stefan.reinauer at coreboot.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10815

-gerrit

commit 425effb8253dd5b87172a3d10713fe36e3f06ffe
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Tue Jul 7 00:20:42 2015 +0200

    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 at coreboot.org>
---
 util/crossgcc/buildgcc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index e0b4ed4..367f4d1 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"



More information about the coreboot-gerrit mailing list