Skip to content

Fix/debug flags#85

Merged
Gnarus-G merged 3 commits intomainfrom
fix/debug-flags
Aug 4, 2025
Merged

Fix/debug flags#85
Gnarus-G merged 3 commits intomainfrom
fix/debug-flags

Conversation

@Gnarus-G
Copy link
Owner

@Gnarus-G Gnarus-G commented Aug 4, 2025

This pull request introduces several refinements to the maccel project, primarily focusing on clarifying build configurations and updating the CLI version.

Key Changes:

  • Refactor Build Flags (EXTRA_CFLAGS to DRIVER_CFLAGS): The compilation flag variable EXTRA_CFLAGS has been consistently renamed to DRIVER_CFLAGS across the Makefile, PKGBUILD, dkms.conf, driver/Makefile, and install.sh scripts. This change improves clarity and explicitly indicates that these flags are specific to the kernel module's compilation.
  • Enhanced Kernel Module Logging: The maccel kernel module now logs its compilation flags (DEBUG status and FIXEDPT_BITS) to KERN_INFO when connecting to a device. This enhancement will be highly valuable for verifying driver builds and debugging potential issues related to specific compilation configurations.
  • CLI Version Update to 0.5.6: The maccel-cli package and its dependencies have been updated to version 0.5.6 across Cargo.toml, Cargo.lock, and PKGBUILD.
  • Minor Internal Refactoring: A small cleanup was performed in crates/core/src/persist.rs, removing the unused import for NoAccelParamArgs, which simplifies the persistence logic.

Impact:

  • Improved Maintainability: The renamed build flags make the build system's intent clearer.
  • Enhanced Debuggability: The new kernel logs provide crucial information for troubleshooting and verifying driver installations.
  • Latest CLI Version: Users will receive the updated maccel-cli with any associated improvements or fixes from version 0.5.6.
  • No functional changes are expected for end-users beyond the version update for the CLI and improved kernel logging.

Rename `EXTRA_CFLAGS` to `DRIVER_CFLAGS` across all build configurations to
clarify its specific purpose for driver compilation.

Adopt the Kbuild standard `ccflags-y` variable for passing driver-specific
compiler flags. This ensures that `DRIVER_CFLAGS` are correctly and
idiomatically applied by the kernel build system, improving the robustness
and maintainability of the driver's build process. Previously, flags were
passed less robustly via the `make` command line.

Add a `printk` statement during driver connection to log the effective
`DEBUG` and `FIXEDPT_BITS` values. This provides runtime verification that
the intended build flags have been correctly applied.
Ensure DRIVER_CFLAGS are passed to nested 'make install' commands
during the 'reinstall' and 'reinstall_debug' Makefile targets.

This guarantees that any custom or debug-specific flags defined for
the driver compilation are consistently applied, preventing potential
build configuration mismatches during reinstallation.
@Gnarus-G Gnarus-G self-assigned this Aug 4, 2025
@Gnarus-G Gnarus-G added bug Something isn't working enhancement New feature or request labels Aug 4, 2025
@vercel
Copy link

vercel bot commented Aug 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maccel ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 4, 2025 3:48pm

@Gnarus-G
Copy link
Owner Author

Gnarus-G commented Aug 4, 2025

✅ Why EXTRA_CFLAGS is no longer recognized

Deprecated since 2007: You should be using ccflags-y (or ccflags‑ifdef‑CONFIG_… for conditional flags)—the old EXTRA_CFLAGS was just transitioned under the hood into ccflags-y via a compatibility layer
Stack Overflow+15Linux-Kernel Archive+15Stack Overflow+15

Removed in 2025 (v6.15‑rc1): That compatibility shim was removed completely. Any assignment to EXTRA_CFLAGS is now ignored. External modules or in‑tree code that still try to use it will silently drop your flags or even cause build errors
patchwork-proxy.ozlabs.org

github.com

@Gnarus-G Gnarus-G merged commit 94cd8fe into main Aug 4, 2025
3 checks passed
@Gnarus-G Gnarus-G deleted the fix/debug-flags branch August 4, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant