From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CCD971382C5 for ; Tue, 24 Apr 2018 19:02:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F719E0903; Tue, 24 Apr 2018 19:02:48 +0000 (UTC) Received: from pmta11.teksavvy.com (pmta11.teksavvy.com [76.10.157.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CBAA5E08F0 for ; Tue, 24 Apr 2018 19:02:47 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2F5CQClft9a/63mSC1bHAEBAQQBAQoBA?= =?us-ascii?q?YNDgVsoiA6DRBqMfYJpGpMDgXgeGAGEQAKCeSE0GAECAQEBAQEBAgICaCiFJQY?= =?us-ascii?q?6TwsNFBMSDwU1J4UPqGQaAoQ8g2mCOYgMVIEAP4EPglY1hT+CZIIEIAKHIjOQK?= =?us-ascii?q?AgCgWOMUodIFgyEcZFXHDmBUn0Ign6QaiMweAGQEgEB?= X-IPAS-Result: =?us-ascii?q?A2F5CQClft9a/63mSC1bHAEBAQQBAQoBAYNDgVsoiA6DRBq?= =?us-ascii?q?MfYJpGpMDgXgeGAGEQAKCeSE0GAECAQEBAQEBAgICaCiFJQY6TwsNFBMSDwU1J?= =?us-ascii?q?4UPqGQaAoQ8g2mCOYgMVIEAP4EPglY1hT+CZIIEIAKHIjOQKAgCgWOMUodIFgy?= =?us-ascii?q?EcZFXHDmBUn0Ign6QaiMweAGQEgEB?= X-IronPort-AV: E=Sophos;i="5.49,324,1520913600"; d="scan'208";a="28329641" Received: from unknown (HELO waltdnes.org) ([45.72.230.173]) by smtp.teksavvy.com with SMTP; 24 Apr 2018 15:02:45 -0400 Received: by waltdnes.org (sSMTP sendmail emulation); Tue, 24 Apr 2018 15:02:37 -0400 From: "Walter Dnes" Date: Tue, 24 Apr 2018 15:02:37 -0400 To: gentoo-user@lists.gentoo.org Subject: [gentoo-user] Re: Can't fetch distfiles in chroot Message-ID: <20180424190237.GA14336@waltdnes.org> References: <4356051.WLzaQ0rfat@peak> <1612823.vFOe9Gt5RW@peak> <20180423175309.GA9723@waltdnes.org> <1760097.84znORPb3o@peak> 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1760097.84znORPb3o@peak> User-Agent: Mutt/1.7.2 (2016-11-26) X-Archives-Salt: a4474520-c660-4a90-a031-219e1e486c45 X-Archives-Hash: 528b9e04bd074fa0f931fd725552e2bb On Tue, Apr 24, 2018 at 09:40:52AM +0100, Peter Humphrey wrote > > Anyway, this all leaves unanswered the question whether getting the > -march setting right in a chroot matters to the operation of the > chroot itself, as distinct from building good code for the target > machine. Personally, I can't see how it can have any such effect. "-march" obviously has to match the target machine that the compiled code will run on. You have to run the query... gcc -c -Q -march=native --help=target | grep march= ...on the "target machine" to get the necessary value. That's true, regardless of whether the "target machine" is physical hardware, or a chroot, or a VM like QEMU/VMWare/etc. Things can get ugly in some edge cases if the final code (-march=) cannot run in the build environment (-march=). 1) Tests run at the end of the build, on the build machine, will obviously fail. 2) Pale Moon (and I assume Firefox as well) use the compiled code at the end of the build process to generate a precompiled startup cache. I ran into this when I was manually building Pale Moon, targetted for my Atom netbook, using my Core2 desktop as the build machine. The "bonnell" cpu (ancient 32-bit-only Atom variant) has an instruction set called "MOVBE" that the Core 2 does not. Hence, the bonnell-targeted code would fail on the Core2 with "illegal instruction" and other weird errors. This will also happen building for an AMD (with "3DNOW!" instructions) on an intel CPU. That's "solved" by adding... ac_add_options --disable-precompiled-startupcache ...to the mozconfig, preventing execution of that code in the build environment. The side effect is that the first time a profile is opened after an install or upgrade on an end-user machine, it takes somewhat longer, because it has execute the compiled code on the end-user machine to generate the cache. -- Walter Dnes I don't run "desktop environments"; I run useful applications