This patch will enable setting distro variables such as -fno_stack_protector as needed. It is a simple patch to buildtarget and can be extended for other uses.
If this patch is acceptable then we can fix the various makefiles to include the variable.
The only remaining question is the name -- is CPU_OPT really appropriate?
Signed-off-by: Ronald G. Minnich rminnich@gmail.com
---------- Forwarded message ---------- From: ron minnich rminnich@gmail.com Date: Dec 20, 2007 11:24 AM Subject: Re: [LinuxBIOS] Possible stack protect solutions To: Jordan Crouse jordan.crouse@amd.com Cc: linuxbios@linuxbios.org
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
* ron minnich rminnich@gmail.com [080103 17:25]:
This patch will enable setting distro variables such as -fno_stack_protector as needed. It is a simple patch to buildtarget and can be extended for other uses.
If this patch is acceptable then we can fix the various makefiles to include the variable.
The only remaining question is the name -- is CPU_OPT really appropriate?
Why not make it CFLAGS? The C compiler is called CC in our environment, too.
Signed-off-by: Ronald G. Minnich rminnich@gmail.com
Acked-by: Stefan Reinauer stepan@coresystems.de
Stefan
On Jan 3, 2008 9:12 AM, Stefan Reinauer stepan@coresystems.de wrote:
- ron minnich rminnich@gmail.com [080103 17:25]:
This patch will enable setting distro variables such as -fno_stack_protector as needed. It is a simple patch to buildtarget and can be extended for other uses.
If this patch is acceptable then we can fix the various makefiles to include the variable.
The only remaining question is the name -- is CPU_OPT really appropriate?
Why not make it CFLAGS? The C compiler is called CC in our environment, too.
like this?
Tested on FC8 and works fine.
ron
On 03/01/08 09:30 -0800, ron minnich wrote:
On Jan 3, 2008 9:12 AM, Stefan Reinauer stepan@coresystems.de wrote:
- ron minnich rminnich@gmail.com [080103 17:25]:
This patch will enable setting distro variables such as -fno_stack_protector as needed. It is a simple patch to buildtarget and can be extended for other uses.
If this patch is acceptable then we can fix the various makefiles to include the variable.
The only remaining question is the name -- is CPU_OPT really appropriate?
Why not make it CFLAGS? The C compiler is called CC in our environment, too.
like this?
Tested on FC8 and works fine.
Looks good to me.
Jordan
On Thu, Jan 03, 2008 at 09:30:06AM -0800, ron minnich wrote:
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
Index: targets/buildtarget
--- targets/buildtarget (revision 3031) +++ targets/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. +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 $?
On Jan 3, 2008 10:30 AM, ron minnich rminnich@gmail.com wrote:
On Jan 3, 2008 9:12 AM, Stefan Reinauer stepan@coresystems.de wrote:
- ron minnich rminnich@gmail.com [080103 17:25]:
This patch will enable setting distro variables such as -fno_stack_protector as needed. It is a simple patch to buildtarget and can be extended for other uses.
If this patch is acceptable then we can fix the various makefiles to include the variable.
The only remaining question is the name -- is CPU_OPT really appropriate?
Why not make it CFLAGS? The C compiler is called CC in our environment, too.
like this?
Tested on FC8 and works fine.
This patch adds -fno-stack-protector to my FLAGS too, even though I don't need them. It still builds, with or without the patch.
Myles
ron
-- linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios
On Jan 3, 2008 10:30 AM, ron minnich rminnich@gmail.com wrote:
On Jan 3, 2008 9:12 AM, Stefan Reinauer stepan@coresystems.de wrote:
- ron minnich rminnich@gmail.com [080103 17:25]:
This patch will enable setting distro variables such as -fno_stack_protector as needed. It is a simple patch to buildtarget and can be extended for other uses.
If this patch is acceptable then we can fix the various makefiles to include the variable.
The only remaining question is the name -- is CPU_OPT really appropriate?
Why not make it CFLAGS? The C compiler is called CC in our environment, too.
like this?
Tested on FC8 and works fine.
This patch adds -fno-stack-protector to my FLAGS too, even though I don't need them. It still builds, with or without the patch.
Myles
ron
--
linuxbios mailing list linuxbios@linuxbios.org http://www.linuxbios.org/mailman/listinfo/linuxbios