(gdb) run
Starting program: /opt/local/bin/cpufetch
Reading symbols for shared libraries ++. done
Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand.
0x00008060 in get_cpu_info ()
The functional CPU detection for PowerPC is used in OpenBLAS, maybe that could be borrowed.
As noted in https://github.com/Dr-Noob/cpufetch/issues/234 arch detection for PowerPC does not work correctly, but then even that is fixed, the code itself does not work:
The functional CPU detection for PowerPC is used in OpenBLAS, maybe that could be borrowed.
Otherwise use
sysctl
like for aarch64 here.