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

[libpng] fix mips64 support #26265

Merged
merged 5 commits into from
Aug 29, 2022
Merged

[libpng] fix mips64 support #26265

merged 5 commits into from
Aug 29, 2022

Conversation

Jamlys
Copy link
Contributor

@Jamlys Jamlys commented Aug 10, 2022

Add support for mips64.

  • What does your PR fix?

    fix build failure for mips64.

  • Which triplets are supported/not supported? Have you updated the CI baseline?

    linux, No

  • Does your PR follow the maintainer guide?

    Basically.

  • If you have added/updated a port: Have you run ./vcpkg x-add-version --all and committed the result?

    Yes

If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

github-actions[bot]
github-actions bot previously approved these changes Aug 10, 2022
@FrankXie05 FrankXie05 added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Aug 10, 2022
FrankXie05
FrankXie05 previously approved these changes Aug 11, 2022
@FrankXie05 FrankXie05 added the info:reviewed Pull Request changes follow basic guidelines label Aug 11, 2022
Copy link
Member

@BillyONeal BillyONeal left a comment

Choose a reason for hiding this comment

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

Don't necessarily have a problem with this but need question answered.

add_definitions(-DPNG_MIPS_MSA_OPT=2)
+ if("${CMAKE_C_COMPILER_VERSION}" VERSION_GREATER_EQUAL "7")
+ add_definitions(-D__mips_msa)
+ add_compile_options(-mmsa -mhard-float -mfp64)
Copy link
Member

Choose a reason for hiding this comment

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

Why isn't this coming from the toolchain? I'm nervous about embedding assumptions about the target like this...

@BillyONeal BillyONeal added requires:author-response and removed info:reviewed Pull Request changes follow basic guidelines labels Aug 12, 2022
@FrankXie05
Copy link
Contributor

Ping @Jamlys for response.

@Jamlys Jamlys dismissed stale reviews from FrankXie05 and github-actions via 60f017c August 19, 2022 09:02
@Jamlys Jamlys requested review from BillyONeal and FrankXie05 and removed request for BillyONeal and FrankXie05 August 19, 2022 09:03
@FrankXie05 FrankXie05 added the info:reviewed Pull Request changes follow basic guidelines label Aug 22, 2022
if(${PNG_MIPS_MSA} STREQUAL "on")
add_definitions(-DPNG_MIPS_MSA_OPT=2)
+ else()
+ add_definitions(-DPNG_MIPS_MSA_CHECK_SUPPORTED)
Copy link
Member

Choose a reason for hiding this comment

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

Can you show that this has been submitted upstream and/or documentation from upstream that this is the correct thing to do?

(It looks correct to me but I'm very nervous about 'putting words in upstream's mouth')

Copy link
Member

Choose a reason for hiding this comment

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

(To be clear, I'm not saying 'it has to be landed by upstream before we will land this', I'm saying that I think they have a right-of-first-refusal; as long as they have been notified and indicated agreement with the general direction, or have had some reasonable amount of time to respond, that's good enough)

Copy link
Contributor Author

@Jamlys Jamlys Aug 24, 2022

Choose a reason for hiding this comment

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

libpng has a simple specification about support for mips msa detection.
https://github.com/glennrp/libpng/tree/a37d4836519517bdce6cb9d956092321eca3e73b/contrib/mips-msa
While I looked into its configure file (starts at line 13610) for more detail about this.
https://github.com/glennrp/libpng/blob/a37d4836519517bdce6cb9d956092321eca3e73b/configure

Copy link
Member

Choose a reason for hiding this comment

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

Those links don't work for me :/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@JavierMatosD JavierMatosD added requires:author-response and removed info:reviewed Pull Request changes follow basic guidelines labels Aug 22, 2022
@Jamlys Jamlys requested a review from BillyONeal August 26, 2022 07:10
@BillyONeal BillyONeal added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Aug 29, 2022
@JavierMatosD
Copy link
Contributor

Thanks!

@JavierMatosD JavierMatosD merged commit f4efe37 into microsoft:master Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants