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
This commit is contained in:
parent
6322baa50c
commit
23b00b8909
|
@ -53,4 +53,25 @@ fi
|
||||||
export PYTHONPATH=$config_dir
|
export PYTHONPATH=$config_dir
|
||||||
$PYTHON $config_py $config_lb $lbpath
|
$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 $?
|
exit $?
|
||||||
|
|
Loading…
Reference in New Issue