OpenBSD: register machine cpu "macppc" as cpu_family "ppc"

On OpenBSD, the main PowerPC machine is known as macppc, while the processor
family is powerpc:
$ uname -{m,p}
macppc powerpc
$ echo 'import platform; print (platform.machine())' | python3
macppc
$ echo 'import platform; print (platform.processor())' | python3
powerpc

This allows for e.g. GLib configure to properly detect that cpu:
Build machine cpu family: ppc
Build machine cpu: macppc
While it failed before with: WARNING: Unknown CPU family 'macppc' <snip>
This commit is contained in:
Antoine Jacoutot 2019-01-13 11:18:32 +01:00 committed by Jussi Pakkanen
parent 680d266591
commit e02b79dc1e
1 changed files with 2 additions and 0 deletions

View File

@ -220,6 +220,8 @@ def detect_cpu_family(compilers):
trial = 'arm'
elif trial.startswith('ppc64'):
trial = 'ppc64'
elif trial == 'macppc':
trial = 'ppc'
elif trial == 'powerpc':
trial = 'ppc'
# FreeBSD calls both ppc and ppc64 "powerpc".