A recent trunk commit (r2213) prevents me from building grub2 (Debian Lenny amd64): here's my fix. I have no idea what the end result is (and have no PPC equipment to test with), so maybe someone who understands this code can clarify things.

The error that was being generated:
# make
...
gcc -Ikern/generic -I/build/grub2-1.98~20100223/kern/generic -nostdinc -isystem 
/usr/lib/gcc/x86_64-linux-gnu/4.3.2/include 
-I/build/grub2-1.98~20100223/include -I. -I./include -Wall -W  -Os 
-DGRUB_MACHINE_IEEE1275=1 -Wall -W -Wshadow -Wpointer-arith 
-Wmissing-prototypes                -Wundef -Wstrict-prototypes -g 
-falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 
-mno-3dnow -m32 -fno-stack-protector -mno-stack-arg-probe -Werror 
-DUSE_ASCII_FAILBACK=1 -ffreestanding -mrtd -mregparm=3 
-I/build/grub2-1.98~20100223/debian/grub-extras/zfs/include -MD -c -o 
kernel_img-kern_generic_millisleep.o 
/build/grub2-1.98~20100223/kern/generic/millisleep.c
gcc -Ikern/ieee1275 -I/build/grub2-1.98~20100223/kern/ieee1275 -nostdinc 
-isystem /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include 
-I/build/grub2-1.98~20100223/include -I. -I./include -Wall -W  -Os 
-DGRUB_MACHINE_IEEE1275=1 -Wall -W -Wshadow -Wpointer-arith 
-Wmissing-prototypes                -Wundef -Wstrict-prototypes -g 
-falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 
-mno-3dnow -m32 -fno-stack-protector -mno-stack-arg-probe -Werror 
-DUSE_ASCII_FAILBACK=1 -ffreestanding -mrtd -mregparm=3 
-I/build/grub2-1.98~20100223/debian/grub-extras/zfs/include -MD -c -o 
kernel_img-kern_ieee1275_ieee1275.o 
/build/grub2-1.98~20100223/kern/ieee1275/ieee1275.c
gcc -Iterm/ieee1275 -I/build/grub2-1.98~20100223/term/ieee1275 -nostdinc 
-isystem /usr/lib/gcc/x86_64-linux-gnu/4.3.2/include 
-I/build/grub2-1.98~20100223/include -I. -I./include -Wall -W  -Os 
-DGRUB_MACHINE_IEEE1275=1 -Wall -W -Wshadow -Wpointer-arith 
-Wmissing-prototypes                -Wundef -Wstrict-prototypes -g 
-falign-jumps=1 -falign-loops=1 -falign-functions=1 -mno-mmx -mno-sse -mno-sse2 
-mno-3dnow -m32 -fno-stack-protector -mno-stack-arg-probe -Werror 
-DUSE_ASCII_FAILBACK=1 -ffreestanding -mrtd -mregparm=3 
-I/build/grub2-1.98~20100223/debian/grub-extras/zfs/include -MD -c -o 
kernel_img-term_ieee1275_ofconsole.o 
/build/grub2-1.98~20100223/term/ieee1275/ofconsole.c
cc1: warnings being treated as errors
/build/grub2-1.98~20100223/term/ieee1275/ofconsole.c: In function 
'grub_ofconsole_readkey':
/build/grub2-1.98~20100223/term/ieee1275/ofconsole.c:260: error: declaration of 
'start' shadows a previous local
/build/grub2-1.98~20100223/term/ieee1275/ofconsole.c:214: error: shadowed 
declaration is here
make[1]: *** [kernel_img-term_ieee1275_ofconsole.o] Error 1
make[1]: Leaving directory `/build/grub2-1.98~20100223/build/grub-ieee1275'
make: *** [build/grub-ieee1275] Error 2

-joey
=== modified file 'term/ieee1275/ofconsole.c'
--- term/ieee1275/ofconsole.c   2010-02-20 10:23:13 +0000
+++ term/ieee1275/ofconsole.c   2010-02-24 00:23:34 +0000
@@ -257,7 +257,6 @@
              break;
            case '3':
              {
-               grub_uint64_t start;            
                grub_ieee1275_read (stdin_ihandle, &c, 1, &actual);
                /* On 9600 we have to wait up to 12 milliseconds.  */
                start = grub_get_time_ms ();

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to