From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DC600138C9D for ; Thu, 30 Apr 2015 18:28:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8B1F6E0857; Thu, 30 Apr 2015 18:28:22 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5A92CE0844 for ; Thu, 30 Apr 2015 18:28:21 +0000 (UTC) Received: from localhost (sloan0.ut.mephi.ru [85.143.112.33]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: bircoph) by smtp.gentoo.org (Postfix) with ESMTPSA id BF70E340BCA for ; Thu, 30 Apr 2015 18:28:19 +0000 (UTC) Date: Thu, 30 Apr 2015 21:28:15 +0300 From: Andrew Savchenko To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] CFLAGs for kernel compilation Message-Id: <20150430212815.ca57ca4f2d056450c9b57185@gentoo.org> In-Reply-To: <55427068.5030909@googlemail.com> References: <5540C101.70906@ramses-pyramidenbau.de> <554257AE.8020503@googlemail.com> <20150430204518.b89e4a39cab48a9cdf339259@gentoo.org> <55427068.5030909@googlemail.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.25; i686-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA512"; boundary="Signature=_Thu__30_Apr_2015_21_28_15_+0300_MNgxOlToFCyuWa15" X-Archives-Salt: 62f82c75-4a5e-4228-a866-2285c3476eab X-Archives-Hash: 8d5280f5f407581ab39e99658305feb1 --Signature=_Thu__30_Apr_2015_21_28_15_+0300_MNgxOlToFCyuWa15 Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, 30 Apr 2015 20:11:52 +0200 Volker Armin Hemmann wrote: > Am 30.04.2015 um 19:45 schrieb Andrew Savchenko: > > Hi, > > > > On Thu, 30 Apr 2015 18:26:22 +0200 Volker Armin Hemmann wrote: > >> That simple. The kernel is too important and the people programming it > >> know what they are doing. Don't set anything. It is retarded. > >>> - I don't like invoking 'CFLAGS=3D"-O2 -march=3Dfoo"make' > >>> - I don't want to set CFLAGS as a persistent environment variable. > >>> - I don't want to modify the kernel Makefile > >>> > >>> Does it actually make sense to set an optimization level and -march? > >> no > > While I completely agree with you that kernel CFLAGS should not be > > randomly tampered with, I can't agree that -march itself is useless. > > Tests and results are available here: > > https://github.com/graysky2/kernel_gcc_patch > > > > Optimization is a very powerful tool if taken with care. Of course > > it may lead to a disastrous result if mindlessly used. > > > > Best regards, > > Andrew Savchenko >=20 > if your mail client or browser is miscompiled, it is crashy, but worst > case, a bunch of emails or bookmarks are lost. >=20 > If the kernel fucks up, it might write across partition boundaries and > destroy ALL your data. Or writes garbage instead of data. >=20 > Don't f* with the kernel. That's why we have tests. Follow the link above. As for a personal experience: we have kernels with this patch and gcc native optimization in production for several years. Results are fine (no kernel related issues). In order not to crash kernel, do not add -ffast-math there. You need to have some understanding before touching such stuff. Best regards, Andrew Savchenko --Signature=_Thu__30_Apr_2015_21_28_15_+0300_MNgxOlToFCyuWa15 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJVQnQ/AAoJEPZTWjO6HuSN8r0P/1/LhEe2wvhdM36WhucYBTq9 Ce15I3+y8g8ZRgPoWK846DnbPGMcHZtXfzE37+/5gnNr1YH6iVU6zrgm2u4fopjq vSOs/R0SaKsSJtS8Gt54qOyo/nePGn3YotN9+daNuUI6l9A+Ea6FKDu4AkRrR1NH /5xL5Q67uvfErpZ7JyZAedxs3VM2OHCNLjxyEpwb11zNg65ivFTjxq0DgJ0c8n3n lNY/vFsvUXupT+KPoF0skduQ4w4p/b1js+dTsGVoqIjm27c6PFN/F54zQ2Z5bbvo WjopaAnEIIJr78O0qumLeSyIdXgoRaof84lF+d2miktqij2rt/PRnmtC+NMQRRS1 t8wSdyLz9raz7sKDztO07Se/wRxqPiN+eI3g/I2QHSaPoLvCzQdfW++Pf25CIibF bLFFeaxwj1+yfCkm6erU1xBL1StyeBWBYxfdPnzyE2Jc0PniWPp2j4F7mspgRj1c A4EW1PRa+2sjjRbGrYZ50m/V5qii8rlVdMgPv2GbIB/0Sr3HqYlgjouAwgN8jT3h W+PN7kQnIxsRFHHG3sZAFilAJmaw8EmNIqEaU+rZZw9ymYWsFFOMor3K9lMdN2Nm HDqS0uQ5TgVL7fQGaf1bnIm3jjxcyc4eGVVowH8OE8FXT2EOeYQQDwJSrT2nfraI KhHEypO3BMD1ipKcxMGe =wzXn -----END PGP SIGNATURE----- --Signature=_Thu__30_Apr_2015_21_28_15_+0300_MNgxOlToFCyuWa15--