From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LlufC-00042g-C0 for mharc-grub-devel@gnu.org; Mon, 23 Mar 2009 20:38:42 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LlufA-00042Z-KF for grub-devel@gnu.org; Mon, 23 Mar 2009 20:38:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lluf5-00040H-4G for grub-devel@gnu.org; Mon, 23 Mar 2009 20:38:39 -0400 Received: from [199.232.76.173] (port=34984 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lluf4-00040E-Sw for grub-devel@gnu.org; Mon, 23 Mar 2009 20:38:34 -0400 Received: from c60.cesmail.net ([216.154.195.49]:37883) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1Lluf4-0000sC-FU for grub-devel@gnu.org; Mon, 23 Mar 2009 20:38:34 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 23 Mar 2009 20:38:33 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id 335DA34C6D for ; Mon, 23 Mar 2009 20:38:56 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <49C7D857.9070108@nic.fi> References: <1237827389.25031.24.camel@mj> <49C7D857.9070108@nic.fi> Content-Type: text/plain; charset="ISO-8859-1" Date: Mon, 23 Mar 2009 20:38:30 -0400 Message-Id: <1237855110.5199.28.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 (2.24.5-1.fc10) Content-Transfer-Encoding: 8bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: multiboot2.h includes stdint.h - not good 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: Tue, 24 Mar 2009 00:38:41 -0000 On Mon, 2009-03-23 at 20:43 +0200, Vesa Jääskeläinen wrote: > Pavel Roskin wrote: > > By the way, I already noticed that the inclusion of stdint.h from > > multiboot2.h is one of the problems preventing cross-compilation of GRUB > > without the libc for the target. Perhaps GRUB should provide its > > replacement for stdint.h when compiling for the target. Alternatively, > > multiboot2.h should use GRUB types. > > In grub ecosystem grub_* types should be used to specify arch dependent > types. Where as I favor stdint.h types like uint8_t for many things, the > idea for grub's own replacement is to easily detect wrong types used on > compilation process. > > So... stdint.h out... grub types in.. OK, let's fix the error messages for now. It turns out *.lst files for *.S files are generated without ASM_FILE defined. Real compilation defines ASM_FILE. Several *.S files define ASM_FILE internally, but loader/i386/multiboot_helper.S is not one of them. It's hard to capture errors in the *.lst generation without splitting a pipe into separate commands and introducing a temporary file, so it's probably not worth the trouble. Besides, any errors in the list generation will be caught at the compilation stage if the compiler flags are the same. But they are not the same, and that's a problem. ASM_FILE should be consistently defined for the same files in the compilation rules and in the list generating rules in genmk.rb. ChangeLog: * genmk.rb: Define ASM_FILE for *.S files when generating any lists. Index: genmk.rb =================================================================== --- genmk.rb (revision 2043) +++ genmk.rb (working copy) @@ -159,17 +159,17 @@ #{command}: #{src} $(#{src}_DEPENDENCIES) gencmdlist.sh set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ + $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ | sh $(srcdir)/gencmdlist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) #{fs}: #{src} $(#{src}_DEPENDENCIES) genfslist.sh set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ + $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ | sh $(srcdir)/genfslist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) #{partmap}: #{src} $(#{src}_DEPENDENCIES) genpartmaplist.sh set -e; \ - $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ + $(TARGET_CC) -I#{dir} -I$(srcdir)/#{dir} $(TARGET_CPPFLAGS) #{extra_flags} $(TARGET_#{flag}) $(#{prefix}_#{flag}) -E $< \ | sh $(srcdir)/genpartmaplist.sh #{symbolic_name} > $@ || (rm -f $@; exit 1) -- Regards, Pavel Roskin