Skip to content

Commit 29dece1

Browse files
committed
Auto merge of #39523 - alexcrichton:fpic, r=aturon
Pass -fPIC to native compiles on 32-bit This is apparently a regression from 1.14.0 to 1.15.0. Previously we passed `-fPIC` to C compilers on i686 targets, but the `gcc` crate apparently [explicitly] didn't do this. I don't recall why that was avoided but it was [previously passed by the makefiles][mk] and this seems to have [caused a regression][regression] in Firefox, so this commit reverts back to passing `-fPIC`. [explicitly]: rust-lang/cc-rs@362bdf20 [mk]: https://github.com/rust-lang/rust/blob/c781fc4a/mk/cfg/i686-unknown-linux-gnu.mk#L11 [regression]: https://bugzilla.mozilla.org/show_bug.cgi?id=1336155
2 parents 4379e2f + f98f6c7 commit 29dece1

12 files changed

+590
-418
lines changed

src/Cargo.lock

+10-10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/vendor/gcc/.cargo-checksum.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"f9b1ca6ae27d1c18215265024629a8960c31379f206d9ed20f64e0b2dcf79805",".travis.yml":"675ffe583db77282d010306f29e6d81e5070ab081deddd0300137dfbd2cb83de","Cargo.toml":"19bb617b74de761515ef5d087fd0e30912fda1d7c22fd04fa211236dab99a509","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"ecb2d93f4c81edbd48d8742ff7887dc0a4530a5890967839090bbc972d49bebe","appveyor.yml":"46c77d913eaa45871296942c2cd96ef092c9dcaf19201cb5c500a5107faeb06f","src/bin/gcc-shim.rs":"11edfe1fc6f932bd42ffffda5145833302bc163e0b87dc0d54f4bd0997ad4708","src/lib.rs":"7e7c60beccfdd145e876da81bb07dd09c5248dab0b26d93190bab4242799d51a","src/registry.rs":"3e2a42581ebb82e325dd5600c6571cef937b35003b2927dc618967f5238a2058","src/windows_registry.rs":"1f4211caec5a192b5f05c8a47efb27aa6a0ab976c659b9318a0cf603a28d6746","tests/cc_env.rs":"d92c5e3d3d43ac244e63b2cd2c93a521fcf124bf1ccf8d4c6bfa7f8333d88976","tests/support/mod.rs":"f4dad5a8133c3dd6678d9a3de057b82e624ef547b9b3e4ac9508a48962fc387b","tests/test.rs":"164220f11be2eebc20315826513999970660a82feff8cc4b15b4e9d73d98324e"},"package":"872db9e59486ef2b14f8e8c10e9ef02de2bccef6363d7f34835dedb386b3d950"}
1+
{"files":{".cargo-ok":"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",".gitignore":"4cc6445feac7e9a1f8f1e1c51cc3afd0cf7bb931e3c5a6f18c41258401652702",".travis.yml":"e68f9d10a8e367890cf734239c39952ee480cf0e8da9520b377df4a2b8ccc9e8","Cargo.toml":"4c5eb683d4c57fff819ebf564a8db93b5c87284993def6bc066ba1e311d5b090","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"b1a639560fd536f2c3ab708a8e1066b675edd4d018dfa4e5e18d0d7327d81c15","appveyor.yml":"46c77d913eaa45871296942c2cd96ef092c9dcaf19201cb5c500a5107faeb06f","src/bin/gcc-shim.rs":"d6be9137cb48b86891e7b263adbf492e1193ffe682db9ba4a88eb1079b874b58","src/lib.rs":"eb4ca086dd2ffa5e30f022f556d0def6d1142160da392afb328393b3f435e8f7","src/registry.rs":"3876ef9573e3bbc050aef41a684b9a510cc1a91b15ae874fe032cf4377b4d116","src/windows_registry.rs":"36c6a7f8322407faff2dcfd4789d0876d034885944bc0340ac7c1f7cbfc307f1","tests/cc_env.rs":"d92c5e3d3d43ac244e63b2cd2c93a521fcf124bf1ccf8d4c6bfa7f8333d88976","tests/support/mod.rs":"56bcfd1e2ff5ae8e581c71229444a3d96094bf689808808dd80e315bd6632083","tests/test.rs":"b63e74d571e7d585edc53693bcf0caae88fc040613ace91e32437d4a62cddb6a"},"package":"c07c758b972368e703a562686adb39125707cc1ef3399da8c019fc6c2498a75d"}

src/vendor/gcc/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
target
22
Cargo.lock
3+
.idea
4+
*.iml

src/vendor/gcc/.travis.yml

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ rust:
33
- stable
44
- beta
55
- nightly
6+
matrix:
7+
include:
8+
# Minimum version supported
9+
- rust: 1.6.0
10+
install:
11+
script: cargo build
12+
613
sudo: false
714
install:
815
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then OS=unknown-linux-gnu; else OS=apple-darwin; fi

src/vendor/gcc/Cargo.toml

+7-3
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
[package]
22

33
name = "gcc"
4-
version = "0.3.40"
4+
version = "0.3.43"
55
authors = ["Alex Crichton <alex@alexcrichton.com>"]
66
license = "MIT/Apache-2.0"
77
repository = "https://github.com/alexcrichton/gcc-rs"
8-
documentation = "http://alexcrichton.com/gcc-rs"
8+
documentation = "https://docs.rs/gcc"
99
description = """
1010
A build-time dependency for Cargo build scripts to assist in invoking the native
1111
C compiler to compile native C code into a static archive to be linked into Rust
1212
code.
1313
"""
1414
keywords = ["build-dependencies"]
1515

16+
[badges]
17+
travis-ci = { repository = "alexcrichton/gcc-rs" }
18+
appveyor = { repository = "alexcrichton/gcc-rs" }
19+
1620
[dependencies]
17-
rayon = { version = "0.4", optional = true }
21+
rayon = { version = "0.6", optional = true }
1822

1923
[features]
2024
parallel = ["rayon"]

src/vendor/gcc/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A library to compile C/C++ code into a Rust library/application.
55
[![Build Status](https://travis-ci.org/alexcrichton/gcc-rs.svg?branch=master)](https://travis-ci.org/alexcrichton/gcc-rs)
66
[![Build status](https://ci.appveyor.com/api/projects/status/onu270iw98h81nwv?svg=true)](https://ci.appveyor.com/project/alexcrichton/gcc-rs)
77

8-
[Documentation](http://alexcrichton.com/gcc-rs)
8+
[Documentation](https://docs.rs/gcc)
99

1010
A simple library meant to be used as a build dependency with Cargo packages in
1111
order to build a set of C/C++ files into a static archive. Note that while this
@@ -106,7 +106,9 @@ gcc = { version = "0.3", features = ["parallel"] }
106106
```
107107

108108
By default gcc-rs will limit parallelism to `$NUM_JOBS`, or if not present it
109-
will limit it to the number of cpus on the machine.
109+
will limit it to the number of cpus on the machine. If you are using cargo,
110+
use `-jN` option of `build`, `test` and `run` commands as `$NUM_JOBS`
111+
is supplied by cargo.
110112

111113
## Compile-time Requirements
112114

src/vendor/gcc/src/bin/gcc-shim.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ fn main() {
1010
for i in 0.. {
1111
let candidate = out_dir.join(format!("out{}", i));
1212
if candidate.exists() {
13-
continue
13+
continue;
1414
}
1515
let mut f = File::create(candidate).unwrap();
1616
for arg in env::args().skip(1) {
1717
writeln!(f, "{}", arg).unwrap();
1818
}
1919

2020
File::create(out_dir.join("libfoo.a")).unwrap();
21-
break
21+
break;
2222
}
2323
}

0 commit comments

Comments
 (0)