|WARNING| build: fix cross compilation to x86_64

dpdklab at iol.unh.edu dpdklab at iol.unh.edu
Mon Oct 5 15:24:48 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

## Overview
This patch addresses a build issue when cross-compiling to x86_64 architecture where Meson uses "x86_64" but compilers expect "x86-64" for the `-march` flag.

## Review Findings

### **Errors**

None identified.

### **Warnings**

None identified.

### **Info / Observations**

1. **Conditional placement**: The conditional is added inside the `else` branch of the arch detection, which is appropriate for the x86_64 architecture path where `-march` is used.

2. **Comment clarity**: The comment references a Meson documentation URL which is helpful, though the comment could be slightly more explicit about when this transformation occurs (during cross-compilation scenarios).

3. **Testing coverage**: While the logic appears sound, ensure this has been tested with actual cross-compilation scenarios where `cpu_instruction_set` is set to "x86_64" from a Meson crossfile.

4. **Alternative consideration**: The patch modifies the value of `cpu_instruction_set` variable. An alternative would be to use a separate variable for the compiler argument value, preserving the original value for logging or debugging purposes. However, the current approach is acceptable since the variable is only used for compiler flags at this point.

## Summary

The patch appears correct and addresses a real issue with cross-compilation. The transformation from "x86_64" to "x86-64" is appropriately scoped to the `-march` path and does not affect ARM or other architectures that use `-mcpu` or `-mtune`.

**No blocking issues identified.** The patch is acceptable as-is, though testing with actual cross-compilation scenarios is recommended if not already done.


More information about the test-report mailing list