* configure.ac: Don't add -Wcast-align on x86.

This commit is contained in:
Vladimir Serbinenko 2013-11-07 03:35:25 +01:00
parent cdc17f60dc
commit c12936c5d1
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2013-11-07 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Don't add -Wcast-align on x86.
2013-11-07 Vladimir Serbinenko <phcoder@gmail.com> 2013-11-07 Vladimir Serbinenko <phcoder@gmail.com>
* configure.ac: Add -freg-struct-return on all platforms that * configure.ac: Add -freg-struct-return on all platforms that

View file

@ -471,11 +471,15 @@ AC_SUBST(TARGET_NMFLAGS_MINUS_P)
AC_SUBST(TARGET_NMFLAGS_DEFINED_ONLY) AC_SUBST(TARGET_NMFLAGS_DEFINED_ONLY)
# debug flags. # debug flags.
WARN_FLAGS="-Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign" WARN_FLAGS="-Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Wattributes -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign"
HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS" HOST_CFLAGS="$HOST_CFLAGS $WARN_FLAGS -Wcast-align"
TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations" TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g" TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
if test "x$target_cpu" != xi386 && test "x$target_cpu" != xx86_64; then
TARGET_CFLAGS="$TARGET_CFLAGS -Wcast-align"
fi
# Force no alignment to save space on i386. # Force no alignment to save space on i386.
if test "x$target_cpu" = xi386; then if test "x$target_cpu" = xi386; then
AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [ AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [