Skip to content

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
Xilinx:masterfrom
amd-vserbu:fix/ccflags-y
Open

QDMA: linux-kernel: use ccflags-y instead of EXTRA_CFLAGS (fix build on Linux 6.15+/Ubuntu 26.04)#394
amd-vserbu wants to merge 1 commit into
Xilinx:masterfrom
amd-vserbu:fix/ccflags-y

Conversation

@amd-vserbu

Copy link
Copy Markdown

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:

In file included from nl.c:27:
libqdma/libqdma_export.h:41:10: fatal error: qdma_access_export.h: No such file or directory
   41 | #include "qdma_access_export.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Fixes #393

Changes

  • QDMA/linux-kernel/driver/src/Makefile: EXTRA_CFLAGS -> ccflags-y
  • QDMA/linux-kernel/driver/libqdma/Makefile: EXTRA_CFLAGS -> ccflags-y
  • Added -Wno-error=empty-body so -Wall -Werror no 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 underlying if (detail) ; in libqdma/thread.c can instead be cleaned up directly. Happy to adjust.

Signed-off-by: Vlad-Gabriel Serbu <Vlad-Gabriel.Serbu@amd.com>
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.

QDMA: libqdma fails to build on Ubuntu 26.04 and Linux 6.15+ (Makefile EXTRA_CFLAGS removed)

1 participant