[sr #110360] AC_CANONICAL_HOST sets wrong $host_cpu on Raspberry Pi 3

2020-11-07 Thread Viktor Engelmann
Follow-up Comment #10, sr #110360 (project autoconf):

@Zack: you are right, that's a cleaner solution. I will do it like that, Thank
you very much :-)

Looking at https://en.wikipedia.org/wiki/ARM_Cortex-A and
https://en.wikipedia.org/wiki/ARM_architecture I would say that cortex-a53 is
a *CPU* (so should be admissible as value for $host_cpu) while armv7l is an
*architecture* and should not be an admissible value for $host_*cpu*.
armcortex-aXX or arm7cortex-aXX might be a compromise to not break scripts
that check for arm*
But that would have to be agreed on with the gcc folks, cf.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70210

If $host_cpu isn't supposed to hold a fitting value for -mcpu, then what is
the recommended way to get a value for -mcpu in the GNU Toolchain? I don't
think that an application programmer should have to deal with that question.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110360] AC_CANONICAL_HOST sets wrong $host_cpu on Raspberry Pi 3

2020-11-04 Thread Viktor Engelmann
Follow-up Comment #7, sr #110360 (project autoconf):

It works on both models with

host_cpu=$(LANG=en_US lscpu | grep 'Model name' | cut -d: -f2 | tr '[:upper:]'
'[:lower:]')

I'm thinking about how you would cross-compile to Raspberry... you'd have to
set a --host, but couldn't set that to cortex-aXX. The CPU names never contain
underscores, do they? So you could specify --host=cortex_a53-os-abi or return
cortex_a53-os-abi from config.guess and sed s/_/-/g that somewhere in
AC_CANONICAL_HOST...

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110360] AC_CANONICAL_HOST sets wrong $host_cpu on Raspberry Pi 3

2020-11-04 Thread Viktor Engelmann
Follow-up Comment #6, sr #110360 (project autoconf):

I have tested the most recent config.guess and config.sub on a Raspberry Pi 4
now - and I see "armv7l" there, too. That is a Cortex-A73, though.

Yes, I think $host_cpu is passed to -mcpu at least if it starts with "arm".
It's this project: 
https://github.com/rbowler/spinhawk/pull/96

I have the x-trick right in the configure.ac - I just mistyped it when I put
it here. Sorry for the noise.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110360] AC_CANONICAL_HOST sets wrong $host_cpu on Raspberry Pi 3

2020-11-04 Thread Viktor Engelmann
Follow-up Comment #4, sr #110360 (project autoconf):

@Jannick
Thanks! I didn't want to pass a --host, because that would break
cross-platform compatibility. So I have put this into configure.ac

> 
> # override host_cpu in in special case (having dash)
> AS_IF([test "x$host_cpu" = 'armv7l'],[host_cpu=cortex-a53])
> AC_SUBST([host_cpu])
> 

That works without setting --host.
Not a perfect solution, but a suitable workaround.

I had tried something like that before, but had used BASH syntax, which hadn't
worked.

> @Zack:  Not sure if AC_CONONICAL_HOST and cousins should be prepared to be
able to digest also quadruplets config.sub might generate?

As I said, quadruples do produce an error

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110360] AC_CANONICAL_HOST sets wrong $host_cpu on Raspberry Pi 3

2020-11-04 Thread Viktor Engelmann
Follow-up Comment #2, sr #110360 (project autoconf):

config.guess prints armv7l-unknown-linux-gnueabihf

I just pulled the most recent versions of config.guess and config.sub to be
sure. Same problem.

Not sure how these 2 CAN respond, to get a cpu with a dash through the rest of
autoconf...

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[sr #110360] AC_CANONICAL_HOST sets wrong $host_cpu on Raspberry Pi 3

2020-11-03 Thread Viktor Engelmann
Additional Item Attachment, sr #110360 (project autoconf):

File name: config.log Size:299 KB




___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/