coreboot/util/xcompile
Sean Rhodes d7f427a7d2 util/xcompile: Fix compiler detection on newer Linux distros
Switch to using `objdump -f`, which consistently prints the line
"file format <format>" across modern binutils versions, and extract
the architecture format from that output. This restores correct
toolchain detection on Ubuntu 25.10 and other systems with binutils
≥ 2.43, without breakng older versions.

Before:
    DEBUG: obj_type:
    /tmp/temp.rrDQ8i.o:     file format elf64-x86-64
    DEBUG: obj_arch:

After:
    DEBUG: obj_type:
    /tmp/temp.8GsK08.o:     file format elf64-x86-64
    architecture: i386:x86-64, flags 0x00000000:

    start address 0x0000000000000000
    DEBUG: obj_arch: elf64-x86-64

Change-Id: Ic09304f9e81580bbe1c0bb4910c0cc534d3d2816
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89643
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2025-10-30 08:45:06 +00:00
..
description.md util: Add description.md to each util 2018-07-26 13:26:50 +00:00
xcompile util/xcompile: Fix compiler detection on newer Linux distros 2025-10-30 08:45:06 +00:00