-
Notifications
You must be signed in to change notification settings - Fork 378
Add x64 arch and freebsd arm64 in cross toolchain #9834
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
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 |
|---|---|---|
|
|
@@ -48,11 +48,13 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64") | |
| set(CMAKE_SYSTEM_PROCESSOR aarch64) | ||
| if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl) | ||
| set(TOOLCHAIN "aarch64-alpine-linux-musl") | ||
| else() | ||
| elseif(LINUX) | ||
| set(TOOLCHAIN "aarch64-linux-gnu") | ||
| endif() | ||
| if(TIZEN) | ||
| set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") | ||
| if(TIZEN) | ||
| set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0") | ||
| endif() | ||
| elseif(FREEBSD) | ||
| set(triple "aarch64-unknown-freebsd12") | ||
| endif() | ||
| elseif(TARGET_ARCH_NAME STREQUAL "ppc64le") | ||
| set(CMAKE_SYSTEM_PROCESSOR ppc64le) | ||
|
|
@@ -66,12 +68,18 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86") | |
| if(TIZEN) | ||
| set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0") | ||
| endif() | ||
| elseif (FREEBSD) | ||
| set(CMAKE_SYSTEM_PROCESSOR "x86_64") | ||
| set(triple "x86_64-unknown-freebsd12") | ||
| elseif (ILLUMOS) | ||
| set(CMAKE_SYSTEM_PROCESSOR "x86_64") | ||
| set(TOOLCHAIN "x86_64-illumos") | ||
| elseif(TARGET_ARCH_NAME STREQUAL "x64") | ||
| set(CMAKE_SYSTEM_PROCESSOR x86_64) | ||
| if(LINUX) | ||
| set(TOOLCHAIN "x86_64-linux-gnu") | ||
| if(TIZEN) | ||
|
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. I'm not sure if there's x64 Tizen. I have thought Tizen is only arm / x86. @alpencolt am I right?
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. According to Wikipedia https://en.wikipedia.org/wiki/Tizen, x86-64 is supported. Here are the downloadable packages for x86_64: https://download.tizen.org/live/Tizen/standard/x86_64/ |
||
| set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0") | ||
| endif() | ||
| elseif(FREEBSD) | ||
| set(triple "x86_64-unknown-freebsd12") | ||
| elseif(ILLUMOS) | ||
| set(TOOLCHAIN "x86_64-illumos") | ||
| endif() | ||
| else() | ||
| message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, armv6, arm64, ppc64le, s390x and x86 are supported!") | ||
| endif() | ||
|
|
@@ -218,7 +226,7 @@ endif() | |
|
|
||
| # Specify compile options | ||
|
|
||
| if((TARGET_ARCH_NAME MATCHES "^(arm|armv6|armel|arm64|ppc64le|s390x)$" AND NOT ANDROID) OR ILLUMOS) | ||
| if((TARGET_ARCH_NAME MATCHES "^(arm|armv6|armel|arm64|ppc64le|s390x)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS) | ||
| set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN}) | ||
| set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN}) | ||
| set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN}) | ||
|
|
||
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.
From my tests, isn't
set(TOOLCHAIN "llvm")also needed here, as latereng/native/configuretools.cmakewill fail while looking forobjcopy?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.
TOOLCHAINis used to indicate triplet for other platforms. For freebsd-x64, it should be the same value before and after this refactoring. The arm64 block is a copy of refactored x64 block.