issue: 5148137 Use tls detection flags in tls.m4 link-test - #249
Conversation
📝 WalkthroughWalkthroughThe TLS configuration macro changes probe flag handling, applies only TLS-specific linker flags when TLS is enabled, adjusts the OpenSSL header check, and aborts configuration when explicitly requested TLS is unavailable. ChangesTLS Build Configuration
Estimated code review effort: 1 (Trivial) | ~5 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@config/m4/tls.m4`:
- Line 48: In TLS_CAPABILITY_SETUP, remove the CXXFLAGS assignment referencing
sockperf_cv_tls_CXXFLAGS, since the variable is not initialized and the probe
runs in C mode; retain the existing CPPFLAGS handling for the TLS include path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Enterprise
Run ID: 925dc02a-33e2-4886-83f5-6913e9f43b1d
📒 Files selected for processing (1)
config/m4/tls.m4
|
Consider a configure warning when --with-tls= is explicitly set but detection fails, instead of silently falling back to "no". |
The TLS support link-test applied $sockperf_cv_dpcp_LDFLAGS and $sockperf_cv_dpcp_CXXFLAGS, which are never set in this macro, instead of the $sockperf_cv_tls_* variables assigned just above. With OpenSSL in a non-default prefix the detection link-test could not find -lssl, so detection failed and TLS was silently disabled (checking for tls support... no). Use $sockperf_cv_tls_LDFLAGS so the OpenSSL -L/-rpath derived from --with-tls=<prefix> reach the link-test. Remove CXXFLAGS usage, because it's unused in the C mode check. Hard fail the configure stage if --with-tls requested and openssl is not found or the link test fails. Signed-off-by: Dmytro Podgornyi <dmytrop@nvidia.com>
48403cf to
4c66538
Compare
done. |
|
bot:retest |
1 similar comment
|
bot:retest |
|
bot:retest |
The TLS support link-test applied $sockperf_cv_dpcp_LDFLAGS and $sockperf_cv_dpcp_CXXFLAGS, which are never set in this macro, instead of the $sockperf_cv_tls_* variables assigned just above. With OpenSSL in a non-default prefix the detection link-test could not find -lssl, so detection failed and TLS was silently disabled
(checking for tls support... no).
Use $sockperf_cv_tls_LDFLAGS so the OpenSSL -L/-rpath derived from --with-tls= reach the link-test.
Remove CXXFLAGS usage, because it's unused in the C mode check.
Hard fail the configure stage if --with-tls requested and openssl is not found or the link test fails.
Summary by CodeRabbit