Skip to content

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

Merged
strega-nil merged 2 commits intomicrosoft:masterfrom
longnguyen2004:flac-mingw
Aug 7, 2020
Merged

[flac] Disable stack smash protection and FORTIFY_SOURCE for mingw#12761
strega-nil merged 2 commits intomicrosoft:masterfrom
longnguyen2004:flac-mingw

Conversation

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

Comment thread ports/libflac/portfile.cmake Outdated
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
-DWITH_STACK_PROTECTOR=${WITH_STACK_PROTECTOR}
-DCMAKE_C_FLAGS=${DISABLE_FORTIFYING}
-DCMAKE_CXX_FLAGS=${DISABLE_FORTIFYING})
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this. 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:needs-maintainer-attention Lets the current 'on rotation' vcpkg maintainer know they need to look at this.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants