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

Fix '++nothing+crc' is not a recognized feature for target when compiling M1 / M2 macOS #11796

Merged
merged 2 commits into from Jul 29, 2023

Conversation

youkidearitai
Copy link
Contributor

@youkidearitai youkidearitai commented Jul 26, 2023

#pragma GCC target("+nothing+crc") is means clear outs aarch64_isa_flags.

However, #pragma clang attribute push(__attribute__((target("+nothing+crc") is not means any, then displays ignore feature. (Not reproduce Linux on ARM (ex: Raspberry Pi))

Therefore, Add new #pragma when compiling on M1/M2 macOS.

close: #11785

…ling M1 / M2 macOS

`#pragma GCC target("+nothing+crc")` is means clear outs aarch64_isa_flags.
However, `#pragma clang attribute
push(__attribute__((target("+nothing+crc")` is not means any, then
displays ignore feature. (Not reproduce Linux on ARM (ex: Raspberry Pi))

Therefore, Compiling on M1/M2 macOS add new `#pragma`.
@Girgias
Copy link
Member

Girgias commented Jul 28, 2023

Does this need backporting to 8.1?

@youkidearitai
Copy link
Contributor Author

Does this need backporting to 8.1?

I think master branch is enough.

@devnexen
Copy link
Member

devnexen commented Jul 28, 2023

I may say maybe at least 8.2 what do you think ?

@youkidearitai
Copy link
Contributor Author

I may say maybe at least 8.2 what do you think ?

Thanks for checking. I confirmed on PHP 8.2. I think good.

Comment on lines +101 to +102
# elif defined(__APPLE__)
# pragma clang attribute pop
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I would just remove this - it doesn't make much sense - just unnecessary code duplication but it's a NIT really..

@bukka
Copy link
Member

bukka commented Jul 28, 2023

I think this should go to master only - this is not breaking build, right?

@youkidearitai
Copy link
Contributor Author

I think this should go to master only - this is not breaking build, right?

Yes, This is not breaking build.
I think go to master only too. @devnexen Is this okay?

@devnexen
Copy link
Member

I m good with that.

@Girgias Girgias merged commit 092726f into php:master Jul 29, 2023
12 checks passed
@youkidearitai youkidearitai deleted the fix-crc32-ignore-feature branch July 29, 2023 05:41
jorgsowa pushed a commit to jorgsowa/php-src that referenced this pull request Aug 16, 2023
… M2 macOS compile target (php#11796)

#pragma GCC target("+nothing+crc") is means clear outs aarch64_isa_flags.

However, #pragma clang attribute push(__attribute__((target("+nothing+crc") is not means any, then displays ignore feature. (Not reproduce Linux on ARM (ex: Raspberry Pi))

Therefore, Add new #pragma when compiling on M1/M2 macOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants