Skip to content

lunatik: run the kernel make from the build dir, drop KBUILD_AFLAGS - #18

Open
marcelstanley wants to merge 1 commit into
lunatik-4.4from
claude_kbuild_aflags
Open

lunatik: run the kernel make from the build dir, drop KBUILD_AFLAGS#18
marcelstanley wants to merge 1 commit into
lunatik-4.4from
claude_kbuild_aflags

Conversation

@marcelstanley

Copy link
Copy Markdown
Collaborator

Lunatik's Kbuild locates the klibc and lua headers through ${PWD}, so the feed compensated for the wrong cwd by repeating the -I flags in EXTRA_CFLAGS and KBUILD_AFLAGS. A KBUILD_AFLAGS given on the command line replaces the kernel's default (-D__ASSEMBLY__ -fno-PIE); without ASSEMBLY, klibc's setjmp.S is preprocessed through the C parts of compiler_types.h and fails on __has_attribute with kernel 6.6.

Running the kernel make from PKG_BUILD_DIR lets Kbuild's own asflags-y/ccflags-y apply, which also retires the feed's private KLIBC_ARCH mapping.

Lunatik's Kbuild locates the klibc and lua headers through ${PWD}, so
the feed compensated for the wrong cwd by repeating the -I flags in
EXTRA_CFLAGS and KBUILD_AFLAGS. A KBUILD_AFLAGS given on the command
line replaces the kernel's default (-D__ASSEMBLY__ -fno-PIE); without
__ASSEMBLY__, klibc's setjmp.S is preprocessed through the C parts of
compiler_types.h and fails on __has_attribute with kernel 6.6.

Running the kernel make from PKG_BUILD_DIR lets Kbuild's own
asflags-y/ccflags-y apply, which also retires the feed's private
KLIBC_ARCH mapping.
@marcelstanley marcelstanley self-assigned this Aug 25, 2026
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.

2 participants