Received: from eggs.gnu.org ([2001:4830:134:3::10]:35963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anXIb-0000dM-F2 for qemu-devel@nongnu.org; Tue, 05 Apr 2016 16:10:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1anXIX-0002Gm-AS for qemu-devel@nongnu.org; Tue, 05 Apr 2016 16:10:05 -0400 Received: from roura.ac.upc.es ([147.83.33.10]:54236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1anXIW-0002Fq-VJ for qemu-devel@nongnu.org; Tue, 05 Apr 2016 16:10:01 -0400 From: =?utf-8?Q?Llu=C3=ADs_Vilanova?= References: <1459834253-8291-1-git-send-email-cota@braap.org> <1459834253-8291-3-git-send-email-cota@braap.org> <87shz0tdr3.fsf@fimbulvetr.bsc.es> <87d1q4rplz.fsf@fimbulvetr.bsc.es> <5703E85C.7040900@twiddle.net> <87twjfria7.fsf@fimbulvetr.bsc.es> <57040ED6.2050202@twiddle.net> Date: Tue, 05 Apr 2016 22:09:54 +0200 In-Reply-To: <57040ED6.2050202@twiddle.net> (Richard Henderson's message of "Tue, 5 Apr 2016 12:15:34 -0700") Message-ID: <87egajq0kt.fsf@fimbulvetr.bsc.es> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 02/10] compiler.h: add QEMU_CACHELINE + QEMU_ALIGN() + QEMU_CACHELINE_ALIGNED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: MTTCG Devel , Peter Maydell , Peter Crosthwaite , QEMU Developers , "Emilio G. Cota" , Sergey Fedorov , Paolo Bonzini , Alex =?utf-8?Q?Benn=C3=A9e?= Richard Henderson writes: > On 04/05/2016 12:02 PM, Llu=C3=ADs Vilanova wrote: >> Peter Maydell writes: >>=20 >>> On 5 April 2016 at 17:31, Richard Henderson wrote: >>>> On 04/05/2016 09:23 AM, Llu=C3=ADs Vilanova wrote: >>>>>=20 >>>>> Got it! >>>>>=20 >>>>> gcc -march=3Dnative --help=3Dparams -v 2>&1 | grep "param >>>>> l1-cache-line-size" | sed -e 's/.* --param l1-cache-line-size=3D\([0-= 9]\+\) >>>>> .*/\1/' >>>>=20 >>>>=20 >>>> That will only work on x86, where we can be pretty sure it's 64 anyway. >>=20 >> Oh, you mean l1-cache-line-size is an x86-only parameter in GCC? > No, using -march=3Dnative to detect the host line size. Ah. That's just an example. For cross-compilation you would use a different march argument (or none to use the default target sub-arch) and get the parameter for the target processor. This should already be known by configu= re as part of the arguments to select the cross-compiler and target architecture (e.g., CC). Lluis