From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LRXaM-00031u-UD for mharc-grub-devel@gnu.org; Mon, 26 Jan 2009 14:57:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LRXaL-00031I-FE for grub-devel@gnu.org; Mon, 26 Jan 2009 14:57:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LRXaI-000302-TP for grub-devel@gnu.org; Mon, 26 Jan 2009 14:57:29 -0500 Received: from [199.232.76.173] (port=49940 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRXaI-0002zo-BV for grub-devel@gnu.org; Mon, 26 Jan 2009 14:57:26 -0500 Received: from mailout07.t-online.de ([194.25.134.83]:54947) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LRXaH-00036u-Sl for grub-devel@gnu.org; Mon, 26 Jan 2009 14:57:26 -0500 Received: from fwd07.aul.t-online.de by mailout07.sul.t-online.de with smtp id 1LRXaD-0003cL-04; Mon, 26 Jan 2009 20:57:21 +0100 Received: from [10.3.2.2] (ZZq-RGZ18hRaRch8P5qRsUrtdGMRMyVHLNsFQlXm67XHtEwV6Cjn8StA4Li+qeQwSx@[217.235.252.188]) by fwd07.aul.t-online.de with esmtp id 1LRXa1-0BQd280; Mon, 26 Jan 2009 20:57:09 +0100 Message-ID: <497E1596.7040802@t-online.de> Date: Mon, 26 Jan 2009 20:57:10 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: grub-devel@gnu.org References: <20090125231241.GA27873@thorin> In-Reply-To: <20090125231241.GA27873@thorin> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ID: ZZq-RGZ18hRaRch8P5qRsUrtdGMRMyVHLNsFQlXm67XHtEwV6Cjn8StA4Li+qeQwSx X-TOI-MSGID: 87abd317-d3c5-4b63-83cd-3afe48249aca X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] remove target_os 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, 26 Jan 2009 19:57:29 -0000 Robert Millan wrote: > Hi, > > Based on the description of host/target triplets in configure.ac: > > dnl build -- the environment for building GRUB > dnl host -- the environment for running utilities > dnl target -- the environment for running GRUB > > it seems that target_os is an oxymoron. There's no OS in the environment > where GRUB will run (well, there's the firmware, but we already use > target_vendor for that, and _os has a well-defined meaning). > > Attached patch fixes that by supressing all references to target_os, and > replacing them with host_os where suitable. > > Christian: since this mostly affects Cygwin, could you verify that it doesn't > cause breakage before I commit it? > > Hi Robert, thanks for sending the patch first. Cygwin build looks good. But even if GRUB itself is build for some $target_cpu-$target_vendor (i386-pc), the target_os is not useless if cross-compilation support is desired: - GRUB tools like grub-setup are build for the target_os - Package structure may depend on target_os. - The gcc code generator may emit special code tailored for the assumed target_os Examples: Stack frame checks Nested function trampolines (__enable_execute_stack()) Unfortunately, gcc has no '-fno_os' option to specify the bare CPU as target. Fortunately, all current issues can be handled by autoconf checks. > AC_MSG_CHECKING([for command to convert module to ELF format]) > -case "${host_os}:${target_os}" in > - cygwin:cygwin) TARGET_OBJ2ELF='grub-pe2elf' ;; > +case "${host_os}" in > + cygwin) TARGET_OBJ2ELF='grub-pe2elf' ;; > *) ;; > esac > This won't work for a Linux cross compiler hosted on Cygwin. It would emit ELF format and does not need pe2elf. But all this is theoretical unless cross compilation is really needed. Christian