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

[flac] Disable stack smash protection and FORTIFY_SOURCE for mingw #12761

Merged
merged 2 commits into from
Aug 7, 2020

Conversation

longnguyen2004
Copy link
Contributor

Describe the pull request

  • What does your PR fix? Fixes #
    This disables stack protection and FORTIFY_SOURCE on mingw, since it depends on libssp from GCC, which can cause licensing problems since libssp is GPL
  • Which triplets are supported/not supported? Have you updated the CI baseline?
    All mingw triplets
  • Does your PR follow the maintainer guide?
    Yes

-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DWITH_STACK_PROTECTOR=${WITH_STACK_PROTECTOR}
-DCMAKE_C_FLAGS=${DISABLE_FORTIFYING}
-DCMAKE_CXX_FLAGS=${DISABLE_FORTIFYING})
Copy link
Contributor

Choose a reason for hiding this comment

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

These shouldn't be passed like this, because it will compete with the flags being passed inside vcpkg_configure_cmake(); instead, we should append the flag to VCPKG_C(XX)_FLAGS:

string(APPEND VCPKG_C_FLAGS " ${DISABLE_FORTIFYING}")
vcpkg_configure_cmake( .... )

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Alright I'll change it

Copy link
Contributor

@NancyLi1013 NancyLi1013 left a comment

Choose a reason for hiding this comment

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

Could you please update

file(COPY ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/libflac)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libflac/COPYING.Xiph ${CURRENT_PACKAGES_DIR}/share/libflac/copyright)

as

file(INSTALL ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)?

@NancyLi1013 NancyLi1013 added category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist requires:author-response labels Aug 6, 2020
@longnguyen2004
Copy link
Contributor Author

Could you please update

file(COPY ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/libflac)
file(RENAME ${CURRENT_PACKAGES_DIR}/share/libflac/COPYING.Xiph ${CURRENT_PACKAGES_DIR}/share/libflac/copyright)

as

file(INSTALL ${SOURCE_PATH}/COPYING.Xiph DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)?

Done

@NancyLi1013 NancyLi1013 added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Aug 6, 2020
@strega-nil strega-nil merged commit 80ef2a3 into microsoft:master Aug 7, 2020
@longnguyen2004 longnguyen2004 deleted the flac-mingw branch August 8, 2020 10:34
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.

4 participants