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

mk: Request -march=i686 on i686 Linux #34578

Conversation

alexcrichton
Copy link
Member

Apparently the gcc on our dist bot is so old and/or obscure that the default
-m32 switch doesn't think it can generate i686 code (or something like that).
The compiler-rt build system probes for the __i686__ define in GCC to compile
for an i686 (vs i386) target, so this was failing on the bots.

This tweaks instead to pass -march=i686 on i686-unknown-linux-gnu to C code to
ensure that we're compiling for i686 instead of i386. This should hopefully not
actually have an impact other than maybe doing some random optimization it
wasn't able to do so before. In theory this isn't making the target less
compatible as all Rust code is already compiled for i686.

Hopefully closes #34572

Apparently the gcc on our dist bot is so old and/or obscure that the default
`-m32` switch doesn't think it can generate i686 code (or something like that).
The compiler-rt build system probes for the `__i686__` define in GCC to compile
for an i686 (vs i386) target, so this was failing on the bots.

This tweaks instead to pass `-march=i686` on i686-unknown-linux-gnu to C code to
ensure that we're compiling for i686 instead of i386. This should hopefully not
actually have an impact other than maybe doing some random optimization it
wasn't able to do so before. In theory this isn't making the target less
compatible as all Rust code is already compiled for i686.

Hopefully closes rust-lang#34572
@rust-highfive
Copy link
Collaborator

r? @brson

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

@brson
Copy link
Contributor

brson commented Jun 30, 2016

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Jun 30, 2016

📌 Commit ab06ace has been approved by brson

@nagisa
Copy link
Member

nagisa commented Jun 30, 2016

In theory this isn't making the target less compatible as all Rust code is already compiled for i686.

In practice we do distribute builds for targets like i586-pc-windows-msvc, which is not i686 and invalidates the second part of that sentence. i686 has following instructions which aren’t supported by i586: CMOV**, SYSENTER, SYSEXIT and UD2.

OTOH this PR is correct since it only tweaks flags for a i686 linux target, but I feel like you may want to pass such flag for other i686 targets as well.

@alexcrichton
Copy link
Member Author

Yes that's why I just changed this for i686-unknown-linux-gnu and not others. It doesn't really matter in the long run anyway because we have essentially no C code to begin with, this is purely just getting the nightlies working again.

@bors
Copy link
Contributor

bors commented Jul 1, 2016

⌛ Testing commit ab06ace with merge a89ce32...

@bors
Copy link
Contributor

bors commented Jul 1, 2016

💔 Test failed - auto-linux-64-x-android-t

@eddyb
Copy link
Member

eddyb commented Jul 1, 2016

@bors retry

@bors
Copy link
Contributor

bors commented Jul 1, 2016

💔 Test failed - auto-win-msvc-64-opt-rustbuild

@alexcrichton
Copy link
Member Author

alexcrichton commented Jul 1, 2016

@bors
Copy link
Contributor

bors commented Jul 1, 2016

💔 Test failed - auto-linux-64-x-android-t

@alexcrichton
Copy link
Member Author

@bors: retry

@bors
Copy link
Contributor

bors commented Jul 1, 2016

⌛ Testing commit ab06ace with merge 9436292...

@bors
Copy link
Contributor

bors commented Jul 1, 2016

💔 Test failed - auto-win-msvc-64-opt-rustbuild

@alexcrichton
Copy link
Member Author

@bors: retry

On Fri, Jul 1, 2016 at 12:17 PM, bors [email protected] wrote:

💔 Test failed - auto-win-msvc-64-opt-rustbuild
https://buildbot.rust-lang.org/builders/auto-win-msvc-64-opt-rustbuild/builds/1641


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#34578 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAD95NqqKENm8B0c3pJRcw-Ml1WNAatPks5qRWevgaJpZM4JCZRq
.

@bors
Copy link
Contributor

bors commented Jul 1, 2016

⌛ Testing commit ab06ace with merge 5661be0...

bors added a commit that referenced this pull request Jul 1, 2016
…nightlies, r=brson

mk: Request -march=i686 on i686 Linux

Apparently the gcc on our dist bot is so old and/or obscure that the default
`-m32` switch doesn't think it can generate i686 code (or something like that).
The compiler-rt build system probes for the `__i686__` define in GCC to compile
for an i686 (vs i386) target, so this was failing on the bots.

This tweaks instead to pass `-march=i686` on i686-unknown-linux-gnu to C code to
ensure that we're compiling for i686 instead of i386. This should hopefully not
actually have an impact other than maybe doing some random optimization it
wasn't able to do so before. In theory this isn't making the target less
compatible as all Rust code is already compiled for i686.

Hopefully closes #34572
@bors bors merged commit ab06ace into rust-lang:master Jul 1, 2016
@alexcrichton alexcrichton deleted the lets-just-keep-trying-to-fix-the-nightlies branch July 7, 2016 16:41
alexcrichton added a commit to rust-lang/cc-rs that referenced this pull request Jul 15, 2016
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.

No nightlies for several consecutive days
6 participants