Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: linker_script: Fix using deferred init with CMAKE_LINKER_GENERATOR #72369

Merged
merged 2 commits into from
May 13, 2024

Conversation

pdgendt
Copy link
Collaborator

@pdgendt pdgendt commented May 6, 2024

The section for deferred devices was missing for CMAKE_LINKER_GENERATOR.

Issue shown here:

$ west build -p -b qemu_cortex_m3 tests/kernel/device -- -DCONFIG_CMAKE_LINKER_GENERATOR=y
# ...
/opt/zephyr-sdk-0.16.5-1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/kernel/libkernel.a(init.c.obj): in function `z_impl_device_init':
/home/pdgendt/dev/zephyr-main/zephyr/kernel/init.c:388: undefined reference to `__deferred_init_list_start'
/opt/zephyr-sdk-0.16.5-1/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /home/pdgendt/dev/zephyr-main/zephyr/kernel/init.c:388: undefined reference to `__deferred_init_list_end'

Regression introduced by #67335

@pdgendt pdgendt requested review from tejlmand and gmarull May 6, 2024 13:21
@zephyrbot zephyrbot added area: Build System Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels May 6, 2024
@pdgendt pdgendt added the DNM This PR should not be merged (Do Not Merge) label May 6, 2024
@pdgendt pdgendt marked this pull request as draft May 6, 2024 14:58
@pdgendt pdgendt force-pushed the deferred-init-cmake-ld branch from 4f2e229 to 203a815 Compare May 7, 2024 08:13
@pdgendt pdgendt requested review from cfriedt and edersondisouza May 7, 2024 08:14
@pdgendt pdgendt marked this pull request as ready for review May 7, 2024 08:14
@pdgendt pdgendt removed DNM This PR should not be merged (Do Not Merge) Trivial Changes that can be reviewed by anyone, i.e. doc changes, minor build system tweaks, etc. labels May 7, 2024
@pdgendt pdgendt added the Regression Something, which was working, does not anymore label May 7, 2024
@pdgendt pdgendt requested a review from tejlmand May 7, 2024 08:20
@pdgendt pdgendt force-pushed the deferred-init-cmake-ld branch from 203a815 to e5df3d5 Compare May 7, 2024 08:34
@pdgendt pdgendt force-pushed the deferred-init-cmake-ld branch 2 times, most recently from 576b94c to ca2f4d9 Compare May 7, 2024 09:12
tejlmand
tejlmand previously approved these changes May 7, 2024
edersondisouza
edersondisouza previously approved these changes May 7, 2024
tejlmand
tejlmand previously approved these changes May 8, 2024
pdgendt added 2 commits May 8, 2024 10:11
The section for deferred devices was missing when
CONFIG_CMAKE_LINKER_GENERATOR is enabled.

Signed-off-by: Pieter De Gendt <[email protected]>
Add a test case entry with CONFIG_CMAKE_LINKER_GENERATOR enabled.

Signed-off-by: Pieter De Gendt <[email protected]>
@pdgendt pdgendt dismissed stale reviews from tejlmand and edersondisouza via ca7a989 May 8, 2024 08:12
@pdgendt pdgendt force-pushed the deferred-init-cmake-ld branch from 2ae6745 to ca7a989 Compare May 8, 2024 08:12
@pdgendt
Copy link
Collaborator Author

pdgendt commented May 8, 2024

Rebased due to merge conflict

@pdgendt pdgendt requested review from edersondisouza and tejlmand May 8, 2024 08:12
Copy link
Member

@cfriedt cfriedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@carlescufi carlescufi merged commit e791e76 into zephyrproject-rtos:main May 13, 2024
24 checks passed
@pdgendt pdgendt deleted the deferred-init-cmake-ld branch May 13, 2024 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Build System area: Device Model area: Kernel Regression Something, which was working, does not anymore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants