bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Grub 0.95 Compilation Error


From: Haren Visavadia
Subject: Grub 0.95 Compilation Error
Date: Sat, 29 Jan 2005 10:01:57 +0000 (GMT)

Known to work: gcc-3.4-20050121
(ftp://gcc.gnu.org/pub/gcc/snapshots/3.4-20050121/gcc-3.4-20050121.tar.bz2)
Known to fail: gcc-4.0-20050123
(ftp://gcc.gnu.org/pub/gcc/snapshots/4.0-20050123/gcc-4.0-20050123.tar.bz2)
In both cases Binutils 2.15 was used

When compiling grub 0.95 using gcc-4.0-20050123, the
following compile error shows:

builtins.c: In function 'blocklist_func':
builtins.c:145: error: invalid storage class for
function 'disk_read_blocklist_func'
builtins.c:145: warning: no previous prototype for
'disk_read_blocklist_func'
builtins.c: In function 'color_func':
builtins.c:592: error: invalid storage class for
function 'color_number'
builtins.c:592: warning: no previous prototype for
'color_number'
builtins.c: In function 'install_func':
builtins.c:1751: error: invalid storage class for
function 'disk_read_savesect_func'
builtins.c:1751: warning: no previous prototype for
'disk_read_savesect_func'
builtins.c:1767: error: invalid storage class for
function 'disk_read_blocklist_func'
builtins.c:1767: warning: no previous prototype for
'disk_read_blocklist_func'
builtins.c: In function 'setkey_func':
builtins.c:3499: error: invalid storage class for
function 'find_key_code'
builtins.c:3499: warning: no previous prototype for
'find_key_code'
builtins.c:3516: error: invalid storage class for
function 'find_ascii_code'
builtins.c:3516: warning: no previous prototype for
'find_ascii_code'
make[2]: *** [pre_stage2_exec-builtins.o] Error 1
make[2]: Leaving directory
`/sources/Misc/grub-0.95/stage2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/sources/Misc/grub-0.95'
make: *** [all] Error 2

>From looking at the builtins.c, it appears to related
to way grub uses the keyword static.

Futhermore, gcc-4.0-20050123 is able to compile:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static void print(char * message)
{
        printf(message);
        printf("\n");
}

int main() {
        print("hello world");
        return 0;
}
Making this not a gcc-4.0-20050123 bug.

I am more than happy to try out patches and give
feedback on them.

Thanks in Advance



        
        
                
___________________________________________________________ 
ALL-NEW Yahoo! Messenger - all new features - even more fun! 
http://uk.messenger.yahoo.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]