• Alessandro Rubini's avatar
    Makefiles: fix bare builds under newer compilers · 35d1e583
    Alessandro Rubini authored
    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's avatarAlessandro Rubini <rubini@gnudd.com>
    35d1e583
Makefile 2.33 KB