summaryrefslogtreecommitdiff
path: root/payloads/libpayload/bin/lpgcc
diff options
context:
space:
mode:
authorMarc Jones <marc.jones@se-eng.com>2012-11-30 16:22:51 -0700
committerRonald G. Minnich <rminnich@gmail.com>2012-12-08 06:56:34 +0100
commitbb9490a4b0fbc1a46de84708d9c59f5028c194ae (patch)
tree8d971d99559b0e2a7bac2d4cdc4387a86bb68afe /payloads/libpayload/bin/lpgcc
parentda1ef02e904536446f0fb06f024ac1faede39d10 (diff)
downloadcoreboot-bb9490a4b0fbc1a46de84708d9c59f5028c194ae.tar.xz
Clean up libpayload lpgcc and lpas scripts.
lpgcc and lpas are called by payload Makefiles to properly build and link with libpayload. Made lpas use the proper crosscompile AS, as lpgcc does with CC. Added V=1 support to help users debug the build. Fix basename $CC and $AS expansion. Change-Id: Ia4dc8ba53ba7565521a79f1520155f3307b09f85 Signed-off-by: Marc Jones <marc.jones@se-eng.com> Reviewed-on: http://review.coreboot.org/1993 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'payloads/libpayload/bin/lpgcc')
-rwxr-xr-xpayloads/libpayload/bin/lpgcc17
1 files changed, 11 insertions, 6 deletions
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index b102c853f9..241f15707a 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -27,20 +27,26 @@
## SUCH DAMAGE.
# GCC wrapper for libpayload
+if [ -z "${V}" ] && [ "${V}" = 1 ]; then
+ DEBUGME=1
+else
+ DEBUGME=0
+fi
+
+if [ $DEBUGME -eq 1 ]; then
+ echo "CC = $CC"
+fi
+
# let's not recurse.
# This is a hack, I know, but it makes sure that really simple user errors
# don't fork-bomb your machine.
-# echo "CC = $CC"
-
if [ -n "$CC" ]; then
-b=`basename $CC`
+b=`basename "$CC"`
if [ "$b" = "lpgcc" ]; then
CC=""
fi
fi
-
-
if [ "$CC" != "" ]; then
DEFAULT_CC=$CC
else
@@ -62,7 +68,6 @@ trygccoption() {
return $?
}
-DEBUGME=0
DOLINK=1
# This variable will contain the command line that the user wants to