-
Notifications
You must be signed in to change notification settings - Fork 2.7k
small fixes to build CoreCLR on FreeBSD again #18072
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1288,6 +1288,7 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD) | |
set(HAS_FTRUNCATE_LENGTH_ISSUE 0) | ||
set(BSD_REGS_STYLE "((reg).r_##rr)") | ||
set(HAVE_SCHED_OTHER_ASSIGNABLE 1) | ||
link_directories("/usr/local/lib") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't belong here. This script is used for detecting the configuration of the local system only and should not contain settings for the build of the product. It would need to be located in the root CMakeLists.txt instead. But I wonder how you have hit the issue. When I've tried to build coreclr on FreeBSD 11 now, it doesn't try to build the lttng support at all, but the build succeeds. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like others run to similar issue. I have lttng package installed. I'm wondering if there is detection and we skip tracing in some cases. Without tracing, cli was crashing when it attempted to trace so getting lltng in would be beneficial. Maybe build should fail of lttng is not found? We list it as pre-requisite on (old) FreeBSD building page. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I guess I've just not installed lttng and that's why it worked for me. The build is optional because the thinking was that it is valuable to be able to build without tracing support on platforms where it was not present. |
||
elseif(CMAKE_SYSTEM_NAME STREQUAL NetBSD) | ||
set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0) | ||
set(PAL_PTRACE "ptrace((cmd), (pid), (void*)(addr), (data))") | ||
|
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.
Since this is identical to the Darwin block above, could these be combined with an OR condition on the name?
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.
+1
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 was thinking about it @stephentoub but I felt this may be easier to read.
One way would be to change it to if(NOT CMAKE_SYSTEM_NAME STREQUAL Linux)
e.g. use our copy only for Linux and use system version for OSX and all BSD variants.
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.
OR is used a bunch of times elsewhere in the file; same for AND. If
if(NOT CMAKE_SYSTEM_NAME STREQUAL Linux)
makes more sense logically, then I'm fine with it. I just don't want us having unnecessary duplication.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 decided to go with OR. This can be revisited later if we ever have more non-linux platforms.