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

add solaris sparcv9 support #39903

Merged
merged 1 commit into from
Feb 25, 2017
Merged

Conversation

binarycrusader
Copy link
Contributor

Fixes #39901

* Update bootstrap to recognize the cputype 'sparcv9' (used on Solaris)
* Change to never use -fomit-frame-pointer on Solaris or for sparc
* Adds rust target sparcv9-sun-solaris

Fixes rust-lang#39901
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @eddyb (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@binarycrusader
Copy link
Contributor Author

Please note that this pull request depends upon another pull request #39871 to actually function as expected.

@binarycrusader
Copy link
Contributor Author

Note that there is little point in ever using -fomit-frame-pointer on sparc since the sparc ABI requires a minimum of 176 bytes of stack frame, which means space is always reserved for %fp regardless of whether it's used. Also, most debuggers and other tools on any platform for sparc generally expect %fp to be valid.

@eddyb
Copy link
Member

eddyb commented Feb 17, 2017

r? @alexcrichton

@rust-highfive rust-highfive assigned alexcrichton and unassigned eddyb Feb 17, 2017
@alexcrichton
Copy link
Member

Looks good to me, thanks! Out of curiosity, would sparc64-sun-solaris be "wrong", or is sparcv9 just conventional?

@binarycrusader
Copy link
Contributor Author

SPARC v9 (as in version 9) is the official name of the 64-bit architecture and is what is always used on Solaris and in SPARC architecture documentation. The ELF ABI documentation also refers to it as sparcv9. The C compilers also set __sparcv9 to be defined. For reasons unknown to me, the BSDs have always used sparc64 instead.

So, at least on Solaris, it would be unexpected and surprising to refer to it as sparc64.

@binarycrusader
Copy link
Contributor Author

GCC built on Solaris and LLVM built on Solaris also refer to it as sparcv9 for this reason.

@alexcrichton
Copy link
Member

Ok, sounds good to me, thanks!

@bors: r+

I wonder though if we should rename the target_arch = "sparc64" cfg? If the official name is sparcv9 it may be best to use that name

@bors
Copy link
Contributor

bors commented Feb 17, 2017

📌 Commit 2e756e2 has been approved by alexcrichton

@bors
Copy link
Contributor

bors commented Feb 19, 2017

⌛ Testing commit 2e756e2 with merge 83815d9...

@bors
Copy link
Contributor

bors commented Feb 19, 2017

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member

alexcrichton commented Feb 21, 2017 via email

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 23, 2017
bors added a commit that referenced this pull request Feb 23, 2017
Rollup of 11 pull requests

- Successful merges: #39859, #39886, #39892, #39903, #39914, #39918, #39988, #40010, #40027, #40030, #40035
- Failed merges:
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 23, 2017
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 24, 2017
bors added a commit that referenced this pull request Feb 24, 2017
Rollup of 17 pull requests

- Successful merges: #39777, #39815, #39845, #39886, #39892, #39903, #39905, #39914, #39927, #39940, #40010, #40030, #40048, #40050, #40052, #40060, #40071
- Failed merges:
eddyb added a commit to eddyb/rust that referenced this pull request Feb 25, 2017
eddyb added a commit to eddyb/rust that referenced this pull request Feb 25, 2017
bors added a commit that referenced this pull request Feb 25, 2017
@bors bors merged commit 2e756e2 into rust-lang:master Feb 25, 2017
@binarycrusader
Copy link
Contributor Author

As an FYI, the frame pointer bug on sparc turned out to be an old oversight in gcc; a bug was filed and the issue fixed for future gcc versions. I'd still heavily discourage use of -fomit-frame-pointer on sparc for some of the reasons I previously mentioned.

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.

5 participants