Include <linux/kconfig.h> from the compiler flags#477
Merged
Conversation
91aa7b0 to
921a268
Compare
Like we did for <linux/compiler_types.h>, we also include <linux/kconfig.h> from the compiler command line to replicate what is done in the Linux build system. This is required because some headers rely on the availability of the `IS_ENABLED()` macro very early, before <linux/kconfig.h> has had a chance to be included through regular #include directives. We also preventively and conditionally include <linux/compiler-version.h>. linuxkpi doesn't have at the time of this commit. But once it does, this Makefile will be ready. The order of inclusion follows what Linux does. This fixes build errors with DRM drivers from Linux 6.13 and 6.14. Sponsored by: The FreeBSD Foundation
921a268 to
b6f7264
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Like we did for <linux/compiler_types.h>, we also include <linux/kconfig.h> from the compiler command line to replicate what is done in the Linux build system.
This is required because some headers rely on the availability of the
IS_ENABLED()macro very early, before <linux/kconfig.h> has had a chance to be included through regular #include directives.We also preventively and conditionally include
<linux/compiler-version.h>. linuxkpi doesn't have at the time of this commit. But once it does, this Makefile will be ready. The order of inclusion follows what Linux does.
This fixes build errors with DRM drivers from Linux 6.13 and 6.14.
Sponsored by: The FreeBSD Foundation