Skip to content

Commit a3b9178

Browse files
carlescufirlubos
authored andcommitted
[nrf fromlist] kernel: Guard SYS_CLOCK_HW_CYCLES_PER_SEC to avoid spurious empty macro
If SYS_CLOCK_EXISTS is not enabled, then the SYS_CLOCK_HW_CYCLES_PER_SEC still gets created, but with no value. This causes the code generation in misc/generated/CMakeLists.txt to create an empty assembly macro: `.equ  CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC,` which then causes a build error. Disable the Kconfig option entirely when SYS_CLOCK_EXISTS is disabled to fix this. This is a follow-up to 03f46db. Upstream PR #: 91179 Signed-off-by: Carles Cufi <[email protected]>
1 parent 4428e25 commit a3b9178

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,13 +826,15 @@ config SYS_CLOCK_TICKS_PER_SEC
826826

827827
A value of 0 completely disables timer support in the kernel.
828828

829+
if SYS_CLOCK_EXISTS
829830
config SYS_CLOCK_HW_CYCLES_PER_SEC
830831
int "System clock's h/w timer frequency"
831832
default 0 if TIMER_READS_ITS_FREQUENCY_AT_RUNTIME
832833
help
833834
This option specifies the frequency of the hardware timer used for the
834835
system clock (in Hz). This option is set by the SOC's or board's Kconfig file
835836
and the user should generally avoid modifying it via the menu configuration.
837+
endif
836838

837839
config SYS_CLOCK_EXISTS
838840
bool "System clock exists and is enabled"

0 commit comments

Comments
 (0)