-
Notifications
You must be signed in to change notification settings - Fork 2.5k
mbedtls: don't require mbedtls from our pkgconfig file #4656
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
Conversation
# 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}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to be sure here: does MBEDTLS_LIBRARIES
include MBEDTLS_LDFLAGS
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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}
src/CMakeLists.txt
Outdated
# 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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, removed.
mbedTLS has no pkgconfig file, hence we can't require it. For now, pass its link flags as our own.
e67fdac
to
64a78a8
Compare
Thanks, @tiennou! |
mbedTLS has no pkgconfig file, hence we can't require it. For now, pass its link flags as our own.
Ref: #4651