libpayload: Do not include gcclib for mips targets

As opposed to other architectures, on MIPS gcc toolchain provided
gcclib is not always adequate, for instance when the library does not
account for the case when data segment is too large to fit into the
64K GOT.

Let's make sure the library is not included when building for MIPS
targets.

BRANCH=none
BUG=chrome-os-partner:31438
TEST=with the rest of patches applied the FPGA board boots all the way
     to verifying and loading the kernel from the USB stick.

Change-Id: I710d3c49bdc57877152cf28d5bd8cb4fa4d0b9ad
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f8d7d84c81af7e3eee1c8f3304c15069e8701cde
Original-Change-Id: I1a26b9e575a20101329359b80dffc236ef7f9e9f
Original-Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/232231
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/8740
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
diff --git a/payloads/libpayload/bin/lpgcc b/payloads/libpayload/bin/lpgcc
index 90a8b99..47a34f8 100755
--- a/payloads/libpayload/bin/lpgcc
+++ b/payloads/libpayload/bin/lpgcc
@@ -164,7 +164,9 @@
 
     $DEFAULT_CC $_CFLAGS $CMDLINE
 else
-    _LIBGCC=`$DEFAULT_CC $_ARCHEXTRA -print-libgcc-file-name`
+    if [ -z "${CONFIG_LP_ARCH_MIPS}" ]; then
+        _LIBGCC=`$DEFAULT_CC $_ARCHEXTRA -print-libgcc-file-name`
+    fi
     if [ -f $_ARCHLIBDIR/head.o ]; then
 	    HEAD_O=$_ARCHLIBDIR/head.o
     elif [ -f $BASE/../build/head.o ]; then