Makefiles: fix bare builds under newer compilers
While building under ubuntu-12.04 (64 bits, at least), bare builds
were failing because of undefined "__stack_chk_fail" and "__strcpy_chk".
The former is fixed by passing -ffreestanding to the build of pp_printf
(i.e., we now export CFLAGS in the toplevel Makefile), amd the latter
is fixing by preventing use of the inline printf function when building
for bare architectures.
This is from the manpage of gcc under ubuntu-12.04:
NOTE: In Ubuntu 8.10 and later versions, -D_FORTIFY_SOURCE=2 is set
by default, and is activated when -O is set to 2 or higher. This
enables additional compile-time and run-time checks for several
libc functions. To disable, specify either -U_FORTIFY_SOURCE or
-D_FORTIFY_SOURCE=0.
Thanks Aurelio for reporting ./MAKEALL was failing.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Showing
Please
register
or
sign in
to comment