Hello!

"make check" fails in the latest CVS version.  ufs2_stage1_5 is longer
than 7168 bytes (it's 7348 bytes for me).  I'm using Debian unstable with
gcc 3.3.3.  I believe new versions of gcc optimize primarily for speed
regardless of flags.

I used the unrefglobals script to find unreferenced functions:
http://savannah.gnu.org/cgi-bin/viewcvs/mc/mc/maint/unrefglobals.pl?rev=HEAD&content-type=text/plain

The functions disabled in this patch are not everything that can be done
to reduce the size of the stage 1.5 binaries, but their elimination is
enough to make ufs2_stage1_5 7124 bytes long, slightly below the limit.

ChangeLog:

        * stage2/char_io.c (safe_parse_maxint): Disable for stage 1.5.
        (grub_tolower): Disable for stage 1.5 except fat_stage1_5.
        (grub_memcmp): Disable for stage 1.5 except iso9660_stage1_5.

-- 
Regards,
Pavel Roskin
--- stage2/char_io.c
+++ stage2/char_io.c
@@ -842,7 +842,6 @@ get_cmdline (char *prompt, char *cmdline
   setcursor (old_cursor);
   return ret;
 }
-#endif /* STAGE1_5 */
 
 int
 safe_parse_maxint (char **str_ptr, int *myint_ptr)
@@ -897,7 +896,9 @@ safe_parse_maxint (char **str_ptr, int *
 
   return 1;
 }
+#endif /* STAGE1_5 */
 
+#if !defined(STAGE1_5) || defined(FSYS_FAT)
 int
 grub_tolower (int c)
 {
@@ -906,6 +907,7 @@ grub_tolower (int c)
 
   return c;
 }
+#endif /* ! STAGE1_5 || FSYS_FAT */
 
 int
 grub_isspace (int c)
@@ -916,6 +918,7 @@ grub_isspace (int c)
   return 0;
 }
 
+#if !defined(STAGE1_5) || defined(FSYS_ISO9660)
 int
 grub_memcmp (const char *s1, const char *s2, int n)
 {
@@ -932,6 +935,7 @@ grub_memcmp (const char *s1, const char 
 
   return 0;
 }
+#endif /* ! STAGE1_5 || FSYS_ISO9660 */
 
 #ifndef STAGE1_5
 int
_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub

Reply via email to