Skip to content

Conversation

rettichschnidi
Copy link
Contributor

@rettichschnidi rettichschnidi commented Mar 19, 2024

As per issue #69730, building arch.shared_interrupt.lto and kernel.common.lto for mimxrt685_evk or mimxrt595_evk/mimxrt595s/cm33 is currently broken due to their usage of CONFIG_CODE_DATA_RELOCATION.

This commit disables LTO when CODE_DATA_RELOCATION is enabled, allowing PRs with changes in the kernel code to pass the CI check.

On the down side, builds affected by this change produce a new warning:

warning: LTO (defined at Kconfig.zephyr:430) was assigned the value
'y' but got the value 'n'. Check these unsatisfied dependencies:
(!CODE_DATA_RELOCATION) (=n)

Hint: #70305 tries to resolve the same issue.

As per issue zephyrproject-rtos#69730, building arch.shared_interrupt.lto and
kernel.common.lto for mimxrt685_evk or mimxrt595_evk/mimxrt595s/cm33 is
currently broken due to their usage of CONFIG_CODE_DATA_RELOCATION.

This commit disables LTO when CODE_DATA_RELOCATION is enabled, allowing
PRs with changes in the kernel code to pass the CI check.

On the down side, builds affected by this change produce a new warning:

> warning: LTO (defined at Kconfig.zephyr:430) was assigned the value
> 'y' but got the value 'n'. Check these unsatisfied dependencies:
> (!CODE_DATA_RELOCATION) (=n)

Signed-off-by: Reto Schneider <[email protected]>
@rettichschnidi rettichschnidi marked this pull request as ready for review March 19, 2024 23:44
@zephyrbot zephyrbot requested review from nashif and tejlmand March 19, 2024 23:44
@tejlmand
Copy link
Contributor

On the down side, builds affected by this change produce a new warning:

warning: LTO (defined at Kconfig.zephyr:430) was assigned the value
'y' but got the value 'n'. Check these unsatisfied dependencies:
(!CODE_DATA_RELOCATION) (=n)

because you should filter out boards where the test-case can not be applied.
That is update this line:

filter: CONFIG_ISR_TABLES_LOCAL_DECLARATION_SUPPORTED

to this:

    filter: CONFIG_ISR_TABLES_LOCAL_DECLARATION_SUPPORTED and not CONFIG_CODE_DATA_RELOCATION

That will pre-run Kconfig for filtering purposes but exclude the build if CODE_DATA_RELOCATION is enabled.

@rettichschnidi
Copy link
Contributor Author

As suggested by @tejlmand, merging content of this PR into #70305.

@rettichschnidi rettichschnidi deleted the gardena/rs/upstream/no-lto-when-code-data-relocation-enabled branch March 21, 2024 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants