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

Revert "drivers: pinmux: build as static library" #38908

Conversation

tejlmand
Copy link
Collaborator

This reverts commit 4330929.

Fixes: #38403

The referred commit introduced zephyr_library() for pinmux drivers but
also resulting in #38403 because several boards has CONFIG_PINMUX=y
without selecting any pinmux drivers from drivers/pinmux thus
generating the following warning:

No SOURCES given to Zephyr library: drivers__pinmux

Excluding target from build.

This commit reverts the changes so that this warning disappears.
This results in pinmux drivers from drivers/pinmux to be located in
libzephyr.a which is messy, but has been so for a long time, even before
Zephyr 1.14 LTS.

The future pinctrl API will be designed in such a way that this problem
will not occur. Thus the old behavior is acceptable until the transition
to pinctrl API has completed.

Signed-off-by: Torsten Rasmussen [email protected]

This reverts commit 4330929.

Fixes: zephyrproject-rtos#38403

The referred commit introduced `zephyr_library()` for pinmux drivers but
also resulting in zephyrproject-rtos#38403 because several boards has `CONFIG_PINMUX=y`
without selecting any pinmux drivers from `drivers/pinmux` thus
generating the following warning:
> No SOURCES given to Zephyr library: drivers__pinmux
>
> Excluding target from build.

This commit reverts the changes so that this warning disappears.
This results in pinmux drivers from `drivers/pinmux` to be located in
libzephyr.a which is messy, but has been so for a long time, even before
Zephyr 1.14 LTS.

The future pinctrl API will be designed in such a way that this problem
will not occur. Thus the old behavior is acceptable until the transition
to pinctrl API has completed.

Signed-off-by: Torsten Rasmussen <[email protected]>
@tejlmand tejlmand added bug The issue is a bug, or the PR is fixing a bug backport v2.7-branch Request backport to the v2.7-branch labels Sep 28, 2021
@tejlmand tejlmand added this to the v2.7.0 milestone Sep 28, 2021
@tejlmand
Copy link
Collaborator Author

This is an alternative fix to: #38608

@nashif
Copy link
Member

nashif commented Sep 28, 2021

too fast, should have let @dcpleung at least review this since it is reverting his commit? How is this going to be solved on 2.7 with no pinctrl? The original commit is solving another issue which would allow post linking of applications with a prebuilt zephyr library.

@tejlmand
Copy link
Collaborator Author

too fast, should have let @dcpleung at least review this since it is reverting his commit?

Agree, always nice to have the author of the original commit approve.

How is this going to be solved on 2.7 with no pinctrl?

This is not solving that. That will be in future.
For 2.7, it will avoid the empty library warning by restoring old behavior, as described.
Because there seemed to be too much resistance to this proposal: #38608

The original commit is solving another issue which would allow post linking of applications with a prebuilt zephyr library.

@nashif How so ?
The Zephyr libraries must still be inside the whole-archive flags so how will the original commit help to do post-linking from the app ?
The original commit only moved files from the libzephyr.a library into a dedicated libdrivers__pinmux.a lib, and thus reducing the mess in libzephyr.a`.
Also the original PR doesn't mention anything on post linking possibilities.
#37512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport v2.7-branch Request backport to the v2.7-branch bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup No SOURCES given to Zephyr library warnings
4 participants