Skip to content
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

Use clang++ when cross-compiling to ARM64 #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES arm64)
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- CFLAGS="--target=aarch64-linux-gnu --prefix=aarch64-linux-gnu-"
)
set(CMAKE_C_FLAGS "--target=aarch64-linux-gnu --prefix=aarch64-linux-gnu-")
set(CMAKE_CXX_FLAGS "--target=aarch64-linux-gnu --prefix=aarch64-linux-gnu-")
endif()

if(KFLAT_OPTS)
Expand Down
4 changes: 2 additions & 2 deletions cmake/arm64_cross_compile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ if (NOT CLANG_DIR)
endif()
set(CMAKE_C_COMPILER ${CLANG_DIR}/bin/clang.real)
set(CMAKE_LINKER ${CLANG_DIR}/bin/ld.lld)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
set(CMAKE_CXX_COMPILER ${CLANG_DIR}/bin/clang++.real)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)