Talk:Libgcc without red zone: Difference between revisions

(note that CFLAGS_FOR_TARGET is the supported method)
 
Line 3:
 
Given that a <code>x86_64-pc-elf</code> GCC is mostly useless for userland programming (without -mno-red-zone), shouldn't it just be built with <code>CFLAGS_FOR_TARGET=-mno-red-zone</code>? See this gcc-help posting: [https://gcc.gnu.org/ml/gcc-help/2011-07/msg00158.html]. Also, it'd be interesting to know how this is achieved in Linux, *BSD, &c. kernels that are built with a conventional userland compiler and don't have (?) a special libgcc.
 
 
Thank's for bringing the topic up.
I tried <code>CFLAGS_FOR_TARGET</code> (as that flag is documented by gcc) but it's silently ignored when building the <code>crtbegin</code> and <code>crtend</code> objects.
Trust me with this. It took about three days to figure out a clean way to get the <code>-mno-redzone</code> to apply to these files. We also had lots of discussion on that topic in #osdev.
--[[User:Shirk|Shirk]] 12:00, 23 October 2014 (CDT)
Anonymous user