-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
feat:Supports compilation on FreeBSD14 #2711
Conversation
WalkthroughThe changes introduce support for FreeBSD in the project's build and source files. This includes updating CMake configuration files, adding conditional compilation directives, and including necessary headers specific to FreeBSD. These updates ensure that the project can be compiled and run on FreeBSD systems without issues. Changes
Possibly related issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (8)
- CMakeLists.txt (2 hunks)
- include/pika_server.h (1 hunks)
- src/net/CMakeLists.txt (1 hunks)
- src/net/src/net_interfaces.cc (2 hunks)
- src/pika_monotonic_time.cc (2 hunks)
- src/pika_rsync_service.cc (1 hunks)
- src/pstd/src/rsync.cc (1 hunks)
- src/storage/src/coding.h (1 hunks)
Files not reviewed due to errors (1)
- src/net/CMakeLists.txt (no review received)
Files skipped from review due to trivial changes (3)
- include/pika_server.h
- src/pika_rsync_service.cc
- src/pstd/src/rsync.cc
Additional comments not posted (5)
src/pika_monotonic_time.cc (1)
20-29
: The FreeBSD-specific implementation ofgetMonotonicUs()
usingclock_gettime
is correctly implemented and aligns with the PR's objectives to support FreeBSD.src/storage/src/coding.h (1)
16-18
: The addition of theSTORAGE_PLATFORM_IS_LITTLE_ENDIAN
macro for FreeBSD using_BYTE_ORDER
and_LITTLE_ENDIAN
is correctly implemented and necessary for endian-specific operations on FreeBSD.src/net/src/net_interfaces.cc (1)
15-22
: The update to include additional headers and expand the conditional compilation to include FreeBSD ensures proper functionality on FreeBSD systems. This aligns with the PR's objectives to support FreeBSD.CMakeLists.txt (2)
59-61
: Ensure proper thread support for FreeBSD.The addition of
-pthread
and the definition-DOS_FREEBSD
are standard practices for enabling multithreading support on FreeBSD, aligning with the configurations for other operating systems like Linux and Darwin.
72-72
: Validate system support error handling.This error message ensures that the build process halts with a clear notification when an unsupported system is detected. It's crucial to verify that this message is correctly implemented and appears only when necessary.
Verification successful
The error message "only support linux or macOs or FreeBSD" is correctly implemented in the CMakeLists.txt file. It is triggered when the system name does not match "Darwin" (macOS), "FreeBSD", or "Linux". This ensures that the build process halts with a clear notification when an unsupported system is detected.
- The error message is located within an
else()
block that follows checks for "Darwin", "FreeBSD", and "Linux" system names.This implementation appears to be correct and appropriate for handling unsupported systems.
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Ensure the error message is appropriate for unsupported systems. # Test: Search for the error message in the CMakeLists.txt. Expect: Correct error message for unsupported systems. rg --type cmake 'only support linux or macOs or FreeBSD' CMakeLists.txtLength of output: 138
Script:
#!/bin/bash # Description: Verify the conditions under which the error message is triggered in the CMakeLists.txt file. # Search for the conditional statements that lead to the error message. rg --type cmake 'if\(' CMakeLists.txt -A 5Length of output: 7486
pika can now be compiled on FreeBSD14
Summary by CodeRabbit
New Features
Bug Fixes
Refactor