Skip to content

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

Merged
Girgias merged 2 commits into
php:masterfrom
youkidearitai:fix-crc32-ignore-feature
Jul 29, 2023
Merged

Fix '++nothing+crc' is not a recognized feature for target when compiling M1 / M2 macOS#11796
Girgias merged 2 commits into
php:masterfrom
youkidearitai:fix-crc32-ignore-feature

Conversation

@youkidearitai
Copy link
Copy Markdown
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`.
Comment thread ext/standard/crc32.c
@Girgias
Copy link
Copy Markdown
Member

Girgias commented Jul 28, 2023

Does this need backporting to 8.1?

@youkidearitai
Copy link
Copy Markdown
Contributor Author

Does this need backporting to 8.1?

I think master branch is enough.

@devnexen
Copy link
Copy Markdown
Member

devnexen commented Jul 28, 2023

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

@youkidearitai
Copy link
Copy Markdown
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 thread ext/standard/crc32.c
Comment on lines +101 to +102
# elif defined(__APPLE__)
# pragma clang attribute pop
Copy link
Copy Markdown
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
Copy Markdown
Member

bukka commented Jul 28, 2023

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

@youkidearitai
Copy link
Copy Markdown
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
Copy Markdown
Member

I m good with that.

@Girgias Girgias merged commit 092726f into php:master Jul 29, 2023
@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

Development

Successfully merging this pull request may close these issues.

'++nothing+crc' is not a recognized feature for this target (ignoring feature) when compiling C language on M1 / M2 mac

4 participants