diff --git a/ChangeLog b/ChangeLog index 7e83dd8d1..b2474813f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-01-05 Yoshinori K. Okuji + + * 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 From Jeremy Katz: diff --git a/configure b/configure index 53b59cd8f..e1c0b1662 100644 --- a/configure +++ b/configure @@ -2917,7 +2917,8 @@ fi # optimization flags if test "x$ac_cv_c_compiler_gnu" = 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 test "x$with_binutils" != x; then CFLAGS="-B$with_binutils/ $CFLAGS" diff --git a/configure.in b/configure.in index 83d1634eb..767f0acc5 100644 --- a/configure.in +++ b/configure.in @@ -77,7 +77,8 @@ fi # optimization flags if test "x$ac_cv_prog_gcc" = 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 test "x$with_binutils" != x; then CFLAGS="-B$with_binutils/ $CFLAGS" diff --git a/stage2/fsys_fat.c b/stage2/fsys_fat.c index 286d4a45f..27eafc29e 100644 --- a/stage2/fsys_fat.c +++ b/stage2/fsys_fat.c @@ -224,6 +224,9 @@ fat_read (char *buf, int len) else if (FAT_SUPER->fat_size == 4) next_cluster &= 0xFFFF; + grub_printf ("%s:%d: next_cluster=%d\n", + __FILE__, __LINE__, next_cluster); + if (next_cluster >= FAT_SUPER->clust_eof_marker) return ret; if (next_cluster < 2 || next_cluster >= FAT_SUPER->num_clust)