check_cflags -Werror=implicit-function-declaration
check_cflags -Werror=missing-prototypes
check_cflags -Werror=return-type
- check_cflags -Werror=declaration-after-statement
check_cflags -Werror=vla
- check_cflags -Werror=format-security
+ check_cflags -Wformat
check_cflags -fdiagnostics-color=auto
enabled extra_warnings || check_disable_warning -Wno-maybe-uninitialized
+ if enabled x86_32; then
+ case $target_os in
+ *bsd*)
+ # BSDs don't guarantee a 16 byte aligned stack, but we can
+ # request GCC to try to maintain 16 byte alignment throughout
+ # function calls. Library entry points that might call assembly
+ # functions align the stack. (The parameter means 2^4 bytes.)
+ check_cflags -mpreferred-stack-boundary=4
+ ;;
+ esac
+ fi
elif enabled llvm_gcc; then
check_cflags -mllvm -stack-alignment=16
elif enabled clang; then
# enabled, one would also have to either add attribute_align_arg on
# every single entry point into the libraries or enable -mstackrealign
# (doing stack realignment in every single function).
- disable aligned_stack
+ case $target_os in
+ mingw32|win32|*bsd*)
+ disable aligned_stack
+ ;;
+ *)
+ check_cflags -mllvm -stack-alignment=16
++ check_cflags -mstack-alignment=16
+ ;;
+ esac
else
check_cflags -mllvm -stack-alignment=16
+ check_cflags -mstack-alignment=16
fi
check_cflags -Qunused-arguments
check_cflags -Werror=implicit-function-declaration