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

Enforce -mtune=core2 and -mtune=yonah on macOS #245

Merged
merged 1 commit into from
Feb 9, 2022

Conversation

catap
Copy link
Contributor

@catap catap commented Feb 8, 2022

I've used the same cpu which is used by Rust: core2 for x86_64[1] and yonah for i686[2]. I also used mtine instead of mcpu because it was deprecated at gcc since version 5[3].

It closes #214

I also added missed i686-apple-darwin target.

Footnotes:
[1] https://github.com/rust-lang/rust/blob/1.54.0/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs
[2] https://github.com/rust-lang/rust/blob/1.54.0/compiler/rustc_target/src/spec/i686_apple_darwin.rs
[3] gcc-mirror/gcc@9d913bb

@bjorn3
Copy link
Contributor

bjorn3 commented Feb 9, 2022

-mtune merely optimizes for better performance on a specific cpu while still allowing it to run on older systems, this means it doesn't enable target features supported by the specified cpu like xchg16b support. You should probably use -march instead.

@catap
Copy link
Contributor Author

catap commented Feb 9, 2022

@bjorn3 very good catch. Let me fix it.

I've used the same cpu which is used by Rust: `core2` for x86_64[1] and
`yonah` for i686[2]. I also used `mtine` instead of `mcpu` because it
was deprecated at gcc since version 5[3].

It closes thepowersgang#214

I also added missed `i686-apple-darwin` target.

Footnotes:
[1]  https://github.com/rust-lang/rust/blob/1.54.0/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs
[2]  https://github.com/rust-lang/rust/blob/1.54.0/compiler/rustc_target/src/spec/i686_apple_darwin.rs
[3]  gcc-mirror/gcc@9d913bb
@thepowersgang thepowersgang merged commit 94ffdd3 into thepowersgang:master Feb 9, 2022
@catap catap deleted the gcc branch February 9, 2022 13:15
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.

MacOS + GCC11: LIBS build error (Undefined symbol ___atomic_compare_exchange_16)
3 participants