Fix '++nothing+crc' is not a recognized feature for target when compiling M1 / M2 macOS#11796
Merged
Merged
Conversation
…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
reviewed
Jul 28, 2023
Member
|
Does this need backporting to 8.1? |
Contributor
Author
I think master branch is enough. |
Member
|
I may say maybe at least 8.2 what do you think ? |
Contributor
Author
Thanks for checking. I confirmed on PHP 8.2. I think good. |
bukka
reviewed
Jul 28, 2023
Comment on lines
+101
to
+102
| # elif defined(__APPLE__) | ||
| # pragma clang attribute pop |
Member
There was a problem hiding this comment.
Personally I would just remove this - it doesn't make much sense - just unnecessary code duplication but it's a NIT really..
Member
|
I think this should go to master only - this is not breaking build, right? |
Contributor
Author
Yes, This is not breaking build. |
Member
|
I m good with that. |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#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
#pragmawhen compiling on M1/M2 macOS.close: #11785