[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how to distinguish armel and armhf at runtime?



On 23/09/17 19:42, Uwe Kleine-König wrote:
On Sat, Sep 23, 2017 at 02:08:28AM +0100, Steve McIntyre wrote:
On Fri, Sep 22, 2017 at 09:57:02PM +0200, Uwe Kleine-König wrote:
Hello,

for the package sparse I have to distinguish armel and armhf. The reason
is that sparse parses system headers and so has to know which cpp
symbols to define. Usually it uses uname -m to distinguish platforms but
that isn't suitable to tell armel and armhf apart.

For armhf I need to define __ARM_PCS_VFP but that must be absent on armel.
Right, that makes sense.

For upstreaming a fix it would be great if the test would not be Debian
specific.
That's likely to be difficult - it's perfectly possible to have
headers etc. for both on a single system with multi-arch (for
example). It's an ABI choice, not a hardware difference.

What are you trying to work this out for? Package build time?
No, it's for run time. The target is sparse which can parse C and to be
able to handle system includes it needs the right cpp variables defined.
Are people expected to have gcc installed when using this tool? if so gcc -dumpmachine may be an option.



Reply to: