building with -O2 enables the use of gcc's builtin gettext
gcc -DHAVE_CONFIG_H -I. -Wall -W -I./include -DGRUB_UTIL=1 -DGRUB_LIBDIR=\"/usr/lib/grub\" -DLOCALEDIR=\"/usr/share/locale\" -DGRUB_FILE=\"grub-core/lib/libgcrypt-grub/cipher/arcfour.c\" -I. -I. -I. -I. -I./include -I./include -I./grub-core/lib/libgcrypt-grub/include -I./grub-core/lib/libgcrypt-grub/src/ -I./grub-core/lib/libgcrypt_wrap -I./grub-core/lib/posix_wrap -D_GCRYPT_IN_LIBGCRYPT=1 -I./include/grub/gcrypt -g -Wall -O2 -Wno-error=unused-result -Wall -W -Wshadow -Wold-style-definition -Wpointer-arith -Wundef -Wextra -Waddress -Wattributes -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wempty-body -Wendif-labels -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnonnull -Woverflow -Wparentheses -Wpointer-arith -Wpointer-to-int-cast -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wswitch -Wtrigraphs -Wundef -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wnested-externs -Wstrict-prototypes -Wpointer-sign -Werror -Wno-error -Wno-missing-field-initializers -fno-builtin -c -o grub-core/lib/libgcrypt-grub/cipher/libgrubgcry_a-arcfour.o `test -f 'grub-core/lib/libgcrypt-grub/cipher/arcfour.c' || echo './'`grub-core/lib/libgcrypt-grub/cipher/arcfour.c
In file included from ./include/grub/misc.h:27:0,
from ./grub-core/lib/libgcrypt_wrap/cipher_wrap.h:24,
from grub-core/lib/libgcrypt-grub/cipher/types.h:2,
from grub-core/lib/libgcrypt-grub/cipher/arcfour.c:30:
./include/grub/i18n.h: In function '_':
./include/grub/i18n.h:56:10: error: 'LC_MESSAGES' undeclared (first use in this function)
./include/grub/i18n.h:56:10: note: each undeclared identifier is reported only once for each function it appears in
make[3]: *** [grub-core/lib/libgcrypt-grub/cipher/libgrubgcry_a-arcfour.o] Error 1
make[3]: Leaving directory `/build/buildd/linaro-grub-2.00+bzr4617+20130130'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/build/buildd/linaro-grub-2.00+bzr4617+20130130'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/build/buildd/linaro-grub-2.00+bzr4617+20130130'
Upstream commit #4635 (2013-01-11) included a source code change that, through a chain of events, triggers GCC-4.6.3-1ubuntu5 to override a locally provided "gettext()" function with a builtin alternative with a different prototype (including a requirement for an LC_MESSAGES define). This behaviour is triggered only when an optimization level is explicitly specified in the CFLAGS - and appears unaffected by -fno-builtins.
Workaround is to remove -O2 from build environment CFLAGS.
Solution is being investigated.
Also reproduced on amd64 with the same GCC version - where the build triggers additional errors not seen on ARM.