From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1U0cUm-00063g-Hc for mharc-grub-devel@gnu.org; Wed, 30 Jan 2013 13:34:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:34655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0cUi-0005tl-QO for grub-devel@gnu.org; Wed, 30 Jan 2013 13:34:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U0cUh-0002xP-KV for grub-devel@gnu.org; Wed, 30 Jan 2013 13:34:48 -0500 Received: from service87.mimecast.com ([91.220.42.44]:58164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U0cUh-0002xC-CB for grub-devel@gnu.org; Wed, 30 Jan 2013 13:34:47 -0500 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Wed, 30 Jan 2013 18:32:41 +0000 Received: from [10.1.79.85] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 30 Jan 2013 18:32:40 +0000 Message-ID: <51096747.8080100@arm.com> Date: Wed, 30 Jan 2013 18:32:39 +0000 From: Leif Lindholm User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Trunk fails to build with -O X-OriginalArrivalTime: 30 Jan 2013 18:32:40.0294 (UTC) FILETIME=[2F633060:01CDFF18] X-MC-Unique: 113013018324112201 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 91.220.42.44 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 18:34:50 -0000 Our Ubuntu (12.04/12.10) build environment defaults configuring with=20 CFLAGS containing -O2. Trunk currently does not build successfully with=20 this on either my ARM platform or my x86_64 desktop. This isn't causing any serious problems, but I thought I would report=20 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=20 'grub-core/lib/libgcrypt-grub/cipher/arcfour.c' || echo=20 './'`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=20 in this function) ./include/grub/i18n.h:56:10: note: each undeclared identifier is=20 reported only once for each function it appears in make[3]: ***=20 [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,=20 -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=20 with a warn-unused-result prototype when building with optimizations. And, also on my workstation only, util/ieee1275/ofpath.c (system) read()=20 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=20 from the build command line (or -O0 is appended). Regards, Leif