summaryrefslogtreecommitdiff
path: root/targets/buildtarget
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2008-01-11 18:23:47 +0000
committerJordan Crouse <jordan.crouse@amd.com>2008-01-11 18:23:47 +0000
commit23b00b8909bb30ef57cabc3c0915d6f7129467df (patch)
treebd6867d94d1e5e2c71ff7e17303751e49b54c4c0 /targets/buildtarget
parent6322baa50c96c5ce24c3f1b9b072fb7451fd5967 (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
Diffstat (limited to 'targets/buildtarget')
-rwxr-xr-xtargets/buildtarget21
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 $?