]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2009-12-29 Robert Millan <rmh.grub@aybabtu.com>
authorRobert Millan <rmh@aybabtu.com>
Tue, 29 Dec 2009 14:04:18 +0000 (14:04 +0000)
committerRobert Millan <rmh@aybabtu.com>
Tue, 29 Dec 2009 14:04:18 +0000 (14:04 +0000)
* configure.ac: Check for TARGET_CFLAGS initialization before we
initialize it ourselves (sigh).
Move a few modifications to TARGET_CFLAGS to be unconditional
(extra warning flags, loop alignment, i386 CPU extensions, GCC 4.4
eh_frame)

* gettext/gettext.c (grub_gettext_delete_list): Add `void' argument.
* term/i386/pc/at_keyboard.c
(keyboard_controller_wait_untill_ready): Likewise.
(keyboard_controller_led): Rename `led_status' paramter to avoid
name conflict.

ChangeLog
configure.ac
gettext/gettext.c
term/i386/pc/at_keyboard.c

index 38ee89b045efbf3357aa583c694571c6af900cbf..588c035adb8748b3fa4683ed115a53e10d2a0d7b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-12-29  Robert Millan  <rmh.grub@aybabtu.com>
+
+       * configure.ac: Check for TARGET_CFLAGS initialization before we
+       initialize it ourselves (sigh).
+       Move a few modifications to TARGET_CFLAGS to be unconditional
+       (extra warning flags, loop alignment, i386 CPU extensions, GCC 4.4
+       eh_frame)
+
+       * gettext/gettext.c (grub_gettext_delete_list): Add `void' argument.
+       * term/i386/pc/at_keyboard.c
+       (keyboard_controller_wait_untill_ready): Likewise.
+       (keyboard_controller_led): Rename `led_status' paramter to avoid
+       name conflict.
+
 2009-12-28  Carles Pina i Estany  <carles@pina.cat>
 
        * normal/misc.c (grub_normal_print_device_info): Add spaces and double
index 6560d3e317fbda12e4de70f0ba9d758357e287a0..3cac421e8e5d60500881e67cd6a35c0c4d3f5262 100644 (file)
@@ -44,6 +44,11 @@ AC_CANONICAL_TARGET
 # Program name transformations
 AC_ARG_PROGRAM
 
+# Optimization flag.  Allow user to override.
+if test "x$TARGET_CFLAGS" = x; then
+  TARGET_CFLAGS="$TARGET_CFLAGS -Os"
+fi
+
 case "$target_cpu" in
   i[[3456]]86) target_cpu=i386 ;;
   sparc)       target_cpu=sparc64 ;;
@@ -242,60 +247,45 @@ CPPFLAGS="$TARGET_CPPFLAGS"
 LDFLAGS="$TARGET_LDFLAGS"
 LIBS=""
 
-if test "x$TARGET_CFLAGS" = x; then
-  # debug flags.
-  TARGET_CFLAGS="-Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes \
-                 -Wundef -Wstrict-prototypes -g"
+# debug flags.
+TARGET_CFLAGS="$TARGET_CFLAGS -Wall -W -Wshadow -Wpointer-arith -Wmissing-prototypes \
+               -Wundef -Wstrict-prototypes -g"
 
-  # optimization flags.
-  AC_CACHE_CHECK([whether optimization for size works], grub_cv_cc_Os, [
-    CFLAGS=-Os
+# Force no alignment to save space on i386.
+if test "x$target_cpu" = xi386; then
+  AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
+    CFLAGS="$CFLAGS -falign-loops=1"
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
-                     [grub_cv_cc_Os=yes],
-                     [grub_cv_cc_Os=no])
+        [grub_cv_cc_falign_loop=yes],
+       [grub_cv_cc_falign_loop=no])
   ])
-  if test "x$grub_cv_cc_Os" = xyes; then
-    TARGET_CFLAGS="$TARGET_CFLAGS -Os"
-  else
-    TARGET_CFLAGS="$TARGET_CFLAGS -O2 -fno-strength-reduce -fno-unroll-loops"
-  fi
 
-  # Force no alignment to save space on i386.
-  if test "x$target_cpu" = xi386; then
-    AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [
-      CFLAGS="$CFLAGS -falign-loops=1"
-      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
-                       [grub_cv_cc_falign_loop=yes],
-                       [grub_cv_cc_falign_loop=no])
-    ])
-
-    if test "x$grub_cv_cc_falign_loop" = xyes; then
-      TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
-    else
-      TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
-    fi
-
-    # Some toolchains enable these features by default, but they need
-    # registers that aren't set up properly in GRUB.
-    TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
+  if test "x$grub_cv_cc_falign_loop" = xyes; then
+    TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
+  else
+    TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
   fi
 
-  # By default, GCC 4.4 generates .eh_frame sections containing unwind
-  # information in some cases where it previously did not. GRUB doesn't need
-  # these and they just use up vital space. Restore the old compiler
-  # behaviour.
-  AC_CACHE_CHECK([whether -fno-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [
-    SAVE_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm"
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
-                     [grub_cv_cc_fno_dwarf2_cfi_asm=yes],
-                     [grub_cv_cc_fno_dwarf2_cfi_asm=no])
-    CFLAGS="$SAVE_CFLAGS"
-  ])
-
-  if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
-    TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
-  fi
+  # Some toolchains enable these features by default, but they need
+  # registers that aren't set up properly in GRUB.
+  TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-3dnow"
+fi
+
+# By default, GCC 4.4 generates .eh_frame sections containing unwind
+# information in some cases where it previously did not. GRUB doesn't need
+# these and they just use up vital space. Restore the old compiler
+# behaviour.
+AC_CACHE_CHECK([whether -fno-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -fno-dwarf2-cfi-asm"
+  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
+      [grub_cv_cc_fno_dwarf2_cfi_asm=yes],
+      [grub_cv_cc_fno_dwarf2_cfi_asm=no])
+  CFLAGS="$SAVE_CFLAGS"
+])
+
+if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
+  TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
 fi
 
 grub_apple_target_cc
index 3472b2fb8073115e883a58605dec163b1307006f..165feb332036145a09d2deb7063712c93d3996bb 100644 (file)
@@ -298,7 +298,7 @@ grub_gettext_init_ext (const char *lang)
 }
 
 static void
-grub_gettext_delete_list ()
+grub_gettext_delete_list (void)
 {
   struct grub_gettext_msg *item;
 
index a53dbfa2dc82343d4e9e5910783abf212aa1f291..4ad60c65cae56f96af060cd66e5ae1d6c3386acc 100644 (file)
@@ -72,7 +72,7 @@ static char keyboard_map_shift[128] =
 static grub_uint8_t grub_keyboard_controller_orig;
 
 static void
-keyboard_controller_wait_untill_ready ()
+keyboard_controller_wait_untill_ready (void)
 {
   while (! KEYBOARD_COMMAND_ISREADY (grub_inb (KEYBOARD_REG_STATUS)));
 }
@@ -94,12 +94,12 @@ grub_keyboard_controller_read (void)
 }
 
 static void
-keyboard_controller_led (grub_uint8_t led_status)
+keyboard_controller_led (grub_uint8_t leds)
 {
   keyboard_controller_wait_untill_ready ();
   grub_outb (0xed, KEYBOARD_REG_DATA);
   keyboard_controller_wait_untill_ready ();
-  grub_outb (led_status & 0x7, KEYBOARD_REG_DATA);
+  grub_outb (leds & 0x7, KEYBOARD_REG_DATA);
 }
 
 /* FIXME: This should become an interrupt service routine.  For now