Skip to content

Commit

Permalink
core: lib: scmi-server: add CMake defines for embedded modules
Browse files Browse the repository at this point in the history
Enable CMake directive CMAKE_C_COMPILER_WORKS to prevent SCP-firmware
CMake configuration sequence to check the cross compilation toolchain
since it is not needed here: OP-TEE only uses CMake to configure
SCP-firmware, not to build source files. This change is required when
building OP-TEE with CFG_SCMI_SCPFW=y and using a CMake >= 3.27.0.

Suggested-by: Thomas Bourgoin <thomas.bourgoin@foss.st.com>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
[Fix the overwrite of others CMake options]
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
  • Loading branch information
etienne-lms authored and vingu-linaro committed Apr 16, 2024
1 parent eb157d5 commit 43772aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/lib/scmi-server/sub.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ scpfw-cmake-flags-y = -DSCP_FIRMWARE_SOURCE_DIR:PATH=$(scpfw-product)/fw \
-DSCP_OPTEE_DIR:PATH=$(CURDIR) \
-DCFG_CROSS_COMPILE=$(lastword $(CROSS_COMPILE_core))

# CMake does not need to check the cross compilation toolchain since we do not
# compile any source file with CMake, we only generate some SCP-firmware
# files.
scpfw-cmake-flags-y += -DCMAKE_C_COMPILER_WORKS=1

ifeq ($(cmd-echo-silent),true)
scpfw-cmake-redirect = >/dev/null
endif
Expand Down

0 comments on commit 43772aa

Please sign in to comment.