QDMA: linux-kernel: use ccflags-y instead of EXTRA_CFLAGS (fix build on Linux 6.15+/Ubuntu 26.04)#394
Open
amd-vserbu wants to merge 1 commit into
Open
QDMA: linux-kernel: use ccflags-y instead of EXTRA_CFLAGS (fix build on Linux 6.15+/Ubuntu 26.04)#394amd-vserbu wants to merge 1 commit into
amd-vserbu wants to merge 1 commit into
Conversation
Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
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.
Summary
Fixes the QDMA Linux kernel driver build on Linux ≥ 6.15, including the Ubuntu 26.04 LTS kernel (7.0). kbuild removed EXTRA_CFLAGS support in 6.15, so the driver's include paths were silently dropped, causing:
Fixes #393
Changes
QDMA/linux-kernel/driver/src/Makefile: EXTRA_CFLAGS -> ccflags-yQDMA/linux-kernel/driver/libqdma/Makefile:EXTRA_CFLAGS-> ccflags-y-Wno-error=empty-bodyso-Wall -Werrorno longer fails on the empty if body in libqdma/thread.c with newer GCC.Why ccflags-y
EXTRA_CFLAGS was deprecated in 2007 and removed in Linux 6.15 (torvalds/linux@e966ad0edd00). ccflags-y is the supported replacement and has existed since kernel 2.6.24, so this stays compatible with older kernels.
Note for reviewers
The empty-body case is handled by suppressing
-Werror=empty-body. If you'd prefer, the underlyingif (detail) ;in libqdma/thread.c can instead be cleaned up directly. Happy to adjust.