-
Notifications
You must be signed in to change notification settings - Fork 5.5k
add support for FreeBSD cross-compilation #34000
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
Changes from all commits
cbc70ea
6c1904b
c99ead5
0ac49a7
a288211
aca7dd4
1d094eb
b47bdbc
abc273b
df82e75
3dc12ec
ec1cdbd
8ad20d6
e06741a
090bf2d
e8d2a20
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 |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH}) | ||
| set(CROSS_ROOTFS $ENV{ROOTFS_DIR}) | ||
|
Member
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. isn't this already set by eng/common/cross/toolchain.cmake ?
Member
Author
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. That does not seems to be set soon enough and build fails. |
||
|
|
||
| macro(set_cache_value) | ||
| set(${ARGV0} ${ARGV1} CACHE STRING "Result from TRY_RUN" FORCE) | ||
|
|
@@ -9,11 +10,19 @@ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf OR | |
| EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl) | ||
|
|
||
| SET(ALPINE_LINUX 1) | ||
| SET(FREEBSD 0) | ||
| else() | ||
| SET(ALPINE_LINUX 0) | ||
| if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version) | ||
| set(FREEBSD 1) | ||
| set(CMAKE_SYSTEM_NAME FreeBSD) | ||
| set(CLR_CMAKE_TARGET_OS FreeBSD) | ||
| else() | ||
| SET(FREEBSD 0) | ||
| endif() | ||
| endif() | ||
|
|
||
| if(TARGET_ARCH_NAME MATCHES "^(armel|arm|arm64|x86)$") | ||
| if(TARGET_ARCH_NAME MATCHES "^(armel|arm|arm64|x86)$" OR FREEBSD) | ||
| set_cache_value(HAVE_CLOCK_MONOTONIC_EXITCODE 0) | ||
| set_cache_value(HAVE_CLOCK_REALTIME_EXITCODE 0) | ||
|
|
||
|
|
@@ -22,6 +31,11 @@ if(TARGET_ARCH_NAME MATCHES "^(armel|arm|arm64|x86)$") | |
| else() | ||
| set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP_EXITCODE 0) | ||
| endif() | ||
| if (FREEBSD) | ||
| set_cache_value(HAVE_SHM_OPEN_THAT_WORKS_WELL_ENOUGH_WITH_MMAP 1) | ||
| set_cache_value(HAVE_CLOCK_MONOTONIC 1) | ||
| set_cache_value(HAVE_CLOCK_REALTIME 1) | ||
| endif() | ||
| else() | ||
| message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64 and x86 are supported!") | ||
| endif() | ||
Uh oh!
There was an error while loading. Please reload this page.