Skip to content

Include <linux/kconfig.h> from the compiler flags#477

Merged
dumbbell merged 1 commit into
freebsd:masterfrom
dumbbell:always-include-kconfig.h
Jun 14, 2026
Merged

Include <linux/kconfig.h> from the compiler flags#477
dumbbell merged 1 commit into
freebsd:masterfrom
dumbbell:always-include-kconfig.h

Conversation

@dumbbell

Copy link
Copy Markdown
Member

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

@dumbbell dumbbell self-assigned this Jun 14, 2026
@dumbbell dumbbell changed the title Inclue <linux/kconfig.h> from the compiler flags Include <linux/kconfig.h> from the compiler flags Jun 14, 2026
@dumbbell dumbbell force-pushed the always-include-kconfig.h branch from 91aa7b0 to 921a268 Compare June 14, 2026 18:14
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
@dumbbell dumbbell force-pushed the always-include-kconfig.h branch from 921a268 to b6f7264 Compare June 14, 2026 18:27
@dumbbell dumbbell merged commit b6f7264 into freebsd:master Jun 14, 2026
2 checks passed
@dumbbell dumbbell deleted the always-include-kconfig.h branch June 14, 2026 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant