From: Andre Przywara <andre.przywara@linaro.org>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: xen-devel@lists.xenproject.org, julien.grall@linaro.org,
patches@linaro.org, stefano.stabellini@eu.citrix.com
Subject: Re: [PATCH] ARM: refine compiler target architecture
Date: Wed, 18 Dec 2013 10:01:56 +0100 [thread overview]
Message-ID: <52B16484.9010006@linaro.org> (raw)
In-Reply-To: <1387355361.1025.40.camel@dagon.hellion.org.uk>
On 12/18/2013 09:29 AM, Ian Campbell wrote:
> 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.
eek.
>
>> $ 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.
Right. Well, we can force it, but it will not work ;-) Not sure if it
even links.
>> 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.
Right, this matches my quick research. armel should work, arm not.
>> 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?
Right, that sounds like a good thing. If I can find some time still this
week, I can try to come up with something.
> 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.
I agree. Lets push it out for 4.5.
I can write an email with the error message I got, the explanation and
the fix to the list to help people with this problem meanwhile. Google
should pick it up from the archives then ;-)
Regards,
Andre.
prev parent reply other threads:[~2013-12-18 9:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-17 9:34 [PATCH] ARM: refine compiler target architecture Andre Przywara
2013-12-17 10:21 ` Ian Campbell
2013-12-18 7:48 ` Andre Przywara
2013-12-18 8:29 ` Ian Campbell
2013-12-18 9:01 ` Andre Przywara [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52B16484.9010006@linaro.org \
--to=andre.przywara@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=julien.grall@linaro.org \
--cc=patches@linaro.org \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.