Add a command line option for -fno-stack-protect for toolchains that might require it.

Signed-off-by: Marc Jones <marc.jones@amd.com>


Index: coreboot-v2/util/abuild/abuild
===================================================================
--- coreboot-v2.orig/util/abuild/abuild	2008-09-29 16:02:53.000000000 -0600
+++ coreboot-v2/util/abuild/abuild	2008-09-29 16:03:27.000000000 -0600
@@ -43,6 +43,9 @@
 # this is disabled per default but can be enabled with -s
 silent=
 
+# stackprotect mode enabled by -ns option.
+stackprotect=false
+
 ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
 	-e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
 	-e "s/Power Macintosh/ppc/"`
@@ -322,8 +325,13 @@
 		CC='$(CROSS_COMPILE)gcc'
 		CROSS_COMPILE=''
 	fi
- 	HOSTCC='gcc'
+	
+	if  [ "$stackprotect" = "true" ]; then
+		CC="$CC -fno-stack-protector"
+	fi
 
+	HOSTCC='gcc'
+	
 	printf "Processing mainboard/$VENDOR/$MAINBOARD"
 
 	xml "<mainboard>"
@@ -470,6 +478,8 @@
 	printf "    [-s|--silent]                 omit compiler calls in logs\n"
 	printf "    [lbroot]			  absolute path to coreboot sources\n"
 	printf "				  (defaults to $LBROOT)\n\n"
+	printf "    [-ns|--nostackprotect]        use gcc -fno-stack-protector
+option\n"
 }
 
 function myversion 
@@ -524,6 +534,7 @@
 		-T|--test)      shift; hwtest=true;;
 		-c|--cpus)	shift; cpus="$1"; test "$cpus" == "max" && cpus=""; shift;;
 		-s|--silent)    shift; silent="-s";;
+		-ns|--nostackprotect) shift; stackprotect=true;;
 		--)		shift; break;;
 		-*)		printf "Invalid option\n\n"; myhelp; exit 1;;
 		*)		break;;
