diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2008-01-11 18:23:47 +0000 |
---|---|---|
committer | Jordan Crouse <jordan.crouse@amd.com> | 2008-01-11 18:23:47 +0000 |
commit | 23b00b8909bb30ef57cabc3c0915d6f7129467df (patch) | |
tree | bd6867d94d1e5e2c71ff7e17303751e49b54c4c0 | |
parent | 6322baa50c96c5ce24c3f1b9b072fb7451fd5967 (diff) |
Add the ability to extend CFLAGS as needed for several new distros
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
Acked-by: Jordan Crouse <jordan.crouse@amd.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3046 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
-rwxr-xr-x | targets/buildtarget | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/targets/buildtarget b/targets/buildtarget index b9447dbdb0..7fce1e1497 100755 --- a/targets/buildtarget +++ b/targets/buildtarget @@ -53,4 +53,25 @@ fi export PYTHONPATH=$config_dir $PYTHON $config_py $config_lb $lbpath +# now start checking for distro-specific breakage. +## This check is for the no stack protector mess. +EXTRA_CFLAGS= + +if [ -z "$CC" ]; then + CC=gcc +fi + +$CC -fno-stack-protector -S -xc /dev/null -o .$$.tmp + +if [ $? -eq 0 ]; then + EXTRA_CFLAGS=-fno-stack-protector +fi + +rm -rf .$$.tmp + +for i in $build_dir/Makefile.settings $build_dir/*/Makefile.settings +do + echo CFLAGS+=$EXTRA_CFLAGS >>$i +done + exit $? |