From: Ian Campbell Subject: Re: [PATCH] ARM: refine compiler target architecture Date: Wed, 18 Dec 2013 08:29:21 +0000 Message-ID: <1387355361.1025.40.camel@dagon.hellion.org.uk> References: <1387272871-2341-1-git-send-email-andre.przywara@linaro.org> <1387275661.27441.34.camel@kazak.uk.xensource.com> <52B1533A.30803@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VtCVd-0005NQ-29 for xen-devel@lists.xenproject.org; Wed, 18 Dec 2013 08:29:37 +0000 In-Reply-To: <52B1533A.30803@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andre Przywara Cc: xen-devel@lists.xenproject.org, julien.grall@linaro.org, patches@linaro.org, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, 2013-12-18 at 08:48 +0100, Andre Przywara wrote: > But actually the ABI is orthogonal to the -march setting, right? AFAIK > -march just controls which instruction the compiler emits and which > instructions the assembler allows. I thought they were subtly intertwined, even if technically they are orthogonal. > $ arm-linux-gnueabi-gcc -v > Target: arm-linux-gnueabi > ... --with-arch=armv4t ... > > This is pretty conservative, but the compiler is fine and with > -march=armv7-a -mfloat-abi=hard it even generates modern code. I think we can't force float-abi=hard unless the rest of the libraries on the system use it? Which won't be the case on armel. > Are there really people out there still using OABI? I thought the Debian armel port was OABI, it seems I was mistaken, sorry. From the native Debian armel compiler: $ gcc -v [...] Target: arm-linux-gnueabi Configured with: [...] --with-arch=armv4t --with-float=soft --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi [...] gcc version 4.8.2 (Debian 4.8.2-7) https://wiki.debian.org/ArmEabiPort confirms that I was wrong. The armhf port is EABI and v7: $ gcc -v [...] Target: arm-linux-gnueabihf Configured with: [...] --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf [...] gcc version 4.6.3 (Debian 4.6.3-14) > Do we care? I care about people not getting confused into think that things will work on such systems when it will not. The bugs resulting from an OABI vs EABI mismatch will likely be quite subtle. I guess this means the original Debian arm (not -el nor -hf) port which I suppose people are less likely to have these days. > Both compilers I tested (Slackware and Debian cross) are purely EABI, > but have less than armv7 as their default. I wonder if we can either add some option which will force EABI and therefore fail to build on an OABI system (maybe march v7 is that test given the age of OABI?) or add a configure check for struct alignment? In any case looking back to the original patch I am now convinced that it would be OK. I'm not sure about for 4.4 though, I'm a bit wary of changing compiler defaults at this stage. Ian.