Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MDlh9-0007yY-GA for mharc-grub-devel@gnu.org; Mon, 08 Jun 2009 16:43:51 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MDlh7-0007xy-VN for grub-devel@gnu.org; Mon, 08 Jun 2009 16:43:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MDlh2-0007wH-P1 for grub-devel@gnu.org; Mon, 08 Jun 2009 16:43:48 -0400 Received: from [199.232.76.173] (port=55094 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MDlh2-0007wE-Ga for grub-devel@gnu.org; Mon, 08 Jun 2009 16:43:44 -0400 Received: from mail-fx0-f217.google.com ([209.85.220.217]:34741) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MDlh2-0006n5-0x for grub-devel@gnu.org; Mon, 08 Jun 2009 16:43:44 -0400 Received: by fxm17 with SMTP id 17so1193135fxm.42 for ; Mon, 08 Jun 2009 13:43:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=3NG+gnaHKZkjTSzPY6AzfSDk/35O2MzryYG9f21IBZ8=; b=RXrv+/scbNmPpgFXSRdedXXjZGRwJ0lSyuAPo2KaGyhzupcP3eJTBMIxbSiquYp8tc yWcC+cE7vpTb9/zeQjIpMivFkTJFmZ5BOsXcsTRekGW0r5sanUinMFPardp3qTsEdLPA bA0nqNc+/R1q+uQh+cHFraKWsfad1Zl+0YZdM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=RAjbmbsV0DpG8ObJnAsJEpck99i2lgDyFFHPgi2Tw/VSw0UkW8qs7ve1ybX5P4krQq g7ai71UB/tFQ64DaWAiK8+4KCTPS3HYtYiJrmQRYJagRCmNWuKO3ua4hxBa11iFCOHW7 4WMkUD2TVqxlgkXeCSTLL/RClcadgcxIOzSu4= MIME-Version: 1.0 Received: by 10.204.31.196 with SMTP id z4mr7051973bkc.73.1244493822540; Mon, 08 Jun 2009 13:43:42 -0700 (PDT) In-Reply-To: <20090605091052.GN7367@riva.ucam.org> References: <200906032352.51827.dron@osrc.info> <200906050007.20241.dron@osrc.info> <20090605091052.GN7367@riva.ucam.org> Date: Mon, 8 Jun 2009 22:43:42 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: multiboot take partial mmap X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2009 20:43:50 -0000 On Fri, Jun 5, 2009 at 11:10 AM, Colin Watson wrote: > On Fri, Jun 05, 2009 at 03:24:09AM +0200, Vladimir 'phcoder' Serbinenko w= rote: >> On Thu, Jun 4, 2009 at 10:07 PM, Andrey Valyaev wrote: >> > PS: latest svn revision (from 2243) failed with message: >> > >> > gcc -Icommands -I./commands -I. -I./include -I./include -Wall -W =A0-W= all -W - >> > Wshadow -Wpointer-arith -Wmissing-prototypes =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0-Wundef - >> > Wstrict-prototypes -g -Os -falign-jumps=3D1 -falign-loops=3D1 -falign-= functions=3D1 >> > -m32 -fno-stack-protector -mno-stack-arg-probe -fno-builtin -mrtd -mre= gparm=3D3 >> > -m32 -Werror -Wall -MD -c -o search_mod-commands_search.o commands/sea= rch.c >> > cc1: warnings being treated as errors >> > commands/search.c: In function 'search_fs': >> > commands/search.c:42: error: generating trampoline in object (requires >> > executable stack) >> > commands/search.c: In function 'grub_cmd_search': >> > commands/search.c:105: error: generating trampoline in object (require= s >> > executable stack) >> > make[1]: *** [search_mod-commands_search.o] Error 1 >> > >> > $ gcc --version >> > gcc (Gentoo 4.3.3-r2 p1.1, pie-10.1.5) 4.3.3 >> > >> This is because of commit 2243 by Robert Millan. The commit was about >> floppy probing but also added -Wall -Werror to search.mod >> I myself stepped on this mine once with adding -Wall -Werror to my xnu m= odule. >> I'll revert this change (only -Werror, not the rest of commit) as it >> causes build error for all gentoo users. Sorry, Robert, but we can't >> enable -Werror and still have nested functions. I don't think we >> should use -Werror at all because different compilers, versions or >> modifications of same compiler cause different warnings and imho >> maintaintaining cost is too high and breaks are too frequent. Or >> perhaps we can enable -Werror only on some compilers? Or perhaps >> anyone has a better idea > > You could use -Wno-trampolines (IIRC that's the spelling) on Gentoo's > patched GCC; it's generally good to minimise unwanted warnings even if > they aren't errors. Here's the macro I use in man-db to add GCC warning > options: > > =A0# man-gcc-warning.m4 serial 1 > =A0dnl MAN_GCC_WARNING(WARNING) > =A0dnl Add -WWARNING to CFLAGS if it is supported by the compiler. > =A0AC_DEFUN([MAN_GCC_WARNING], > =A0[man_saved_CFLAGS=3D"$CFLAGS" > =A0 CFLAGS=3D"$CFLAGS -W$1" > =A0 AC_CACHE_CHECK([that GCC supports -W$1], > =A0 =A0 [AS_TR_SH([man_cv_gcc_warning_$1])], > =A0 =A0 [AS_TR_SH([man_cv_gcc_warning_$1])=3Dno > =A0 =A0 =A0AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0[AS_TR_SH([man_cv_gcc_warn= ing_$1])=3Dyes])]) > =A0 if test "$AS_TR_SH([man_cv_gcc_warning_$1])" =3D no; then > =A0 =A0 CFLAGS=3D"$man_saved_CFLAGS" > =A0 fi]) # MAN_GCC_WARNING > > I then use this in configure.ac: > > =A0if test "$GCC" =3D yes > =A0then > =A0 =A0 =A0 =A0 =A0MAN_GCC_WARNING([]) # -W > =A0 =A0 =A0 =A0 =A0MAN_GCC_WARNING([pointer-arith]) > =A0 =A0 =A0 =A0 =A0MAN_GCC_WARNING([write-strings]) > =A0 =A0 =A0 =A0 =A0MAN_GCC_WARNING([strict-prototypes]) > =A0 =A0 =A0 =A0 =A0MAN_GCC_WARNING([shadow]) > =A0 =A0 =A0 =A0 =A0MAN_GCC_WARNING([format-security]) > =A0 =A0 =A0 =A0 =A0MAN_GCC_WARNING([no-missing-field-initializers]) > =A0fi > > Feel free to use and adjust to taste if you want. I think we could use it with -W, -Wall, -Wno-trampolines. Is everybody ok with that? Is this code copyrighted by you? > > -- > Colin Watson =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 [cjwatson@ubuntu.com] > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir 'phcoder' Serbinenko