Re: Linux-5.2.8 configuration: Intel Atom x5-Z8330 and?CONFIG_MATOM
Ken Moffat <[email protected]> Wed, 12 Feb 2020 22:31:56 +0000
| Newsgroups | gmane.linux.lfs.general |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Feb 12, 2020 at 12:01:49AM -0000, Hans Malissa wrote: > On February 11, 2020 at 4:40 PM, Flareon <[email protected]> wrote: > On February 11, 2020, at 16:23, Hans Malissa <[email protected]> wrote: > > > > *cc1_cpu: > > %{march=native:%>march=native %:local_cpu_detect(arch) %{!mtune=*:%>mtune=native %:local_cpu_detect(tune)}} %{mtune=native:%>mtune=native %:local_cpu_detect(tune)} > > > > ... > > > > The fact that it says 'march=native', wouldn't that mean that gcc will figure out by itself that I'm working on Atom? If I'd start building LFS on a system where the kernel was built with CONFIG_MATOM, would I then end up with a LFS system that has been optimized for Atom support? Or do I manually have to change the CFLAGS/CXXFLAGS? > > > > Thanks a lot, > > > > Hans > > > Native means it will attempt to guess the arch currently in use. It should pick up the Atom processor by itself. If you want to be absolutely sure, then you can set CFLAGS and CXXFLAGS manually, but it's not required. I'm sure I'll be corrected if I miss anything. > > Thanks a lot! Is there a way to check what the 'native' setting is currently pointing to? > > Hans I think there might be a slight misunderstanding in your question, and the answer is correct : native is only used if it gets specified. The normal situation is to build binaries which will run on any processor on the generic architecture (with some exceptions wher packages such as gmp try to tune things for the build machine). If you do specify -march=native (as I mostly do for my own builds) then any package which respects your CFLAGS, CXXFLAGS will build binaries that might not run on a different sub-architecture (e.g. in mainstream intel SandyBridge should run on anything newer, but Skylake won't run on earlier processors, or for AMD amdfam10 should work on all AMD x86_64, but kaveri (fam15) won't work on ryzen (fam17) and vice-versa. Not specifying -march should build binaries which work on all of these variants. Perhaps some of the suggestions (not the first one!) at https://stackoverflow.com/questions/5470257/how-to-see-which-flags-march-native-will-activate may be helpful. For some (mainly desktop) packages, both LFS and BLFS, I made notes last July. Some packages do their best to ignore user-supplied CFLAGS etc. I made some notes last July, both on ensuring they used my specified -march and later to add optional gcc hardening flags. The direct link is http://www.linuxfromscratch.org/~ken/tuning/ and for some packages, getting them to do what I wanted was "interesting". In many cases it is necessary to add verbosity to see the CFLAGS, in others (often, Python stuff but also libreoffice) verbose builds still don't really tell you anything. And a few packages are of such restricted use (e.g. unzip) that I don't think I bothered getting them to use my CFLAGS. Have fun in your experiments. ĸen -- We had folksingers in the lower bar for six months back home where I worked. In the end we had to get a man in with a ferret. -- Polly, in "Interesting Times" -- http://lists.linuxfromscratch.org/listinfo/lfs-chat FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page