From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1XuSXk-0005UR-DK for mharc-grub-devel@gnu.org; Fri, 28 Nov 2014 15:53:32 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuSXd-0005Gc-25 for grub-devel@gnu.org; Fri, 28 Nov 2014 15:53:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XuSXX-0004U5-CP for grub-devel@gnu.org; Fri, 28 Nov 2014 15:53:25 -0500 Received: from mail-wi0-x229.google.com ([2a00:1450:400c:c05::229]:43689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XuSXX-0004Tk-25 for grub-devel@gnu.org; Fri, 28 Nov 2014 15:53:19 -0500 Received: by mail-wi0-f169.google.com with SMTP id r20so21932950wiv.2 for ; Fri, 28 Nov 2014 12:53:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=pm3dVg44pk6bdr0nytf6qM70G/vN5eqios25+4MIndw=; b=RNPyiML8iikwOxCcHATDfGHE2gG64kGA6u73uyWyOfoTSgurv0/dWeRQicxmg9MJBu jCKuTpO+4+Dt2Hey4ZJ0IOEN2dZ0whZpcG6Vc4lkmgEoT3R/fc2zqz0z9+YO3fNMpnhu pBEyJs7n4RYSLh7kbwmkgu4NYX+zm/DOy1bMi7eR9+7OndZdyEsbH/DQPfSTrPjspNVz 0byGf2nZGd19gK9/tFk9ZjgwQkcJKUd22s2BS828x34bsnGP+Jd/6K5CZdjEaHhBoTDS NGvdgOTCFuMOuNxanWIyAX5Svm21RrMo5SawJFs69P+dgLuCrElrmPz/gTfhMoIS56iW PwaQ== X-Received: by 10.194.246.167 with SMTP id xx7mr72573116wjc.118.1417207998356; Fri, 28 Nov 2014 12:53:18 -0800 (PST) Received: from [10.222.38.128] ([212.213.198.101]) by mx.google.com with ESMTPSA id u9sm16471552wjy.37.2014.11.28.12.53.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Nov 2014 12:53:17 -0800 (PST) Message-ID: <5478CD71.7080904@gmail.com> Date: Fri, 28 Nov 2014 21:30:57 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] Add flags for powerpc in order to avoid exceptions References: <20140926192936.GA30134@beren.chocolate> <20140927090653.062225be@opensuse.site> <20140929223016.1ebb5d7b@opensuse.site> <20141008233827.GA7716@beren.chocolate> In-Reply-To: <20141008233827.GA7716@beren.chocolate> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Tkk8nFm6SV4P07VtHkhTPoL0xhaeiLOaW" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::229 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: Fri, 28 Nov 2014 20:53:31 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Tkk8nFm6SV4P07VtHkhTPoL0xhaeiLOaW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09.10.2014 02:38, Paulo Flabiano Smorigo wrote: > Mon, Sep 29, 2014 at 10:30:16PM +0400, Andrei Borzenkov wrote: >> =D0=92 Sat, 27 Sep 2014 09:06:53 +0400 >> Andrei Borzenkov =D0=BF=D0=B8=D1=88=D0=B5=D1=82:= >> >>> =D0=92 Fri, 26 Sep 2014 16:29:40 -0300 >>> Paulo Flabiano Smorigo =D0=BF=D0=B8=D1= =88=D0=B5=D1=82: >>> >>>> * conf/Makefile.common [COND_powerpc_ieee1275] (CFLAGS_PLATFORM): Ad= d >>>> -msoft-float -mno-vsx -mno-altivec. >>>> >>>> Also-By: Adhemerval Zanella >>>> --- >>>> ChangeLog | 7 +++++++ >>>> conf/Makefile.common | 3 +++ >>>> 2 files changed, 10 insertions(+) >>>> >>>> diff --git a/ChangeLog b/ChangeLog >>>> index 192e8bc..40eb90c 100644 >>>> --- a/ChangeLog >>>> +++ b/ChangeLog >>>> @@ -1,3 +1,10 @@ >>>> +2014-09-26 Paulo Flabiano Smorigo >>>> + >>>> + Add flags for powerpc in order to avoid exceptions >>>> + >>>> + * conf/Makefile.common [COND_powerpc_ieee1275] (CFLAGS_PLATFORM): = Add >>>> + -msoft-float -mno-vsx -mno-altivec. >>>> + >>>> 2014-09-25 Colin Watson >>>> =20 >>>> Fix in-tree --platform=3Dnone >>>> diff --git a/conf/Makefile.common b/conf/Makefile.common >>>> index 51fbaf9..57c491a 100644 >>>> --- a/conf/Makefile.common >>>> +++ b/conf/Makefile.common >>>> @@ -22,6 +22,9 @@ endif >>>> if COND_arm64 >>>> CFLAGS_PLATFORM +=3D -mcmodel=3Dlarge >>>> endif >>>> +if COND_powerpc_ieee1275 >>>> + CFLAGS_PLATFORM +=3D -msoft-float -mno-vsx -mno-altivec >>>> +endif >>>> =20 >>>> #FIXME: discover and check XEN headers >>>> CPPFLAGS_XEN =3D -I/usr/include >>> >>> Thank you! I confirm that this patch works and does not break grub on= >>> earlier CPU :) >>> >>> There are still differences in generated code, so we probably need to= >>> tune some more flags. >> >> I looked at compiler options for PowerPC and I think instead of trying= >> to catch individual flags which may change with every release we shoul= d >> simply force the most common platform by >> >> +if COND_powerpc_ieee1275 >> + CFLAGS_PLATFORM +=3D -mcpu=3Dpowerpc -mtune=3Dpowerpc >> +endif >> >> >> This makes sure result is identical on every platform and provides mos= t >> generic code that is expected to run on every(?) system. >> >> WDYT? >=20 > Hi Andrei, >=20 > Sorry to take so long to answer your question. >=20 > After an internal discussion with some toolchain experts we found out > that your approach is good. It works and it's more generic but we think= > that we should change it a little bit: >=20 > * skip -mtune, not really necessary > * add "-msoft-float" to be completly safe. >=20 > Something like: >=20 > +if COND_powerpc_ieee1275 > + CFLAGS_PLATFORM +=3D -mcpu=3Dpowerpc -msoft-float > +endif >=20 > This approach is similar to what the linux kernel do. Can you add -msoft-float to all archs? Other than that proposition looks good --Tkk8nFm6SV4P07VtHkhTPoL0xhaeiLOaW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iF4EAREKAAYFAlR4zXEACgkQmBXlbbo5nOvC6QD+KjpHcRWOPehE8YEbaMEkR16i 3iAy5OKdVw9t7K4eG6YA/jc3uYzebvjLwlEn4GyU0fq6drP6XBZ9IBNRI2BlusT/ =i2xm -----END PGP SIGNATURE----- --Tkk8nFm6SV4P07VtHkhTPoL0xhaeiLOaW--