updates to make 64bit compiling
This commit is contained in:
@@ -2,9 +2,18 @@ cmake_minimum_required(VERSION 3.21)
|
||||
project(dhrystone C)
|
||||
set(TARGET dhrystone)
|
||||
|
||||
option(HAVE_NO_INIT_FINI "Enable NO_INIT_FINI" OFF)
|
||||
|
||||
if(HAVE_NO_INIT_FINI)
|
||||
#if HAVE_NO_INIT_FINI is ON
|
||||
add_definitions(-DHAVE_NO_INIT_FINI)
|
||||
endif()
|
||||
|
||||
set(ITERATIONS 50000) # 20000 for TGC
|
||||
|
||||
add_executable(${TARGET} dhry_1.c dhry_2.c dhry_stubs.c)
|
||||
target_compile_options(${TARGET} PRIVATE -mcmodel=medany)
|
||||
#target_compile_options(${TARGET} PRIVATE -mcmodel=medany -fPIC)
|
||||
target_include_directories(${TARGET} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_compile_options(${TARGET} PRIVATE -fno-inline -fno-builtin-printf -fno-common -Wno-implicit -funroll-loops -fpeel-loops -fgcse-sm -fgcse-las)
|
||||
target_compile_definitions(${TARGET} PRIVATE ITERATIONS=${ITERATIONS} HZ=32768 TIME NO_INIT)
|
||||
@@ -13,6 +22,8 @@ set(BOARD "iss" CACHE STRING "Target board")
|
||||
add_subdirectory(../../bare-metal-bsp bsp)
|
||||
target_link_libraries(${TARGET} PRIVATE bsp)
|
||||
target_link_options(${TARGET} PRIVATE LINKER:--wrap=scanf)
|
||||
#target_link_options(${TARGET} PRIVATE LINKER:--wrap=scanf -Wl,--no-gc-sections)
|
||||
|
||||
target_link_options(${TARGET} PRIVATE -Wl,-Map=${TARGET}.map)
|
||||
include(CMakePrintHelpers)
|
||||
cmake_print_properties(TARGETS ${TARGET} PROPERTIES COMPILE_DEFINITIONS COMPILE_OPTIONS LINK_OPTIONS INTERFACE_LINK_OPTIONS)
|
||||
|
Reference in New Issue
Block a user