Skip to content

Conversation

@AlgorithMan-de
Copy link

Autoconf falsely detects an "armv7l" CPU on Cortex
machines like several Raspberry Pi 3 and 4 models,
when they run in 32 bit mode (which they do in
current versions of Raspberry Pi OS (previously
called Raspbian).

This change works around the issue by correcting the
host_cpu in configure.ac.

See also

Autoconf falsely detects an "armv7l" CPU on Cortex
machines like several Raspberry Pi 3 and 4 models,
when they run in 32 bit mode (which they do in
current versions of Raspberry Pi OS (previously
called Raspbian).

This change works around the issue by correcting the
host_cpu in configure.ac.

See also
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70210
- https://savannah.gnu.org/support/index.php?110360
@Hiearl77
Copy link

Good

@PeterCoghlan
Copy link
Contributor

This doesn't work for me.

lscpu | grep 'Model name' | cut -d: -f2 | xargs | tr '[:upper:]' '[:lower:]' results in the following output:

armv7 processor rev 4 (v7l)

and assigning this string to host_cpu is results in failures when make is run.

The original suggestion of setting host_cpu to cortex-a53 works ok for me but I don't know if it works in every other possible case.

@AlgorithMan-de
Copy link
Author

host_cpu=cortex-a53 works on Raspberry Pi 3, but Raspberry Pi 4 has cortex-a72. It might be backwards compatible.

would host_cpu=armv7 work? Then another
... | cut -d' ' -f1
should fix it

@AlgorithMan-de
Copy link
Author

armv7 doesn't seem to be a legal value, but arm7 is. So
... | cut -d' ' -f1 | sed 's/armv/arm/'
should do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants