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
Merged

Conversation

alexcrichton
Copy link
Member

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.

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
@rust-highfive
Copy link
Collaborator

r? @aturon

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

@alexcrichton
Copy link
Member Author

@alexcrichton alexcrichton added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Feb 6, 2017
@aturon
Copy link
Member

aturon commented Feb 6, 2017

@bors: r+

@bors
Copy link
Contributor

bors 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
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
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 8, 2017
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
@nox
Copy link
Contributor

nox commented Feb 8, 2017

@brson @alexcrichton Can we get this in 1.15.1?

@eddyb
Copy link
Member

eddyb commented Feb 8, 2017

@bors p=1 (nominated for beta)

@bors
Copy link
Contributor

bors commented Feb 8, 2017

⌛ Testing commit f98f6c7 with merge a20e288...

@bors
Copy link
Contributor

bors commented Feb 8, 2017

💔 Test failed - status-travis

@Ms2ger
Copy link
Contributor

Ms2ger 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
Copy link
Member Author

alexcrichton commented Feb 8, 2017 via email

@bors
Copy link
Contributor

bors commented Feb 8, 2017

⌛ Testing commit f98f6c7 with merge 14bc58f...

@bors
Copy link
Contributor

bors commented Feb 8, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member Author

alexcrichton commented Feb 8, 2017 via email

@bors
Copy link
Contributor

bors commented Feb 8, 2017

⌛ Testing commit f98f6c7 with merge 29dece1...

bors added a commit that referenced this pull request Feb 8, 2017
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
@bors
Copy link
Contributor

bors 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
@bors bors mentioned this pull request Feb 8, 2017
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Feb 9, 2017
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 alexcrichton added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Feb 9, 2017
@alexcrichton
Copy link
Member Author

Backported in #39667

@alexcrichton alexcrichton deleted the fpic branch February 9, 2017 01:00
alexcrichton added a commit to alexcrichton/rust that referenced this pull request Feb 9, 2017
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
[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
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
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
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Feb 11, 2017
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 1, 2019
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

UltraBlame original commit: 62adf4084bae5e2f6d49cd3c4c6cbfbc2691a2aa
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 1, 2019
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

UltraBlame original commit: 62adf4084bae5e2f6d49cd3c4c6cbfbc2691a2aa
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 1, 2019
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

UltraBlame original commit: 62adf4084bae5e2f6d49cd3c4c6cbfbc2691a2aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants