Hello!

> > CFLAGS could be "-Os" unless overridden by user.
> 
>   This option cannot be found in gcc-2.7.2.3, so it would be a good
> idea to check if gcc can accept this option and set it only if
> possible.

What a shame :-(
I should have thought about it.

Corrected patch attached.

ChangeLog:
        * configure.in: set CFLAGS to "-Os -g" for compilers
        which understand "-Os" if CFLAGS is not already set.
        Use "-O2 -fno-strength-reduce -fno-unroll-loops -g"
        for older gcc versions.

Pavel Roskin
Index: configure.in
===================================================================
RCS file: /gd/gnu/anoncvsroot/grub/configure.in,v
retrieving revision 1.10
diff -r1.10 configure.in
45a46,50
> # This should be checked before AC_PROG_CC
> if test x"$CFLAGS" = x; then
>   default_CFLAGS=yes
> fi
> 
55a61,74
> 
> if test x"$ac_cv_prog_gcc" = xyes; then
>   if test x"$default_CFLAGS" = xyes; then
>     AC_CACHE_CHECK([whether optimization for size works], size_flag, [
>       CFLAGS="-Os -g"
>       AC_TRY_COMPILE(, , size_flag=yes, size_flag=no)
>     ])
>     if test x"$size_flag" = xyes; then
>       CFLAGS="-Os -g"
>     else
>       CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops -g"
>     fi
>   fi
> fi

Reply via email to