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 armhf build for GCC-11 #627

Merged
merged 1 commit into from Oct 14, 2021
Merged

Conversation

infinity0
Copy link
Contributor

GCC 11 changed the default flag to put the FP option in the -march flag (arm7-a+fp) rather than a specific FPU flag. Therefore it needs to be given separately now.

See https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1939379 for some more details.

Example build failure is here: https://buildd.debian.org/status/fetch.php?pkg=rustc&arch=armhf&ver=1.55.0%2Bdfsg1-1&stamp=1634161880&raw=0

GCC 11 changed the default flag to put the FP option in the -march flag (arm7-a+fp) rather than a specific FPU flag. Therefore it needs to be given separately now.

See https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1939379 for some more details.
@infinity0
Copy link
Contributor Author

Note: the snippet I added is already part of another armv7-a case further below in the file. I'm actually not entirely clear why there are 2 cases to handle these similar situations; both add armv7-a as a flag, but are based on the slightly different conditions target.starts_with("armv7a") vs target.starts_with("armv7"). Anyway, it works to fix the Debian build failure.

@infinity0
Copy link
Contributor Author

@alexcrichton
Copy link
Member

Personally I have no idea how these flags are managed, this crate is just the conglomeration of years of adding various flags, it's not like I understand 100% what all the flags are (or anyone else really). If this works for you then it's probably fine for others too.

@alexcrichton alexcrichton merged commit b2f6b14 into rust-lang:master Oct 14, 2021
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.

None yet

2 participants