Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix autoconf CPU detection on Raspberry Pi 3 #96

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AlgorithMan-de
Copy link

Autoconf falsely detects an "armv7l" CPU on Cortex-A53
machines like several Raspberry Pi 3 models.

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

See also

Autoconf falsely detects an "armv7l" CPU on Cortex-A53
machines like several Raspberry Pi 3 models.

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
Autoconf falsely detects an "armv7l" CPU on Cortex
machines like several Raspberry Pi 3 and 4 models.

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
@PeterCoghlan
Copy link
Contributor

I know nothing about autoconf but I can confirm that this fix does allow me to compile Hercules on my Raspberry Pi 3 without having to disable optimisation.

When I do this, I get a warning about a possible unitinialised variable in tcpnje.c which I haven't seen before. The logic of the code ensures that the variable does get initialised but it's not obvious enough for the compiler to spot it as it happens on a previous trip around a big loop. I will look into finding a way to reassure the compiler about this.

@Fish-Git
Copy link
Contributor

Fish-Git commented Nov 9, 2020

When I do this, I get a warning about a possible unitinialised variable in tcpnje.c which I haven't seen before. The logic of the code ensures that the variable does get initialised but it's not obvious enough for the compiler to spot it as it happens on a previous trip around a big loop. I will look into finding a way to reassure the compiler about this.

Initialize the variable at the point where it is declared.

@AlgorithMan-de
Copy link
Author

b29ae59 also makes it work on Raspberry Pi 4. But I have communicated with the gcc and autoconf people about this and they suggested a cleaner way to integrate this fix into autoconf.ac

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