Page 1 of 1

stupid red zone...

Posted: Fri May 04, 2012 1:57 am
by bluemoon
After debugging a whole day for error that my application generating #PF with unallocated/not present memory upon second printf(), I realized that my newlib compilation did not include -Mno-red-zone, which caused all sort of trouble.

So, if anyone plan to play with 64-bit soon, remember to add it to the build configuration.

Code: Select all

> cat build64.sh
#!/bin/sh

mkdir build-x86_64
cd build-x86_64
../src/configure --target=x86_64-elf --prefix=`pwd`/../../../libc/ \
CFLAGS="-mno-red-zone" CPPFLAGS="-mno-red-zone" 

make
make install
cd ..

Re: stupid red zone...

Posted: Fri May 04, 2012 8:59 am
by xenos
...or include "-mno-red-zone" in your Makefile, configure script, configure.ac or whatever config file you use to set your CFLAGS ;)