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

specify the cpu type for LLVM for OpenBSD target #31727

Merged
merged 1 commit into from
Feb 18, 2016

Conversation

semarie
Copy link
Contributor

@semarie semarie commented Feb 17, 2016

The initial purpose is to workaround the LLVM bug
https://llvm.org/bugs/show_bug.cgi?id=26554 for OpenBSD.

By default, the cpu is defined to generic. But with a 64bit
processor, the optimization for generic will use invalid asm code as
NOP (the generated code for NOP isn't a NOP).

According to #20777, "x86-64" is the right thing to do for x86_64
builds.

Closes: #31363

r? @alexcrichton

The initial purpose is to workaround the LLVM bug
https://llvm.org/bugs/show_bug.cgi?id=26554 for OpenBSD.

By default, the `cpu' is defined to `generic`. But with a 64bit
processor, the optimization for `generic` will use invalid asm code as
NOP (the generated code for NOP isn't a NOP).

According to rust-lang#20777, "x86-64" is the right thing to do for x86_64
builds.

Closes: rust-lang#31363
@semarie
Copy link
Contributor Author

semarie commented Feb 17, 2016

@nbaksalyar I found a way to workaround the LLVM bug for OpenBSD, and it should enable better optimization too. As the target definition for x86_64-pc-solaris don't specify cpu too, I think you should try a similar patch.

@alexcrichton
Copy link
Member

@bors: r+ 6cb41e2

bors added a commit that referenced this pull request Feb 18, 2016
The initial purpose is to workaround the LLVM bug
https://llvm.org/bugs/show_bug.cgi?id=26554 for OpenBSD.

By default, the `cpu` is defined to `generic`. But with a 64bit
processor, the optimization for `generic` will use invalid asm code as
NOP (the generated code for NOP isn't a NOP).

According to #20777, "x86-64" is the right thing to do for x86_64
builds.

Closes: #31363

r? @alexcrichton
@bors
Copy link
Contributor

bors commented Feb 18, 2016

⌛ Testing commit 6cb41e2 with merge 7dd3b20...

@bors bors merged commit 6cb41e2 into rust-lang:master Feb 18, 2016
@semarie semarie mentioned this pull request Feb 20, 2016
bors added a commit that referenced this pull request Feb 22, 2016
A quick fix for several issues that break a Solaris/Illumos build.
Also, adds a CPU target specification (as seen in a patch for OpenBSD #31727).
@semarie semarie deleted the openbsd-llvm-cpu branch May 5, 2016 04:39
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.

3 participants