Add an abuild command line option for -fno-stack-protect for toolchains that might require it.
Signed-off-by: Marc Jones <marc.jones@amd.com> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3623 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
336935c378
commit
dc65196f8f
|
@ -43,6 +43,9 @@ mode=text
|
||||||
# this is disabled per default but can be enabled with -s
|
# this is disabled per default but can be enabled with -s
|
||||||
silent=
|
silent=
|
||||||
|
|
||||||
|
# stackprotect mode enabled by -ns option.
|
||||||
|
stackprotect=false
|
||||||
|
|
||||||
ARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
|
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/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
|
||||||
-e "s/Power Macintosh/ppc/"`
|
-e "s/Power Macintosh/ppc/"`
|
||||||
|
@ -322,6 +325,11 @@ function build_target
|
||||||
CC='$(CROSS_COMPILE)gcc'
|
CC='$(CROSS_COMPILE)gcc'
|
||||||
CROSS_COMPILE=''
|
CROSS_COMPILE=''
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$stackprotect" = "true" ]; then
|
||||||
|
CC="$CC -fno-stack-protector"
|
||||||
|
fi
|
||||||
|
|
||||||
HOSTCC='gcc'
|
HOSTCC='gcc'
|
||||||
|
|
||||||
printf "Processing mainboard/$VENDOR/$MAINBOARD"
|
printf "Processing mainboard/$VENDOR/$MAINBOARD"
|
||||||
|
@ -468,6 +476,7 @@ function myhelp
|
||||||
printf " [-T|--test] submit image(s) to automated test system\n"
|
printf " [-T|--test] submit image(s) to automated test system\n"
|
||||||
printf " [-c|--cpus <numcpus>] build on <numcpus> at the same time\n"
|
printf " [-c|--cpus <numcpus>] build on <numcpus> at the same time\n"
|
||||||
printf " [-s|--silent] omit compiler calls in logs\n"
|
printf " [-s|--silent] omit compiler calls in logs\n"
|
||||||
|
printf " [-ns|--nostackprotect] use gcc -fno-stack-protector option\n"
|
||||||
printf " [lbroot] absolute path to coreboot sources\n"
|
printf " [lbroot] absolute path to coreboot sources\n"
|
||||||
printf " (defaults to $LBROOT)\n\n"
|
printf " (defaults to $LBROOT)\n\n"
|
||||||
}
|
}
|
||||||
|
@ -524,6 +533,7 @@ while true ; do
|
||||||
-T|--test) shift; hwtest=true;;
|
-T|--test) shift; hwtest=true;;
|
||||||
-c|--cpus) shift; cpus="$1"; test "$cpus" == "max" && cpus=""; shift;;
|
-c|--cpus) shift; cpus="$1"; test "$cpus" == "max" && cpus=""; shift;;
|
||||||
-s|--silent) shift; silent="-s";;
|
-s|--silent) shift; silent="-s";;
|
||||||
|
-ns|--nostackprotect) shift; stackprotect=true;;
|
||||||
--) shift; break;;
|
--) shift; break;;
|
||||||
-*) printf "Invalid option\n\n"; myhelp; exit 1;;
|
-*) printf "Invalid option\n\n"; myhelp; exit 1;;
|
||||||
*) break;;
|
*) break;;
|
||||||
|
|
Loading…
Reference in New Issue