From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1U0dXF-0001TH-SV for mharc-grub-devel@gnu.org; Wed, 30 Jan 2013 14:41:29 -0500 Received: from eggs.gnu.org ([208.118.235.92]:51779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0dXD-0001T6-Bk for grub-devel@gnu.org; Wed, 30 Jan 2013 14:41:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0dXC-0005ZM-3D for grub-devel@gnu.org; Wed, 30 Jan 2013 14:41:27 -0500 Received: from mail-lb0-f179.google.com ([209.85.217.179]:50511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0dXB-0005ZC-RE for grub-devel@gnu.org; Wed, 30 Jan 2013 14:41:26 -0500 Received: by mail-lb0-f179.google.com with SMTP id j14so2559884lbo.38 for ; Wed, 30 Jan 2013 11:41:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:in-reply-to :references:x-mailer:mime-version:content-type :content-transfer-encoding; bh=ClW9ili6QN4J7k7Fp0gH5onF/PDgiMB+0yuYjEjjKV4=; b=WoT8lwwb9ZjjHCcdfUtXU+RU9UEskASIgeSeeujmG9T3SkeElMfhYT3oAehdQ7/aEU UXR/zgK5RVJ7a9TLg2SVYqEI8035YmSM4E9f6RF8WQNvvyJAyjDEOzgC8d7ARxkOv/eV o/oUJKBK2jXl/H/2QKttUN8veUuWmmSLmDCKzlKi9HRRnejzRkb57Xsao1/x7EUGu5lU AUKWNqbddLj2WO8eRo4Dfc5lrCQYj3PvlkMZB9upLNOMkid9+vXeXksd/WOXCSqrywzu C/vsS2tV49ID5Udc+K4vP6Fmzm17xgq0rVsu2F8lAFbph2JN24ZX1Ejdt1ewd56PhYO5 YNKA== X-Received: by 10.112.17.108 with SMTP id n12mr2303640lbd.21.1359574884649; Wed, 30 Jan 2013 11:41:24 -0800 (PST) Received: from opensuse.site (ppp91-78-198-46.pppoe.mtu-net.ru. [91.78.198.46]) by mx.google.com with ESMTPS id ns7sm1279526lab.5.2013.01.30.11.41.22 (version=SSLv3 cipher=RC4-SHA bits=128/128); Wed, 30 Jan 2013 11:41:23 -0800 (PST) Date: Wed, 30 Jan 2013 23:41:21 +0400 From: Andrey Borzenkov To: The development of GNU GRUB Subject: Re: Trunk fails to build with -O Message-ID: <20130130234121.69db8dbb@opensuse.site> In-Reply-To: <51096747.8080100@arm.com> References: <51096747.8080100@arm.com> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.10; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 209.85.217.179 Cc: leif.lindholm@arm.com X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jan 2013 19:41:28 -0000 В Wed, 30 Jan 2013 18:32:39 +0000 Leif Lindholm пишет: > Our Ubuntu (12.04/12.10) build environment defaults configuring with > CFLAGS containing -O2. Trunk currently does not build successfully with > this on either my ARM platform or my x86_64 desktop. > > This isn't causing any serious problems, but I thought I would report > what I've found. > > Commit #4635 included source code changes that ended up causing build > failures in several of the libcrypt cipher files with > --- > 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 > --- > when building the utils. > > This occurs with any -O level other than -O0. > > I traced the culprit down to the (system) libintl.h, which has a cute > little section which checks if __OPTIMIZE__ is set, and if so redefines > gettext() as a macro for dcgettext (domainname, msgid, LC_MESSAGES). > Since this is all preprocessor driven in the C library headers, > -fno-builtin has no effect. > > Also, when building on my x86_64 workstation only, I get a failure when > compiling grub-core/lib/crypto.c - due to (system) fgets() ending up > with a warn-unused-result prototype when building with optimizations. > > And, also on my workstation only, util/ieee1275/ofpath.c (system) read() > fails due to warn-unused-results, just like fgets() above. > > All but one of these issues "go away" with -U__OPTIMIZE__ : > grub-core/lib/libgcrypt-grub/cipher/rijndael.c gives a few screenfuls > of warnings anyway, and only builds successfully when -O2 is removed > from the build command line (or -O0 is appended). > I wonder why it did not happen before. Apparently, empty locale.h is present since 2010-04-10 (rev 2311). Removing it fixes the problem, but I presume it should not be empty in the first place. From: Andrey Borzenkov Subject: [PATCH] remove stray locale.h Empty locale.h caused compilation errors. Signed-off-by: Andrey Borzenkov --- po/POTFILES.in | 1 - 1 file changed, 1 deletion(-) diff --git a/grub-core/lib/posix_wrap/locale.h b/grub-core/lib/posix_wrap/locale.h deleted file mode 100644 index e69de29..0000000 diff --git a/po/POTFILES.in b/po/POTFILES.in index 01cc53c..358de99 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -443,7 +443,6 @@ ./grub-core/lib/posix_wrap/langinfo.h ./grub-core/lib/posix_wrap/limits.h ./grub-core/lib/posix_wrap/localcharset.h -./grub-core/lib/posix_wrap/locale.h ./grub-core/lib/posix_wrap/stdint.h ./grub-core/lib/posix_wrap/stdio.h ./grub-core/lib/posix_wrap/stdlib.h -- tg: (4b9ea2e..) u/locale.h (depends on: master)