On Tuesday, 24 April 2018 20:02:37 BST Walter Dnes wrote: > 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=<target_machine>) cannot run in the > build environment (-march=<build_machine>).
--->8 Yes, I understand all that. In my case, the chroot is only used as a build environment; nothing ever runs in it except as part of the build process. Thanks for the extra detail. -- Regards, Peter.