Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Mar 2018 19:32:09 +0100
From:      Christian Ullrich <chris@chrullrich.net>
To:        Warner Losh <imp@bsdimp.com>, Dimitry Andric <dim@freebsd.org>
Cc:        FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org>
Subject:   Re: "Cross" building for same architecture, different CPUTYPE
Message-ID:  <f24d5c35-2afe-1c88-c197-5d16dad80633@chrullrich.net>
In-Reply-To: <CANCZdfqzZrjseYZybt%2BcDv5MLJEK5uZqtGvJCnPrLC6TNtBrJg@mail.gmail.com>
References:  <2126f358-c827-ecf0-109b-0488c5b155b6@chrullrich.net> <D30A88D2-6DFB-4535-8735-C71A43DEEB6B@FreeBSD.org> <CANCZdfqzZrjseYZybt%2BcDv5MLJEK5uZqtGvJCnPrLC6TNtBrJg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
* Warner Losh wrote:

> On Sun, Mar 4, 2018 at 10:43 AM, Dimitry Andric <dim@freebsd.org 
> <mailto:dim@freebsd.org>> 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.

-- 
Christian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f24d5c35-2afe-1c88-c197-5d16dad80633>