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

Pass -fPIC to native compiles on 32-bit #39523

Merged
merged 1 commit into from Feb 8, 2017

Conversation

@alexcrichton
Copy link
Member

commented Feb 4, 2017

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 and this
seems to have caused a regression in Firefox, so this
commit reverts back to passing -fPIC.

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]: alexcrichton/cc-rs@362bdf2
[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
@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Feb 4, 2017

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton

This comment has been minimized.

@aturon

This comment has been minimized.

Copy link
Member

commented Feb 6, 2017

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Feb 6, 2017

📌 Commit f98f6c7 has been approved by aturon

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 7, 2017

Rollup merge of rust-lang#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]: alexcrichton/cc-rs@362bdf2
[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

bors added a commit that referenced this pull request Feb 7, 2017

Auto merge of #39605 - frewsxcv:rollup, r=frewsxcv
Rollup of 18 pull requests

- Successful merges: #38764, #39361, #39400, #39426, #39431, #39482, #39512, #39523, #39557, #39561, #39582, #39583, #39586, #39587, #39598, #39599, #39601, #39604
- Failed merges:

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 7, 2017

Rollup merge of rust-lang#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]: alexcrichton/cc-rs@362bdf2
[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

bors added a commit that referenced this pull request Feb 7, 2017

Auto merge of #39609 - frewsxcv:rollup, r=frewsxcv
Rollup of 18 pull requests

- Successful merges: #38764, #39361, #39400, #39426, #39431, #39482, #39523, #39557, #39561, #39582, #39583, #39586, #39587, #39598, #39599, #39601, #39602, #39604
- Failed merges:

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 8, 2017

Rollup merge of rust-lang#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]: alexcrichton/cc-rs@362bdf2
[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

bors added a commit that referenced this pull request Feb 8, 2017

bors added a commit that referenced this pull request Feb 8, 2017

@nox

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2017

@brson @alexcrichton Can we get this in 1.15.1?

@eddyb

This comment has been minimized.

Copy link
Member

commented Feb 8, 2017

@bors p=1 (nominated for beta)

@bors

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2017

⌛️ Testing commit f98f6c7 with merge a20e288...

bors added a commit that referenced this pull request Feb 8, 2017

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]: alexcrichton/cc-rs@362bdf2
[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
@bors

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2017

💔 Test failed - status-travis

@Ms2ger

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2017

---- [run-pass] run-pass/issue-24227.rs stdout ----

	

error: compilation failed!

status: exit code: 101

command: /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/bin/rustc /Users/travis/build/rust-lang/rust/src/test/run-pass/issue-24227.rs -L /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-pass --target=x86_64-apple-darwin --error-format json -L /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-pass/issue-24227.stage2-x86_64-apple-darwin.run-pass.libaux -C prefer-dynamic -o /Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-pass/issue-24227.stage2-x86_64-apple-darwin -Crpath -O -Lnative=/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/native/rust-test-helpers

stdout:

------------------------------------------

------------------------------------------

stderr:

------------------------------------------

{"message":"linking with `cc` failed: exit code: 254","code":null,"level":"error","spans":[],"children":[{"message":"\"cc\" \"-m64\" \"-L\" \"/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib\" \"/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-pass/issue-24227.0.o\" \"-o\" \"/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-pass/issue-24227.stage2-x86_64-apple-darwin\" \"-Wl,-dead_strip\" \"-nodefaultlibs\" \"-L\" \"/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-pass\" \"-L\" \"/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-pass/issue-24227.stage2-x86_64-apple-darwin.run-pass.libaux\" \"-L\" \"/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/native/rust-test-helpers\" \"-L\" \"/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib\" \"-L\" \"/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib\" \"-l\" \"std-babe254b64e6389b\" \"/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/stage2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-a156453e4a4418dc.rlib\" \"-l\" \"System\" \"-l\" \"pthread\" \"-l\" \"c\" \"-l\" \"m\" \"-Wl,-rpath,@loader_path/../../stage2/lib/rustlib/x86_64-apple-darwin/lib\" \"-Wl,-rpath,/usr/local/lib/rustlib/x86_64-apple-darwin/lib\"","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"ld: warning: directory not found for option '-L/Users/travis/build/rust-lang/rust/build/x86_64-apple-darwin/test/run-pass/issue-24227.stage2-x86_64-apple-darwin.run-pass.libaux'\nclang: error: unable to execute command: Segmentation fault: 11\nclang: error: linker command failed due to signal (use -v to see invocation)\n","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":null}

{"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":null}

------------------------------------------

thread '[run-pass] run-pass/issue-24227.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2575
@alexcrichton

This comment has been minimized.

Copy link
Member Author

commented Feb 8, 2017

@bors

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2017

⌛️ Testing commit f98f6c7 with merge 14bc58f...

bors added a commit that referenced this pull request Feb 8, 2017

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]: alexcrichton/cc-rs@362bdf2
[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
@bors

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2017

💔 Test failed - status-travis

@alexcrichton

This comment has been minimized.

Copy link
Member Author

commented Feb 8, 2017

@bors

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2017

⌛️ Testing commit f98f6c7 with merge 29dece1...

bors added a commit that referenced this pull request Feb 8, 2017

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]: alexcrichton/cc-rs@362bdf2
[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
@bors

This comment has been minimized.

Copy link
Contributor

commented Feb 8, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: aturon
Pushing 29dece1 to master...

@bors bors merged commit f98f6c7 into rust-lang:master Feb 8, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
@bors bors referenced this pull request Feb 8, 2017

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Feb 9, 2017

rustbuild: Pass -fPIC on 32-bit non-Windows platforms
This is a smaller and more targeted backport of rust-lang#39523 which drives to the heart
of the issue, just passing `-fPIC` on 32-bit platforms. More rationale for this
commit can be found in rust-lang#39523 itself.
@alexcrichton

This comment has been minimized.

Copy link
Member Author

commented Feb 9, 2017

Backported in #39667

@alexcrichton alexcrichton deleted the alexcrichton:fpic branch Feb 9, 2017

alexcrichton added a commit to alexcrichton/rust that referenced this pull request Feb 9, 2017

rustbuild: Pass -fPIC on 32-bit non-Windows platforms
This is a smaller and more targeted backport of rust-lang#39523 which drives to the heart
of the issue, just passing `-fPIC` on 32-bit platforms. More rationale for this
commit can be found in rust-lang#39523 itself.

bors added a commit that referenced this pull request Feb 9, 2017

Auto merge of #39667 - alexcrichton:beta-next, r=brson
[beta] rustbuild: Pass -fPIC on 32-bit non-Windows platforms

This is a smaller and more targeted backport of #39523 which drives to the heart
of the issue, just passing `-fPIC` on 32-bit platforms. More rationale for this
commit can be found in #39523 itself.

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Feb 10, 2017

Bug 1336155 - Update linux32 rust builders to use -fPIC. r=mshal
Use a custom build of rust 1.15.1 with an additional bump of the
gcc crate to 0.3.43 to pass -fPIC to the C compiler on i686-linux.

While 1.15.1 was tagged today, there's some question as to whether
it would be released from the tag or if the tag would be moved
to incorporate this fix.

This works around the issue with text segment relocations with
the 1.15.0 stable release. For more information see the upstream
issue at rust-lang/rust#39523

MozReview-Commit-ID: 83IxtJeJxlh

--HG--
extra : rebase_source : 8deda9058c77a98c65a46949768702c56296d9d4

Manishearth pushed a commit to Manishearth/gecko-dev that referenced this pull request Feb 10, 2017

Bug 1336155 - Update linux32 rust builders to use -fPIC. r=mshal
Use a custom build of rust 1.15.1 with an additional bump of the
gcc crate to 0.3.43 to pass -fPIC to the C compiler on i686-linux.

While 1.15.1 was tagged today, there's some question as to whether
it would be released from the tag or if the tag would be moved
to incorporate this fix.

This works around the issue with text segment relocations with
the 1.15.0 stable release. For more information see the upstream
issue at rust-lang/rust#39523

MozReview-Commit-ID: 83IxtJeJxlh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.