File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ if (DYNAMIC_ARCH)
46
46
if (ARM64 )
47
47
set (DYNAMIC_CORE ARMV8 CORTEXA53 CORTEXA55 CORTEXA57 CORTEXA72 CORTEXA73 FALKOR THUNDERX THUNDERX2T99 TSV110 EMAG8180 NEOVERSEN1 THUNDERX3T110 )
48
48
if (${CMAKE_C_COMPILER_VERSION} VERSION_GREATER 9.99 )
49
- set (DYNAMIC_CORE " ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2" )
49
+ set (DYNAMIC_CORE ${DYNAMIC_CORE} NEOVERSEV1 NEOVERSEN2 )
50
50
endif ()
51
51
if (DYNAMIC_LIST )
52
52
set (DYNAMIC_CORE ARMV8 ${DYNAMIC_LIST} )
Original file line number Diff line number Diff line change @@ -280,7 +280,29 @@ if (DEFINED TARGET)
280
280
if (${TARGET} STREQUAL POWER8 )
281
281
set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -mcpu=power8 -mtune=power8 -mvsx -fno-fast-math" )
282
282
endif ()
283
+
284
+ if (${TARGET} STREQUAL NEOVERSEV1 )
285
+ execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION )
286
+ if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4 )
287
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.4-a+sve -mtune=neoverse-v1" )
288
+ else ()
289
+ message (FATAL_ERROR "Compiler ${CMAKE_C_COMPILER} ${GCC_VERSION} does not support Neoverse V1." )
290
+ endif ()
291
+ endif ()
292
+ if (${TARGET} STREQUAL NEOVERSEN2 )
293
+ execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION )
294
+ if (${GCC_VERSION} VERSION_GREATER 10.4 OR ${GCC_VERSION} VERSION_EQUAL 10.4 )
295
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.5-a+sve+sve2+bf16 -mtune=neoverse-n2" )
296
+ else ()
297
+ message (FATAL_ERROR "Compiler $${CMAKE_C_COMPILER} {GCC_VERSION} does not support Neoverse N2." )
298
+ endif ()
299
+ endif ()
300
+ if (${TARGET} STREQUAL ARMV8SVE )
301
+ set (KERNEL_DEFINITIONS "${KERNEL_DEFINITIONS} -march=armv8.2-a+sve" )
302
+ endif ()
303
+
283
304
endif ()
305
+
284
306
if (DEFINED BINARY )
285
307
message (STATUS "Compiling a ${BINARY} -bit binary." )
286
308
endif ()
You can’t perform that action at this time.
0 commit comments