|WARNING| build: fix cross compilation to x86_64
dpdklab at iol.unh.edu
dpdklab at iol.unh.edu
Mon Oct 5 15:32:30 CEST 2026
Test-Label: ai-code-review
Test-Status: WARNING
https://dpdk.org/patch/170562
_AI Code Review_
=== Patch Review: series.patch (via Claude) ===
Review date: 2026-10-05
# DPDK Patch Review
## Patch Summary
This patch fixes cross-compilation to x86_64 by translating Meson's "x86_64" CPU instruction set name to GCC's expected "x86-64" format for the `-march` argument.
---
## Findings
### Errors
None identified.
### Warnings
None identified.
### Info
**1. Narrow scope of fix may miss related issues**
The patch only handles the `x86_64` -> `x86-64` translation in the `-march` path (non-ARM, non-PPC). However, similar translation may be needed if `cpu_instruction_set == 'x86_64'` reaches the ARM or PPC conditional branches above (lines 174-176), where `-mcpu` or `-mtune` are used. While the current control flow suggests this is unlikely (ARM/PPC would set their own architecture values), consider whether the fix should also apply before the conditional split to handle all code paths uniformly.
**2. Consider documenting the Meson/compiler naming mismatch**
The inline comment explains the immediate issue, but this naming translation could be documented in a central location (e.g., `doc/guides/linux_gsg/cross_build_dpdk_for_*.rst` or a comment near `cpu_instruction_set` assignment) to help future maintainers understand why this mapping exists.
---
## Summary
**No correctness bugs or style violations found.** The patch is functionally correct for its stated purpose.
The logic is sound: if the user specifies `x86_64` as the CPU instruction set (likely via a Meson cross-file), the code translates it to `x86-64` before passing it to `-march`, preventing a compiler error. The placement after the ARM/PPC check ensures it only applies to the x86 `-march` path.
The two Info-level suggestions are optional improvements to consider for robustness and maintainability, but do not block acceptance of the patch.
More information about the test-report
mailing list