From 29ee4248f6f8268b3bb6a53139a95998e4a8777b Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Tue, 24 Sep 2024 17:17:01 +0200 Subject: [PATCH] fix(coremark): archive in linker.lf should depend on component name --- coremark/CMakeLists.txt | 6 +++++- coremark/idf_component.yml | 2 +- coremark/{linker.lf => linker.lf.in} | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) rename coremark/{linker.lf => linker.lf.in} (57%) diff --git a/coremark/CMakeLists.txt b/coremark/CMakeLists.txt index d26321b2dc..68d26dc57a 100644 --- a/coremark/CMakeLists.txt +++ b/coremark/CMakeLists.txt @@ -7,9 +7,13 @@ set(srcs coremark/core_list_join.c port/core_portme.c ) +if(NOT CMAKE_BUILD_EARLY_EXPANSION) + configure_file(linker.lf.in ${CMAKE_CURRENT_BINARY_DIR}/linker.lf) +endif() + idf_component_register(SRCS ${srcs} PRIV_INCLUDE_DIRS port coremark - LDFRAGMENTS linker.lf + LDFRAGMENTS ${CMAKE_CURRENT_BINARY_DIR}/linker.lf PRIV_REQUIRES esp_timer) # compile coremark component with -O3 flag (will override the optimization level which is set globally) diff --git a/coremark/idf_component.yml b/coremark/idf_component.yml index 9da4cd930d..f7cab362e8 100644 --- a/coremark/idf_component.yml +++ b/coremark/idf_component.yml @@ -1,4 +1,4 @@ -version: "1.1.0" +version: "1.1.0~1" description: CoreMark Benchmark url: https://github.com/espressif/idf-extra-components/tree/master/coremark issues: https://github.com/espressif/idf-extra-components/issues diff --git a/coremark/linker.lf b/coremark/linker.lf.in similarity index 57% rename from coremark/linker.lf rename to coremark/linker.lf.in index 104835962b..344b48923a 100644 --- a/coremark/linker.lf +++ b/coremark/linker.lf.in @@ -1,4 +1,4 @@ [mapping:coremark] -archive: libcoremark.a +archive: lib${COMPONENT_NAME}.a entries: * (noflash)