bug-autoconf
[Top][All Lists]
Advanced

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

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


From: Zack Weinberg
Subject: [sr #110360] AC_CANONICAL_HOST sets wrong $host_cpu on Raspberry Pi 3
Date: Wed, 4 Nov 2020 09:05:18 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #5, sr #110360 (project autoconf):

Yeah, I don't think there will ever be an official CPU-COMPANY-SYSTEM triplet
where CPU contains a dash.  That would break far too many existing parsers. 
Also, there are dozens of programs out there that expect $host_cpu to start
with "arm" for *all* ARM32 CPUs; "cortex-a53" doesn't fit that pattern.

Do I understand correctly that this package assumes that $host_cpu will always
be directly usable as the argument to GCC's `-march=` switch?  If so, I think
that's a bug in the package.  GCC has never guaranteed that that will work, as
far as I know.

> AS_IF([test "x$host_cpu" = 'armv7l'],[host_cpu=cortex-a53])

* This should be `test "x$host_cpu" = xarmv7l`; the x-trick requires a leading
x on _both_ operands to the comparison.
** In this case you don't need the x-trick, you can use `test "$host_cpu" =
armv7l`. After AC_CANONICAL_HOST, $host_cpu is guaranteed to be nonempty, and
not to start with a dash.
* Not all "armv7l" CPUs are Cortex-A53s.  You might need to parse the output
of `lscpu` yourself here.

If you tell me which package this is, I might be able to make some more
specific suggestions.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/support/?110360>

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]