[coreboot-gerrit] Patch set updated for coreboot: b86fb23 buildgcc: Reorder main program

Stefan Reinauer (stefan.reinauer@coreboot.org) gerrit at coreboot.org
Tue Jun 9 23:55:04 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/10490

-gerrit

commit b86fb23a99325de11291afad21e5d8ee582cd7f5
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Tue Jun 9 14:52:22 2015 -0700

    buildgcc: Reorder main program
    
    This groups all tasks happening in the main program,
    orders them according to their dependencies and adds
    comments on the various tasks.
    
    Change-Id: Ib62bd213977cbc3307ef62e9a7e64515563968c1
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
 util/crossgcc/buildgcc | 60 ++++++++++++++++++++++++++++++--------------------
 1 file changed, 36 insertions(+), 24 deletions(-)

diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index ca2e089..83b9d82 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -530,17 +530,15 @@ case "$TARGETARCH" in
 	*)		printf "${red}WARNING: Unsupported architecture $TARGETARCH.${NC}\n\n"; ;;
 esac
 
+# Figure out which packages to build
+
 if [ "$BUILDCLANG" -eq 0 ]; then
-echo "Target architecture is now $TARGETARCH"
-NAME="${TARGETARCH} cross"
-PACKAGES="GMP MPFR MPC LIBELF BINUTILS GCC IASL"
+	echo "Target architecture is now $TARGETARCH"
+	NAME="${TARGETARCH} cross"
+	PACKAGES="GMP MPFR MPC LIBELF BINUTILS GCC IASL"
 else
-NAME=clang
-PACKAGES="LLVM CFE CRT CTE"
-fi
-
-if [ "$clean" = "1" ]; then
-	cleanup
+	NAME=clang
+	PACKAGES="LLVM CFE CRT CTE"
 fi
 
 if [ $SKIPGDB -eq 1 ]; then
@@ -556,23 +554,13 @@ else
 	PACKAGES="$PACKAGES GDB"
 fi
 
-# coreboot does not like the GOLD linker
-# USE_GOLD="--enable-gold"
-USE_GOLD=""
-GCC_OPTIONS="--enable-lto"
+# This initial cleanup is useful when updating the toolchain script.
 
-printf "Downloading tar balls ... \n"
-mkdir -p tarballs
-for P in $PACKAGES; do
-	download $P
-done
-printf "Downloaded tar balls ... ${green}ok${NC}\n"
+if [ "$clean" = "1" ]; then
+	cleanup
+fi
 
-printf "Unpacking and patching ... \n"
-for P in $PACKAGES; do
-	unpack_and_patch $P || exit 1
-done
-printf "Unpacked and patched ... ${green}ok${NC}\n"
+# Set up host compiler and flags needed for various OSes
 
 if [[ "$PACKAGES" == *GCC* ]]; then
 CC=cc
@@ -603,12 +591,36 @@ if [ "$USECCACHE" = 1 ]; then
 	CC="ccache $CC"
 fi
 
+# coreboot does not like the GOLD linker
+# USE_GOLD="--enable-gold"
+USE_GOLD=""
+GCC_OPTIONS="--enable-lto"
+
+# Prepare target directory for building GCC
+# (dependencies must be in the PATH)
 mkdir -p $DESTDIR$TARGETDIR/bin
 export PATH=$DESTDIR$TARGETDIR/bin:$PATH
 
+# Download, unpack, patch and build all packages
+
+printf "Downloading tar balls ... \n"
+mkdir -p tarballs
+for P in $PACKAGES; do
+	download $P
+done
+printf "Downloaded tar balls ... ${green}ok${NC}\n"
+
+printf "Unpacking and patching ... \n"
+for P in $PACKAGES; do
+	unpack_and_patch $P || exit 1
+done
+printf "Unpacked and patched ... ${green}ok${NC}\n"
+
+printf "Building packages ... \n"
 for package in $PACKAGES; do
 	build $package
 done
+printf "Packages built ... ${green}ok${NC}\n"
 
 # Adding git information of current tree to target directory
 # for reproducibility



More information about the coreboot-gerrit mailing list