grub-devel
[Top][All Lists]
Advanced

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

Error building grub-emu (gnulib/progname.c)


From: Seth Goldberg
Subject: Error building grub-emu (gnulib/progname.c)
Date: Thu, 2 Dec 2010 16:53:57 -0800 (PST)
User-agent: Alpine 2.00 (GSO 1167 2008-08-23)

Hi,

 While trying to build grub-emu, I hit this:

/usr/gcc/4.3/bin/gcc -DHAVE_CONFIG_H -I. -I../../grub-core -I..  -Wall -W -I../../include 
-I../include  -DGRUB_MACHINE_EMU=1 -DGRUB_MACHINE=I386_EMU 
-DGRUB_FILE=\"gnulib/progname.c\" -I. -I../../grub-core -I.. -I../.. 
-I../../include -I../include   -I../grub-core/gnulib -I../../grub-core/gnulib  
-I/usr/sfw/include -Os -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 -fno-common -m32 -fno-stack-protector -mno-stack-arg-probe 
-Werror -DUSE_ASCII_FAILBACK=1 -DHAVE_UNIFONT_WIDTHSPEC=1         -ffreestanding 
-fno-common -Wno-undef -Wno-sign-compare -Wno-unused -Wno-unused-parameter   -MT 
gnulib/kernel_exec-progname.o -MD -MP -MF gnulib/.deps-core/kernel_exec-progname.Tpo -c 
-o gnulib/kernel_exec-progname.o `test -f 'gnulib/progname.c' || echo 
'../../grub-core/'`gnulib/progname.c
In file included from ../../grub-core/gnulib/progname.c:28:
../grub-core/gnulib/string.h:456: error: expected ‘;’, ‘,’ or ‘)’ before 
‘__dest’

 The offending line:
_GL_FUNCDECL_SYS (mempcpy, void *,
                  (void *restrict __dest, void const *restrict __src,
                   size_t __n)
                  _GL_ARG_NONNULL ((1, 2)));

uses the restrict keyword, which is not enabled by default with GCC 4.3.3, which I'm using. Adding -std=c99 allowed this to compile. So, a configure test should be added to enable this flag for versions of GCC that we support, but that do not enable c99 keywords by default.

 Thanks,
 --S

reply via email to

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