Re: how to distinguish armel and armhf at runtime?

2017-09-25 Thread Uwe Kleine-König
Hello, On 09/24/2017 12:55 AM, peter green wrote: >> 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

Re: how to distinguish armel and armhf at runtime?

2017-09-23 Thread Paul Wise
On Sun, Sep 24, 2017 at 2:42 AM, 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

Re: how to distinguish armel and armhf at runtime?

2017-09-23 Thread peter green
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

Re: how to distinguish armel and armhf at runtime?

2017-09-23 Thread Uwe Kleine-König
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 >

Re: how to distinguish armel and armhf at runtime?

2017-09-23 Thread Wookey
On 2017-09-22 21:57 +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

Re: how to distinguish armel and armhf at runtime?

2017-09-22 Thread Milan Kupcevic
On 09/22/2017 03:57 PM, Uwe Kleine-König wrote: > > 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

Re: how to distinguish armel and armhf at runtime?

2017-09-22 Thread Jeffrey Walton
On Fri, Sep 22, 2017 at 3:57 PM, Uwe Kleine-König wrote: >... > For armhf I need to define __ARM_PCS_VFP but that must be absent on armel. Forgive my ignorance... If the compiler was built for the native platform, then wouldn't the compiler and preprocessor definitions

Re: how to distinguish armel and armhf at runtime?

2017-09-22 Thread Steve McIntyre
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

Re: how to distinguish armel and armhf at runtime?

2017-09-22 Thread Uwe Kleine-König
On 09/22/2017 10:51 PM, John Paul Adrian Glaubitz wrote: > Override the signal for SIGILL, then try to execute an instruction that is > only available on either architecture, maybe? That won't work. On an armv7 which runs armel (but which could run armhf) the instruction will not fault but still

Re: how to distinguish armel and armhf at runtime?

2017-09-22 Thread John Paul Adrian Glaubitz
Override the signal for SIGILL, then try to execute an instruction that is only available on either architecture, maybe? Adrian > On Sep 22, 2017, at 9:57 PM, Uwe Kleine-König wrote: > > Hello, > > for the package sparse I have to distinguish armel and armhf. The

Re: how to distinguish armel and armhf at runtime?

2017-09-22 Thread Alan Corey
Yeah, and cat /proc/cpuinfo doesn't really help much either. I don't suppose it's kosher to look at some file names in /var/cache/apt/archives. I had that problem with a phone I installed Debian on a couple years ago. Finally gave up and left it armel when I could have gone to armhf (I think).

how to distinguish armel and armhf at runtime?

2017-09-22 Thread Uwe Kleine-König
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