From owner-freebsd-stable@freebsd.org Mon Mar 5 16:56:43 2018 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18236F3EF08 for ; Mon, 5 Mar 2018 16:56:43 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Received: from plan-b.pwste.edu.pl (plan-b.pwste.edu.pl [89.188.221.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "plan-b.pwste.edu.pl", Issuer "plan-b.pwste.edu.pl" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 81AB1827DC for ; Mon, 5 Mar 2018 16:56:42 +0000 (UTC) (envelope-from zarychtam@plan-b.pwste.edu.pl) Received: from plan-b.pwste.edu.pl (zarychtam@localhost [127.0.0.1]) by plan-b.pwste.edu.pl (8.15.2/8.15.2) with ESMTPS id w25Gl0Ao069751 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 5 Mar 2018 17:47:00 +0100 (CET) (envelope-from zarychtam@plan-b.pwste.edu.pl) Received: (from zarychtam@localhost) by plan-b.pwste.edu.pl (8.15.2/8.15.2/Submit) id w25Gl0IP069750; Mon, 5 Mar 2018 17:47:00 +0100 (CET) (envelope-from zarychtam) Date: Mon, 5 Mar 2018 17:47:00 +0100 From: Marek Zarychta To: Christian Ullrich Cc: freebsd-stable@freebsd.org Subject: Re: "Cross" building for same architecture, different CPUTYPE Message-ID: <20180305122207.GA37743@plan-b.pwste.edu.pl> References: <2126f358-c827-ecf0-109b-0488c5b155b6@chrullrich.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Mar 2018 16:56:43 -0000 On Sun, Mar 04, 2018 at 07:32:09PM +0100, Christian Ullrich wrote: > * Warner Losh wrote: > > > On Sun, Mar 4, 2018 at 10:43 AM, Dimitry Andric > > wrote: > > > > Again, this depends on how exactly you are overriding CPUTYPE. > > > > I'd suggest *NOT* setting CPUTYPE and instead using TARGET_CPUTYPE to do > > these sorts of things. CPUTYPE is known to only work on native builds > > Doesn't work either, sorry: > > [chul@build /usr/obj/slm/usr/src/tmp/legacy/usr/bin]$ CCACHE_DISABLE=yes > MAKEOBJDIRPREFIX=/usr/obj/slm make TARGET_CPUTYPE=slm -j4 buildworld > buildkernel > ... > [chul@build /usr/obj/slm/usr/src/tmp/legacy/usr/bin]$ objdump -d install > | fgrep '(bad)' | wc -l > 8345 > > This objdump (in base, "GNU objdump 2.17.50 [FreeBSD] 2007-07-03") does > not understand AVX, and most of the (bad)s are c4 and c5 prefixes, aka AVX. > > For /usr/obj/slm/usr/src/lib/libc/libc.so.7 I get a lot of (bad), too, > but these seem to be instructions that the chip actually has, only the > old objdump does not know them. > > The same happens with the TARGET_CPUTYPE in make.conf , and also if I > spell it "silvermont". bsd.cpu.mk turns "slm" into "silvermont", but > somehow it ends up as "-march=slm" on the command line again. gcc's docs > say "-march=silvermont", and clang is apparently notorious for not > providing any useful detail on what architecture variants it supports. > > Should I try make release? I'm really interesting in something that will > bring down build time, because buildworld/buildkernel on the Atom takes > 24 hours without ccache and at least 8 with. Maybe you should try to build using different make.conf(5) files for each build? It can be improved WITH_META_MODE=YES enabled in src-env.conf (requires loading filemon(4) first) and two differnt object directories mounted in /usr/obj with nullfs(5). I do such crossbuilds for some time compiling kernel and world for core2 on admfam10. Full build of STABLE takes usually < 10 minutes on 8 years old Phenom II. -- Marek Zarychta