Skip to content

Commit

Permalink
Bug 1739040 - Pick cc upstream patch for GCC 11 on armhf linux. r=emilio
Browse files Browse the repository at this point in the history
  • Loading branch information
glandium committed Nov 3, 2021
1 parent 9a1e4f7 commit ddbe375
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 180 deletions.
5 changes: 5 additions & 0 deletions .cargo/config.in
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ git = "https://github.com/bytecodealliance/wasmtime"
replace-with = "vendored-sources"
rev = "824fa69756523f2b6d49029fe25de94130b1f144"

[source."https://github.com/alexcrichton/cc-rs/"]
git = "https://github.com/alexcrichton/cc-rs/"
replace-with = "vendored-sources"
rev = "b2f6b146b75299c444e05bbde50d03705c7c4b6e"

[source.crates-io]
replace-with = "vendored-sources"

Expand Down
3 changes: 1 addition & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,8 @@ path = "third_party/rust/prost-derive"
# Patched to work around https://github.com/rust-lang/rust/issues/88576
[patch.crates-io.winapi-util]
path = "third_party/rust/winapi-util"

# Pick upstream patch for GCC 11 on armhf linux.
[patch.crates-io.cc]
git = "https://github.com/alexcrichton/cc-rs/"
rev = "b2f6b146b75299c444e05bbde50d03705c7c4b6e"
2 changes: 1 addition & 1 deletion third_party/rust/cc/.cargo-checksum.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"files":{"Cargo.lock":"c709d9de00dae7ef6d4a6ac36b56d6c0c4b1362cbfd7ed34e24c59471bef9d00","Cargo.toml":"eb6b50e2773484e0989864189cce7bb884b2893ccdb0370a628682922bcbc8db","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"1fd66e1fe6d618030b9452c667e89d7a31b27331ad831d83b41f9762fd6858d4","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"4e4ad7228f6e5ac084022b2ed3dd5423212bedfa16d71b1949e7865f4a9c406e","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/vs_instances.rs":"2d3f8278a803b0e7052f4eeb1979b29f963dd0143f4458e2cb5f33c4e5f0963b","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"d8f3014140d637b50a1fa4a9739b3617299ab43f829e65b2728f515a969a5376","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"16274867f23871e9b07614eda4c7344da13d1751fed63d4f633857e40be86394","tests/test.rs":"65c073e0e2cf4aa0433066102788e9f57442719e6f32f5ad5248aa7132bb4597"},"package":"79c2681d6594606957bbb8631c4b90a7fcaaa72cdb714743a437b156d6a7eedd"}
{"files":{"Cargo.toml":"c5c25a7f7994d67c8fc25cb5add9c54d4d75c186cd605353ff021b634032aab7","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"1fd66e1fe6d618030b9452c667e89d7a31b27331ad831d83b41f9762fd6858d4","src/bin/gcc-shim.rs":"b77907875029494b6288841c3aed2e4939ed40708c7f597fca5c9e2570490ca6","src/com.rs":"bcdaf1c28b71e6ef889c6b08d1ce9d7c0761344a677f523bc4c3cd297957f804","src/lib.rs":"20f6fce88058fe2c338a8a7bb21570c796425a6f0c2f997cd64740835c1b328c","src/registry.rs":"3cc1b5a50879fa751572878ae1d0afbfc960c11665258492754b2c8bccb0ff5d","src/setup_config.rs":"7014103587d3382eac599cb76f016e2609b8140970861b2237982d1db24af265","src/vs_instances.rs":"2d3f8278a803b0e7052f4eeb1979b29f963dd0143f4458e2cb5f33c4e5f0963b","src/winapi.rs":"ea8b7edbb9ff87957254f465c2334e714c5d6b3b19a8d757c48ea7ca0881c50c","src/windows_registry.rs":"d8f3014140d637b50a1fa4a9739b3617299ab43f829e65b2728f515a969a5376","tests/cc_env.rs":"e02b3b0824ad039b47e4462c5ef6dbe6c824c28e7953af94a0f28f7b5158042e","tests/cflags.rs":"57f06eb5ce1557e5b4a032d0c4673e18fbe6f8d26c1deb153126e368b96b41b3","tests/cxxflags.rs":"c2c6c6d8a0d7146616fa1caed26876ee7bc9fcfffd525eb4743593cade5f3371","tests/support/mod.rs":"16274867f23871e9b07614eda4c7344da13d1751fed63d4f633857e40be86394","tests/test.rs":"65c073e0e2cf4aa0433066102788e9f57442719e6f32f5ad5248aa7132bb4597"},"package":null}
155 changes: 0 additions & 155 deletions third_party/rust/cc/Cargo.lock

This file was deleted.

38 changes: 16 additions & 22 deletions third_party/rust/cc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2018"
name = "cc"
version = "1.0.71"
authors = ["Alex Crichton <[email protected]>"]
exclude = ["/.github", "/.travis.yml", "/appveyor.yml"]
description = "A build-time dependency for Cargo build scripts to assist in invoking the native\nC compiler to compile native C code into a static archive to be linked into Rust\ncode.\n"
license = "MIT/Apache-2.0"
repository = "https://github.com/alexcrichton/cc-rs"
homepage = "https://github.com/alexcrichton/cc-rs"
documentation = "https://docs.rs/cc"
readme = "README.md"
description = """
A build-time dependency for Cargo build scripts to assist in invoking the native
C compiler to compile native C code into a static archive to be linked into Rust
code.
"""
keywords = ["build-dependencies"]
readme = "README.md"
categories = ["development-tools::build-utils"]
license = "MIT/Apache-2.0"
repository = "https://github.com/alexcrichton/cc-rs"
[dependencies.jobserver]
version = "0.1.16"
optional = true
[dev-dependencies.tempfile]
version = "3"
exclude = ["/.github", "/.travis.yml", "/appveyor.yml"]
edition = "2018"

[dependencies]
jobserver = { version = "0.1.16", optional = true }

[features]
parallel = ["jobserver"]

[dev-dependencies]
tempfile = "3"
5 changes: 5 additions & 0 deletions third_party/rust/cc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1638,6 +1638,11 @@ impl Build {
&& (target.contains("-linux-") || target.contains("-kmc-solid_"))
{
cmd.args.push("-march=armv7-a".into());

if target.ends_with("eabihf") {
// lowest common denominator FPU
cmd.args.push("-mfpu=vfpv3-d16".into());
}
}

// (x86 Android doesn't say "eabi")
Expand Down

0 comments on commit ddbe375

Please sign in to comment.