mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 09:21:52 +03:00
Enable cross compilation to aarch64
Change-Id: Iafc8ac60926f5286990ce63a4ff4f8b6a7c46bef
This commit is contained in:
committed by
Konstantinos Margaritis
parent
1e7765c485
commit
503483a8ee
@@ -209,7 +209,7 @@ else()
|
||||
message(SEND_ERROR "Something went wrong determining gcc tune: -mtune=${GNUCC_ARCH} not valid")
|
||||
endif()
|
||||
set(TUNE_FLAG ${GNUCC_ARCH})
|
||||
else ()
|
||||
elseif (NOT TUNE_FLAG)
|
||||
set(TUNE_FLAG native)
|
||||
endif()
|
||||
|
||||
@@ -252,11 +252,11 @@ else()
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_C_FLAGS MATCHES .*march.* AND NOT CMAKE_C_FLAGS MATCHES .*mtune.*)
|
||||
set(ARCH_C_FLAGS "-march=native -mtune=${TUNE_FLAG}")
|
||||
set(ARCH_C_FLAGS "-march=${GNUCC_ARCH} -mtune=${TUNE_FLAG}")
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_CXX_FLAGS MATCHES .*march.* AND NOT CMAKE_CXX_FLAGS MATCHES .*mtune.*)
|
||||
set(ARCH_CXX_FLAGS "-march=native -mtune=${TUNE_FLAG}")
|
||||
set(ARCH_CXX_FLAGS "-march=${GNUCC_ARCH} -mtune=${TUNE_FLAG}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
@@ -460,7 +460,11 @@ endif()
|
||||
endif()
|
||||
|
||||
if (NOT FAT_RUNTIME)
|
||||
message(STATUS "Building for current host CPU: ${ARCH_C_FLAGS}")
|
||||
if (CROSS_COMPILE_AARCH64)
|
||||
message(STATUS "Building for target CPU: ${ARCH_C_FLAGS}")
|
||||
else()
|
||||
message(STATUS "Building for current host CPU: ${ARCH_C_FLAGS}")
|
||||
endif()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ARCH_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${ARCH_CXX_FLAGS}")
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user