2003-01-05 Yoshinori K. Okuji <okuji@enbug.org>

* configure.in (CFLAGS): When the default CFLAGS is used,
	eliminate -O2 and -g from CFLAGS, because Autoconf may
	automatically set CFLAGS to them.
This commit is contained in:
okuji 2003-01-04 23:22:42 +00:00
parent 53673d9532
commit e60b85f661
4 changed files with 13 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2003-01-05 Yoshinori K. Okuji <okuji@enbug.org>
* configure.in (CFLAGS): When the default CFLAGS is used,
eliminate -O2 and -g from CFLAGS, because Autoconf may
automatically set CFLAGS to them.
2003-01-02 Yoshinori K. Okuji <okuji@enbug.org> 2003-01-02 Yoshinori K. Okuji <okuji@enbug.org>
From Jeremy Katz: From Jeremy Katz:

3
configure vendored
View file

@ -2917,7 +2917,8 @@ fi
# optimization flags # optimization flags
if test "x$ac_cv_c_compiler_gnu" = xyes; then if test "x$ac_cv_c_compiler_gnu" = xyes; then
if test "x$default_CFLAGS" = xyes; then if test "x$default_CFLAGS" = xyes; then
CFLAGS="$CFLAGS -g" # Autoconf may set CFLAGS to -O2 and/or -g. So eliminate them.
CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[0-9]/g'` -g"
# If the user specify the directory for binutils, add the option `-B'. # If the user specify the directory for binutils, add the option `-B'.
if test "x$with_binutils" != x; then if test "x$with_binutils" != x; then
CFLAGS="-B$with_binutils/ $CFLAGS" CFLAGS="-B$with_binutils/ $CFLAGS"

View file

@ -77,7 +77,8 @@ fi
# optimization flags # optimization flags
if test "x$ac_cv_prog_gcc" = xyes; then if test "x$ac_cv_prog_gcc" = xyes; then
if test "x$default_CFLAGS" = xyes; then if test "x$default_CFLAGS" = xyes; then
CFLAGS="$CFLAGS -g" # Autoconf may set CFLAGS to -O2 and/or -g. So eliminate them.
CFLAGS="`echo $CFLAGS | sed -e 's/-g//g' -e 's/-O[[0-9]]/g'` -g"
# If the user specify the directory for binutils, add the option `-B'. # If the user specify the directory for binutils, add the option `-B'.
if test "x$with_binutils" != x; then if test "x$with_binutils" != x; then
CFLAGS="-B$with_binutils/ $CFLAGS" CFLAGS="-B$with_binutils/ $CFLAGS"

View file

@ -224,6 +224,9 @@ fat_read (char *buf, int len)
else if (FAT_SUPER->fat_size == 4) else if (FAT_SUPER->fat_size == 4)
next_cluster &= 0xFFFF; next_cluster &= 0xFFFF;
grub_printf ("%s:%d: next_cluster=%d\n",
__FILE__, __LINE__, next_cluster);
if (next_cluster >= FAT_SUPER->clust_eof_marker) if (next_cluster >= FAT_SUPER->clust_eof_marker)
return ret; return ret;
if (next_cluster < 2 || next_cluster >= FAT_SUPER->num_clust) if (next_cluster < 2 || next_cluster >= FAT_SUPER->num_clust)