From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1LRvrP-0007lF-W4 for mharc-grub-devel@gnu.org; Tue, 27 Jan 2009 16:52:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LRvrO-0007hs-NA for grub-devel@gnu.org; Tue, 27 Jan 2009 16:52:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LRvrN-0007dG-1t for grub-devel@gnu.org; Tue, 27 Jan 2009 16:52:42 -0500 Received: from [199.232.76.173] (port=51094 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LRvrM-0007d6-UM for grub-devel@gnu.org; Tue, 27 Jan 2009 16:52:40 -0500 Received: from mail-ew0-f20.google.com ([209.85.219.20]:56723) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LRvrM-0008K1-CG for grub-devel@gnu.org; Tue, 27 Jan 2009 16:52:40 -0500 Received: by ewy13 with SMTP id 13so2505998ewy.18 for ; Tue, 27 Jan 2009 13:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=Fow3ThfxJusuEAScfWMAJYxJEBTLBTQHl/g1vJVRETE=; b=rpBPKEVIrjU9hvgLsQtUIHi/KpKnVVAgOFK/pzG+j/D2TrQaWEhh9sAKA+0nf9DVMJ JUdU7ldeyih5rk2D3gR6uoEZBmjx0wHSwMens4TvhG5YgphRyQgLDj8XibQJsKsJzlJt TQsYIA2o3uYed1LQiVxMfXwM0v6nlyUP59GLI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=MrpHYU9lokdMIaFbk2JElhOaFB2AO+BKtQcbAeWWQY6Pf1dykbvCmBttjdm1G//uMk oGgYgzxkNbLmRcGA23pqdLj0W8j0u5bj4WW4mbvmmxHKr4X7OfW3FQPkS/JFz9Vtbd51 GVyiCjCWWn3qVq6+XvI/lsMQy+IkLBd5t8Rds= Received: by 10.103.243.9 with SMTP id v9mr3954066mur.5.1233093159242; Tue, 27 Jan 2009 13:52:39 -0800 (PST) Received: from ?192.168.1.102? (213.37.137.93.dyn.user.ono.com [213.37.137.93]) by mx.google.com with ESMTPS id 14sm3337103muo.39.2009.01.27.13.52.38 (version=SSLv3 cipher=RC4-MD5); Tue, 27 Jan 2009 13:52:38 -0800 (PST) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: <497F670B.6080902@t-online.de> References: <20090125231241.GA27873@thorin> <497E1596.7040802@t-online.de> <1233008230.24663.8.camel@localhost> <497F42B0.3060201@t-online.de> <1233078009.2937.12.camel@localhost> <497F670B.6080902@t-online.de> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-NWOYyvHMsh+TwweBE2Qy" Date: Tue, 27 Jan 2009 22:52:59 +0100 Message-Id: <1233093179.6503.5.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.24.2 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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: Tue, 27 Jan 2009 21:52:42 -0000 --=-NWOYyvHMsh+TwweBE2Qy Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable El mar, 27-01-2009 a las 20:56 +0100, Christian Franke escribi=C3=B3: > Javier Mart=C3=ADn wrote: > > El mar, 27-01-2009 a las 18:21 +0100, Christian Franke escribi=C3=B3: > > =20 > >> Javier Mart=C3=ADn wrote: > >> =20 > >>>> Unfortunately, gcc has no '-fno_os' option to specify the bare CPU a= s=20 > >>>> target. > >>>> =20 > >>>> =20 > >>> Might -ffreestanding be what you are looking for? > >>> > >>> =20 > >>> =20 > >> The option '-ffreestanding' is the same as '-fno-hosted'. > >> > >> According to gcc (4.3.1) source, '-fno-hosted' clears variable=20 > >> 'flag_hosted' and sets '-fno-builtin'. The latter is already set withi= n=20 > >> GRUB build. > >> > >> A cleared 'flag_hosted' apparently has only 2 effects: > >> - disable the special handling of 'main()'. > >> - #define __STDC_HOSTED__ to 0 instead of 1 > >> > >> There is no effect on the target_os dependent parts of the gcc code=20 > >> generation. For example, on i386, __enable_execute_stack() calls are=20 > >> generated for target_os netbsd, openbsd and cygwin, but not for linux.= =20 > >> The emit call is hard-coded in=20 > >> gcc/configs/i386/i386.c:x86_initialize_trampoline(). > >> =20 > > > > In that case, we are dealing with a GCC bug. We might want to require > > the user to create a bare "no-OS" cross compiler.=20 > > > > =20 >=20 > Is building a bare 'no-OS' compiler supported by the upstream GCC sources= ? > Probably a too strict prerequisite for building GRUB. I can't vouch so for all possible environments, but I can say that "clean" no-OS targets like i386-pc-elf exist at least for x86 and x86_64 (this last being added as of GCC 4.3.2). However, as I said, if -ffreestanding does not do its job of providing a "true" freestanding environment (i.e. without relying on _any_ external libraries or syscalls, as opposite to the usual hosted environment), a bug report should be posted. --=-NWOYyvHMsh+TwweBE2Qy Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iQIcBAABAgAGBQJJf4I2AAoJEKSl+Fbdeo72gFgQAJUsoFbpuFFbrDwrqPiU1NDQ vSDaNyYJMv1Lm7f51Uj56lNL52Aq/r0u4bLGH/DQhflGrY6vJ4tHdIT2REVPwx1/ Qsn11N5FkIzjDskMIxw1Oq4HBYgojVotiFBeE7Bup2AL0o26TQd5FoxuMALsJqv/ Zc0em9iLnzQ7HftQNYRtOdM7WJz8p5n3bdPJfq4IsJywnBP55Szaex7ObV+S2+gi imQO9/tDvksmrwbCH75NuoMJt00S8RBB2YMUEnw78+zH/u22siwl8pHNA7fuGpNU LtBV226umKNmOvETa28FFBOU3Y+MLFbeAD5oFSGsTMp4oeFYouX3H0LwrWbsfpCA ajmcHJ7vh0ZA4iIYwHyUqSOGs8QIz664NevE1FLKexqwO5ivqP419qv+D35gA5TO ouZGssVu83BGzxV6672ki3vlvupe217uqa/4vO7qqKM+gOO4WtQF06+rW1VM7WSs SqDT1Uu02fcrRiEkgkcMnbKLQH7dSve02nlrmuvP5W2dDeuI6cgNA6tLTQzQ+y0H vFmEl59qtp/N+MnBRpwXOyKZrM9qIv5s5VQDq4qdfBe4B9F4YvxCoT5LhKWkf1Gx /IKn2lYNxHWZoopNK19x0wZJhV+JG15Yfumy/4+ZfMBOS6ROn4gXR6r23z64PzC6 aXlzK9sUgPrr67j56eud =dYUX -----END PGP SIGNATURE----- --=-NWOYyvHMsh+TwweBE2Qy--