Try this. This patch to buildtarget
1. sets up cpu opt for the no stack protector thing
2. sets up the makefiles for the target
3. the target builds
But it's not picking up CPU_OPT. So we MUST have the other patch that
ALWAYS includes CPU_OPT.

That said, I'd rather make the variable DISTRO_CC_OPT or some such.

Thanks

ron
Index: buildtarget
===================================================================
--- buildtarget	(revision 3012)
+++ buildtarget	(working copy)
@@ -53,4 +53,25 @@
 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.
+CPU_OPT=
+
+if [ -z "$CC" ]; then
+       CC=gcc
+fi
+
+$CC -fno-stack-protector -S -xc /dev/null -o .$$.tmp
+
+if [ $? -eq 0 ]; then
+       CPU_OPT=-fno-stack-protector
+fi
+
+rm -rf .$$.tmp
+
+for i in $build_dir/Makefile.settings $build_dir/*/Makefile.settings
+do
+	echo CPU_OPT=$CPU_OPT >>$i
+done
+
 exit $?
-- 
linuxbios mailing list
linuxbios@linuxbios.org
http://www.linuxbios.org/mailman/listinfo/linuxbios

Reply via email to