mbedtls: don't require mbedtls from our pkgconfig file#4656
Merged
pks-t merged 1 commit intolibgit2:masterfrom May 30, 2018
Merged
mbedtls: don't require mbedtls from our pkgconfig file#4656pks-t merged 1 commit intolibgit2:masterfrom
pks-t merged 1 commit intolibgit2:masterfrom
Conversation
pks-t
reviewed
May 25, 2018
| # mbedTLS has no pkgconfig file, hence we can't require it | ||
| # https://github.com/ARMmbed/mbedtls/issues/228 | ||
| # For now, pass its link flags as our own | ||
| LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES}) |
Member
There was a problem hiding this comment.
Just to be sure here: does MBEDTLS_LIBRARIES include MBEDTLS_LDFLAGS?
Contributor
Author
There was a problem hiding this comment.
It's a little bit weirder : the FindmbedTLS module doesn't actually set MBEDTLS_LDFLAGS at all, so I hope this is sufficient. AFAIU, Libs.private only impacts static linking (ie. pkg-config libgit2 --static --libs), and the linker should already know what to do when dyn-linking.
The resulting pc file looks like this :
prefix="/usr/local"
libdir=${prefix}/lib
includedir=${prefix}/include
Name: libgit2
Description: The git library, take 2
Version: 0.27.0
Libs: -L${libdir} -lgit2
Libs.private: -lcurl -L/usr/local/lib -lmbedtls -lmbedx509 -lmbedcrypto -lz -L/usr/local/Cellar/libssh2/1.8.0/lib -lssh2 -L/usr/lib -liconv
Requires.private:
Cflags: -I${includedir}
| # https://github.com/ARMmbed/mbedtls/issues/228 | ||
| # For now, pass its link flags as our own | ||
| LIST(APPEND LIBGIT2_PC_LIBS ${MBEDTLS_LIBRARIES}) | ||
| # LIST(APPEND LIBGIT2_PC_REQUIRES "mbedtls") |
Member
There was a problem hiding this comment.
I'd say to just remove this line. Having commented-out sections can be confusing, and you're able to easily dig up this code by just git-blaming the above comment
mbedTLS has no pkgconfig file, hence we can't require it. For now, pass its link flags as our own.
e67fdac to
64a78a8
Compare
Merged
Member
|
Thanks, @tiennou! |
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.
mbedTLS has no pkgconfig file, hence we can't require it. For now, pass its link flags as our own.
Ref: #4651